tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

limits.py (2534B)


      1 #!/usr/bin/env python3
      2 
      3 from utils import mathfont
      4 import fontforge
      5 
      6 nArySumCodePoint = 0x2211  # largeop operator
      7 
      8 v = 3 * mathfont.em
      9 f = mathfont.create("limits-lowerlimitbaselinedropmin%d" % v,
     10                    "Copyright (c) 2016 MathML Association")
     11 mathfont.createSquareGlyph(f, nArySumCodePoint)
     12 f.math.LowerLimitBaselineDropMin = v
     13 f.math.LowerLimitGapMin = 0
     14 f.math.OverbarExtraAscender = 0
     15 f.math.OverbarVerticalGap = 0
     16 f.math.StretchStackBottomShiftDown = 0
     17 f.math.StretchStackGapAboveMin = 0
     18 f.math.StretchStackGapBelowMin = 0
     19 f.math.StretchStackTopShiftUp = 0
     20 f.math.UnderbarExtraDescender = 0
     21 f.math.UnderbarVerticalGap = 0
     22 f.math.UpperLimitBaselineRiseMin = 0
     23 f.math.UpperLimitGapMin = 0
     24 mathfont.save(f)
     25 
     26 v = 11 * mathfont.em
     27 f = mathfont.create("limits-lowerlimitgapmin%d" % v,
     28                    "Copyright (c) 2016 MathML Association")
     29 mathfont.createSquareGlyph(f, nArySumCodePoint)
     30 f.math.LowerLimitBaselineDropMin = 0
     31 f.math.LowerLimitGapMin = v
     32 f.math.OverbarExtraAscender = 0
     33 f.math.OverbarVerticalGap = 0
     34 f.math.StretchStackBottomShiftDown = 0
     35 f.math.StretchStackGapAboveMin = 0
     36 f.math.StretchStackGapBelowMin = 0
     37 f.math.StretchStackTopShiftUp = 0
     38 f.math.UnderbarExtraDescender = 0
     39 f.math.UnderbarVerticalGap = 0
     40 f.math.UpperLimitBaselineRiseMin = 0
     41 f.math.UpperLimitGapMin = 0
     42 mathfont.save(f)
     43 
     44 v = 5 * mathfont.em
     45 f = mathfont.create("limits-upperlimitbaselinerisemin%d" % v,
     46                    "Copyright (c) 2016 MathML Association")
     47 mathfont.createSquareGlyph(f, nArySumCodePoint)
     48 f.math.LowerLimitBaselineDropMin = 0
     49 f.math.LowerLimitGapMin = 0
     50 f.math.OverbarExtraAscender = 0
     51 f.math.OverbarVerticalGap = 0
     52 f.math.StretchStackBottomShiftDown = 0
     53 f.math.StretchStackGapAboveMin = 0
     54 f.math.StretchStackGapBelowMin = 0
     55 f.math.StretchStackTopShiftUp = 0
     56 f.math.UnderbarExtraDescender = 0
     57 f.math.UnderbarVerticalGap = 0
     58 f.math.UpperLimitBaselineRiseMin = v
     59 f.math.UpperLimitGapMin = 0
     60 mathfont.save(f)
     61 
     62 v = 7 * mathfont.em
     63 f = mathfont.create("limits-upperlimitgapmin%d" % v,
     64                    "Copyright (c) 2016 MathML Association")
     65 mathfont.createSquareGlyph(f, nArySumCodePoint)
     66 f.math.LowerLimitBaselineDropMin = 0
     67 f.math.LowerLimitGapMin = 0
     68 f.math.OverbarExtraAscender = 0
     69 f.math.OverbarVerticalGap = 0
     70 f.math.StretchStackBottomShiftDown = 0
     71 f.math.StretchStackGapAboveMin = 0
     72 f.math.StretchStackGapBelowMin = 0
     73 f.math.StretchStackTopShiftUp = 0
     74 f.math.UnderbarExtraDescender = 0
     75 f.math.UnderbarVerticalGap = 0
     76 f.math.UpperLimitBaselineRiseMin = 0
     77 f.math.UpperLimitGapMin = v
     78 mathfont.save(f)