public TextRunDisplay( AttributedGlyphRun <TFont, TGlyph> run, Range range, TypesettingContext <TFont, TGlyph> context) { var font = run.Font; Run = run; Range = range; Width = context.GlyphBoundsProvider.GetTypographicWidth(font, run); _ComputeAscentDescent(context, font); }
public static bool AttributesMatch <TFont, TGlyph>( this AttributedGlyphRun <TFont, TGlyph>?run1, AttributedGlyphRun <TFont, TGlyph>?run2) where TFont : FrontEnd.IFont <TGlyph> => run1 != null && run2 != null && EqualityComparer <TFont> .Default.Equals(run1.Font, run2.Font);
internal void AppendGlyphRun(AttributedGlyphRun <TFont, TGlyph> run) { _runs.Add(run); TryFuseRunAt(_runs.Count - 1); }