コード例 #1
0
 public JsonMathTable(IFontMeasurer <TFont, TGlyph> fontMeasurer, JToken mathTable,
                      IGlyphNameProvider <TGlyph> glyphNameProvider,
                      IGlyphBoundsProvider <TFont, TGlyph> glyphBoundsProvider)
 {
     FontMeasurer        = fontMeasurer;
     _mathTable          = mathTable;
     GlyphNameProvider   = glyphNameProvider;
     GlyphBoundsProvider = glyphBoundsProvider;
 }
コード例 #2
0
 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;
 }
コード例 #3
0
 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;
 }
コード例 #4
0
ファイル: JsonMathTable.cs プロジェクト: zzxxhhzxh/CSharpMath
        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");
        }