1
0
Fork 0
firefox/testing/web-platform/tests/mathml/tools/xHeight.py
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

12 lines
326 B
Python
Executable file

#!/usr/bin/env python3
from utils import mathfont
import fontforge
v = mathfont.em / 2
f = mathfont.create("xheight%d" % v,
"Copyright (c) 2016 MathML Association")
g = f.createChar(ord('x'))
mathfont.drawRectangleGlyph(g, mathfont.em, v, 0)
assert f.xHeight == v, "Bad x-height value!"
mathfont.save(f)