public static bool AttributesMatch <TFont, TGlyph>(this AttributedGlyphRun <TFont, TGlyph> run1, AttributedGlyphRun <TFont, TGlyph> run2)
     where TFont : IMathFont <TGlyph>
 {
     if (run1 is null || run2 is null)
     {
         return(false);
     }
     return(run1.Font.Equals(run2.Font));
 }
示例#2
0
 public static AttributedString <TFont, TGlyph> Combine <TFont, TGlyph>(AttributedString <TFont, TGlyph> aStr, AttributedGlyphRun <TFont, TGlyph> run)
     where TFont : MathFont <TGlyph>
 {
     if (aStr == null)
     {
         return(AttributedStrings.FromGlyphRuns(run));
     }
     else
     {
         if (run != null)
         {
             aStr.AppendGlyphRun(run);
         }
         return(aStr);
     }
 }
示例#3
0
 internal void AppendGlyphRun(AttributedGlyphRun <TFont, TGlyph> run)
 {
     _Runs.Add(run);
     TryFuseRunAt(_Runs.Count - 1);
 }
示例#4
0
 public static AttributedString <TFont, TGlyph> Combine <TFont, TGlyph>(AttributedGlyphRun <TFont, TGlyph> run1, AttributedGlyphRun <TFont, TGlyph> run2)
     where TFont : MathFont <TGlyph>
 => AttributedStrings.FromGlyphRuns(run1, run2);
 public static bool AttributesMatch <TFont, TGlyph>(this AttributedGlyphRun <TFont, TGlyph> run1, AttributedGlyphRun <TFont, TGlyph> run2) where TFont : IFont <TGlyph> =>
 !(run1 is null || run2 is null) && run1.Placeholder == run2.Placeholder && EqualityComparer <TFont> .Default.Equals(run1.Font, run2.Font);