Revision 716fa061d4296f6cd39cb5f8353e64e3222e7707 authored by Frédéric Wang on 14 March 2018, 14:48:29 UTC, committed by GitHub on 14 March 2018, 14:48:29 UTC
1 parent 3686c5f
Raw File
xHeight.py
#!/usr/bin/python

from utils import mathfont
import fontforge

v = mathfont.em / 2
f = mathfont.create("xheight%d" % v)
g = f.createChar(ord('x'))
mathfont.drawRectangleGlyph(g, mathfont.em, v, 0)
assert f.xHeight == v, "Bad x-height value!"
mathfont.save(f)
back to top