//// This code is part of Document Solutions for PDF .NET demos.// Copyright (c) MESCIUS inc. All rights reserved.//usingSystem.IO;usingSystem.Drawing;usingGrapeCity.Documents.Pdf;usingGrapeCity.Documents.Text;usingGCTEXT = GrapeCity.Documents.Text;usingGCDRAW = GrapeCity.Documents.Drawing; namespaceDsPdfWeb.Demos.Basics{// A simple demonstration of some interesting font features in action. // For the complete list of font features see featurelist.htm. // See also Ligatures.publicclassFontFeatures {publicintCreatePDF(Stream stream) {var doc = newGcPdfDocument();var g = doc.NewPage().Graphics;//GCTEXT.Font font;var fpath = Path.Combine("Resources", "Fonts", "Gabriola.ttf");if (File.Exists(fpath)) font = GCTEXT.Font.FromFile(fpath);else font = FontCollection.SystemFonts.FindFamilyName("Gabriola");var tf = newTextFormat() { Font = font, FontSize = 20 };//var tl = g.CreateTextLayout(); tl.AppendLine("Line with no custom font features.", tf);// tf.FontFeatures = [newFontFeature(FeatureTag.ss03)]; tl.AppendLine("Line with font feature ss03 enabled.", tf);// tf.FontFeatures = [newFontFeature(FeatureTag.ss05)]; tl.AppendLine("Line with font feature ss05 enabled.", tf);// tf.FontFeatures = [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.Count; } }}