Method Plan
Plan(GlyphRun, FontFace, IConversionDiagnostics)
Plans the clusters of a run against a resolved face.
public static PlannedGlyphCluster[] Plan(GlyphRun run, FontFace face, IConversionDiagnostics diagnostics)
Parameters
runGlyphRunThe glyph run to plan.
faceFontFaceThe face the run resolved to.
diagnosticsIConversionDiagnosticsThe diagnostics sink; receives a warning for out-of-range clusters.
Returns
- PlannedGlyphCluster[]
One entry per drawable cluster, in run order.
Exceptions
- ArgumentNullException
An argument is null.
Plan(GlyphRun, FontFace, bool, IConversionDiagnostics)
Plans the clusters of a run against a resolved face, optionally omitting glyphs the face cannot draw.
public static PlannedGlyphCluster[] Plan(GlyphRun run, FontFace face, bool omitUndrawableGlyphs, IConversionDiagnostics diagnostics)
Parameters
runGlyphRunThe glyph run to plan.
faceFontFaceThe face the run resolved to.
omitUndrawableGlyphsboolWhen true, a code point the face has no glyph for contributes no glyph to the plan instead of contributing
.notdef(glyph 0).diagnosticsIConversionDiagnosticsThe diagnostics sink; receives a warning for out-of-range clusters.
Returns
- PlannedGlyphCluster[]
One entry per drawable cluster, in run order.
Remarks
Why this is an option rather than the behavior. Drawing .notdef is
what Word does and what a reader expects: the box says a character is present that the
available fonts cannot render, which is information. But ISO 19005-2 6.2.11.8 and
ISO 14289-1 7.21.8 both forbid referencing .notdef from a text-showing
operator, so an archival or tagged file cannot say it that way. The conformance level
is the caller's, so the choice is the caller's; the rule is implemented once, here,
because both renderers must keep making the same decision.
Omitting a glyph never disturbs the text around it: DesiredAdvance is layout's and is untouched, and NominalAdvance is recomputed over the glyphs that remain, so the correction a renderer applies between clusters still lands the pen in the same place. A cluster whose glyphs are all undrawable is kept, with no glyphs, for exactly that reason — dropping it would collapse its advance.
Exceptions
- ArgumentNullException
An argument is null.