'''' This code is part of Document Solutions for PDF .NET demos.'' Copyright (c) MESCIUS inc. All rights reserved.''ImportsSystem.IOImportsSystem.DrawingImportsGrapeCity.Documents.PdfImportsGrapeCity.Documents.TextImports GCTEXT = GrapeCity.Documents.Text '' PDF specification lists 14 standard fonts that should always be available.'' DsPdf has those fonts built in, and allows using them directly as this sample demonstrates.PublicClassStandardPdfFontsFunctionCreatePDF(ByVal stream AsStream) AsIntegerDim doc = NewGcPdfDocument()Dim g = doc.NewPage().Graphics'' Insertion point (DsPdf's default resolution is 72dpi, use 1" margins all around):Constmargin = 72Dim ip = NewPointF(margin, margin)Dim tf = NewTextFormat() With {.FontSize = 12}Dim drawText As Action(OfString, GCTEXT.Font) =Sub(tag_ AsString, fnt_ AsGCTEXT.Font) tf.Font = fnt_Dim tstr = $"{tag_} ({fnt_.FullFontName}): The quick brown fox jumps over the lazy dog."Dim s = g.MeasureString(tstr, tf, doc.PageSize.Width - margin * 2) g.DrawString(tstr, tf, NewRectangleF(ip, s)) ip.Y += s.Height * 1.5FEndSub'' Draw samples of all 14 standard fonts: drawText("Helvetica", StandardFonts.Helvetica) drawText("HelveticaItalic", StandardFonts.HelveticaItalic) drawText("HelveticaBold", StandardFonts.HelveticaBold) drawText("HelveticaBoldItalic", StandardFonts.HelveticaBoldItalic) drawText("Times", StandardFonts.Times) drawText("TimesItalic", StandardFonts.TimesItalic) drawText("TimesBold", StandardFonts.TimesBold) drawText("TimesBoldItalic", StandardFonts.TimesBoldItalic) drawText("Courier", StandardFonts.Courier) drawText("CourierItalic", StandardFonts.CourierItalic) drawText("CourierBold", StandardFonts.CourierBold) drawText("CourierBoldItalic", StandardFonts.CourierBoldItalic) drawText("Symbol", StandardFonts.Symbol) drawText("ZapfDingbats", StandardFonts.ZapfDingbats)'''' Done: doc.Save(stream)Return doc.Pages.CountEndFunctionEndClass