PeachDrawing.Core

PeachDrawing.Core.Canvas

Canvas.CountShapedGlyphs(string, Font, Nullable<ShapeSettings>) Method

The number of glyphs str shapes into once GSUB substitution is applied - always <= str’s character count, less whenever a ligature merges more than one character into a single glyph (single substitution never changes the count). Used to size the per-glyph letter-spacing gap count a word’s box must reserve (the PDF Tc operator adds one gap per glyph actually shown, not per source character), so it stays in sync with what DrawString(string, Font, PaintColor, PaintPoint, Size, double, FontPalette, Nullable<ShapeSettings>) paints for the same text/font/features.

public abstract int CountShapedGlyphs(string str, PeachDrawing.Core.Font font, System.Nullable<PeachDrawing.Text.Shaping.ShapeSettings> features=null);

Parameters

str System.String

font Font

features System.Nullable<ShapeSettings>

Returns

System.Int32