public JsonMathTable(IFontMeasurer <TFont, TGlyph> fontMeasurer, JToken mathTable, IGlyphNameProvider <TGlyph> glyphNameProvider, IGlyphBoundsProvider <TFont, TGlyph> glyphBoundsProvider) { FontMeasurer = fontMeasurer; _mathTable = mathTable; GlyphNameProvider = glyphNameProvider; GlyphBoundsProvider = glyphBoundsProvider; }
public TypesettingContext(Func <TFont, float, TFont> mathFontCloner, IGlyphBoundsProvider <TFont, TGlyph> glyphBoundsProvider, IGlyphFinder <TFont, TGlyph> glyphFinder, FontMathTable <TFont, TGlyph> mathTable) { GlyphBoundsProvider = glyphBoundsProvider; MathFontCloner = mathFontCloner; GlyphFinder = glyphFinder; MathTable = mathTable; }
public JsonMathTable(IFontMeasurer <TFont, TGlyph> fontMeasurer, JToken mathTable, IGlyphNameProvider <TGlyph> glyphNameProvider, IGlyphBoundsProvider <TFont, TGlyph> glyphBoundsProvider) { FontMeasurer = fontMeasurer; GlyphNameProvider = glyphNameProvider; GlyphBoundsProvider = glyphBoundsProvider; _mathTable = mathTable; _constantsDictionary = _mathTable["constants"] as JObject; _assemblyTable = _mathTable["v_assembly"] as JObject; _italicTable = _mathTable["italic"] as JObject; }
public JsonMathTable(IFontMeasurer <TFont, TGlyph> fontMeasurer, JToken mathTable, IGlyphNameProvider <TGlyph> glyphNameProvider, IGlyphBoundsProvider <TFont, TGlyph> glyphBoundsProvider) { JObject GetTable(string name) => _mathTable[name] as JObject ?? throw new System.ArgumentException($"Table not found: {name}", nameof(mathTable)); FontMeasurer = fontMeasurer; GlyphNameProvider = glyphNameProvider; GlyphBoundsProvider = glyphBoundsProvider; _mathTable = mathTable; _constantsDictionary = GetTable("constants"); _assemblyTable = GetTable("v_assembly"); _italicTable = GetTable("italic"); }