diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/mathml/tools/axisheight.py | |
parent | Initial commit. (diff) | |
download | firefox-upstream.tar.xz firefox-upstream.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/mathml/tools/axisheight.py')
-rwxr-xr-x | testing/web-platform/tests/mathml/tools/axisheight.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/testing/web-platform/tests/mathml/tools/axisheight.py b/testing/web-platform/tests/mathml/tools/axisheight.py new file mode 100755 index 0000000000..f27333132a --- /dev/null +++ b/testing/web-platform/tests/mathml/tools/axisheight.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 + +from utils import mathfont +import fontforge + +verticalArrowCodePoint = 0x21A8 +v1 = 5 * mathfont.em +v2 = 14 * mathfont.em +f = mathfont.create("axisheight%d-verticalarrow%d" % (v1, v2), + "Copyright (c) 2016 MathML Association") +f.math.AxisHeight = v1 +f.math.MinConnectorOverlap = 0 +mathfont.createSquareGlyph(f, verticalArrowCodePoint) +g = f.createChar(-1, "size1") +mathfont.drawRectangleGlyph(g, mathfont.em, v2 / 2, 0) +g = f.createChar(-1, "size2") +mathfont.drawRectangleGlyph(g, mathfont.em, v2, 0) +g = f.createChar(-1, "bot") +mathfont.drawRectangleGlyph(g, mathfont.em, v2 + v1, 0) +g = f.createChar(-1, "ext") +mathfont.drawRectangleGlyph(g, mathfont.em, mathfont.em, 0) +f[verticalArrowCodePoint].verticalVariants = "uni21A8 size1 size2" +# Part: (glyphName, isExtender, startConnector, endConnector, fullAdvance) +f[verticalArrowCodePoint].verticalComponents = \ + (("bot", False, 0, mathfont.em, v2 + v1), ("ext", True, mathfont.em, mathfont.em, mathfont.em)); +mathfont.save(f) |