PeachDrawing.Core
PeachDrawing.Core.Canvas
Canvas.GetTextOutline(string, Font, PaintPoint, double, Nullable<ShapeSettings>) Method
Builds the vector outline of a glyph run as a fillable/strokeable GraphicsPath,
with the text baseline at baselineOrigin (user-space units) and glyphs
advancing left-to-right. Unlike DrawString(string, Font, PaintColor, PaintPoint, Size, double, FontPalette, Nullable<ShapeSettings>)
(a single-color PDF text show), the
returned path can be filled with a gradient/pattern brush or stroked - used by the SVG
renderer for gradient/pattern fill, stroke, and <textPath> on text.
Returns null when the font produces no glyph outlines (a CID-keyed CFF font, or a
bitmap font, neither of which this engine can decode outlines from) - the caller’s cue to fall back to
DrawString(string, Font, PaintColor, PaintPoint, Size, double, FontPalette, Nullable<ShapeSettings>).
public abstract PeachDrawing.Core.GraphicsPath? GetTextOutline(string str, PeachDrawing.Core.Font font, PeachDrawing.Core.PaintPoint baselineOrigin, double letterSpacing=0.0, System.Nullable<PeachDrawing.Text.Shaping.ShapeSettings> features=null);
Parameters
str System.String
the run to outline
font Font
the font to outline with
baselineOrigin PaintPoint
the pen origin on the text baseline (user-space units)
letterSpacing System.Double
extra advance between glyphs (same units as baselineOrigin)
features System.Nullable<ShapeSettings>
which GSUB features (see ShapeSettings) to apply when shaping str