'''' 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 '' A simple demonstration of some interesting font features in action.'' For the complete list of font features see featurelist.htm.'' See also Ligatures.PublicClassFontFeaturesFunctionCreatePDF(ByVal stream AsStream) AsIntegerDim doc = NewGcPdfDocument()Dim g = doc.NewPage().Graphics''Dim fnt AsGCTEXT.FontDim fpath = Path.Combine("Resources", "Fonts", "Gabriola.ttf")IfFile.Exists(fpath) Then fnt = GCTEXT.Font.FromFile(fpath)Else fnt = FontCollection.SystemFonts.FindFamilyName("Gabriola")EndIfDim tf = NewTextFormat() With {.Font = fnt, .FontSize = 20}''Dim tl = g.CreateTextLayout() tl.AppendLine("Line with no custom font features.", tf)'' tf.FontFeatures = NewFontFeature() {NewFontFeature(FeatureTag.ss03)} tl.AppendLine("Line with font feature ss03 enabled.", tf)'' tf.FontFeatures = NewFontFeature() {NewFontFeature(FeatureTag.ss05)} tl.AppendLine("Line with font feature ss05 enabled.", tf)'' tf.FontFeatures = NewFontFeature() {NewFontFeature(FeatureTag.ss07)} tl.AppendLine("Line with font feature ss07 enabled.", tf)'' tl.PerformLayout(true) g.DrawTextLayout(tl, NewPointF(72, 72))'''' Done: doc.Save(stream)Return doc.Pages.CountEndFunctionEndClass