From 0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:47:29 +0200 Subject: Adding upstream version 115.8.0esr. Signed-off-by: Daniel Baumann --- .../web-platform/tests/mathml/tools/fractions.py | 163 +++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100755 testing/web-platform/tests/mathml/tools/fractions.py (limited to 'testing/web-platform/tests/mathml/tools/fractions.py') diff --git a/testing/web-platform/tests/mathml/tools/fractions.py b/testing/web-platform/tests/mathml/tools/fractions.py new file mode 100755 index 0000000000..bd39fc2fdb --- /dev/null +++ b/testing/web-platform/tests/mathml/tools/fractions.py @@ -0,0 +1,163 @@ +#!/usr/bin/env python3 + +from utils import mathfont +import fontforge + +v1 = 7 * mathfont.em +v2 = 1 * mathfont.em +f = mathfont.create("fraction-axisheight%d-rulethickness%d" % (v1, v2), + "Copyright (c) 2016 MathML Association") +f.math.AxisHeight = v1 +f.math.FractionDenominatorDisplayStyleGapMin = 0 +f.math.FractionDenominatorDisplayStyleShiftDown = 0 +f.math.FractionDenominatorGapMin = 0 +f.math.FractionDenominatorShiftDown = 0 +f.math.FractionNumeratorDisplayStyleGapMin = 0 +f.math.FractionNumeratorDisplayStyleShiftUp = 0 +f.math.FractionNumeratorGapMin = 0 +f.math.FractionNumeratorShiftUp = 0 +f.math.FractionRuleThickness = v2 +mathfont.save(f) + +v1 = 5 * mathfont.em +v2 = 1 * mathfont.em +f = mathfont.create("fraction-denominatordisplaystylegapmin%d-rulethickness%d" % (v1, v2), + "Copyright (c) 2016 MathML Association") +f.math.AxisHeight = 0 +f.math.FractionDenominatorDisplayStyleGapMin = v1 +f.math.FractionDenominatorDisplayStyleShiftDown = 0 +f.math.FractionDenominatorGapMin = 0 +f.math.FractionDenominatorShiftDown = 0 +f.math.FractionNumeratorDisplayStyleGapMin = 0 +f.math.FractionNumeratorDisplayStyleShiftUp = 0 +f.math.FractionNumeratorGapMin = 0 +f.math.FractionNumeratorShiftUp = 0 +f.math.FractionRuleThickness = v2 +mathfont.save(f) + +v1 = 6 * mathfont.em +v2 = 1 * mathfont.em +f = mathfont.create("fraction-denominatordisplaystyleshiftdown%d-axisheight%d-rulethickness%d" % (v1, v2, v2), + "Copyright (c) 2016 MathML Association") +f.math.AxisHeight = v2 +f.math.FractionDenominatorDisplayStyleGapMin = 0 +f.math.FractionDenominatorDisplayStyleShiftDown = v1 +f.math.FractionDenominatorGapMin = 0 +f.math.FractionDenominatorShiftDown = 0 +f.math.FractionNumeratorDisplayStyleGapMin = 0 +f.math.FractionNumeratorDisplayStyleShiftUp = 0 +f.math.FractionNumeratorGapMin = 0 +f.math.FractionNumeratorShiftUp = 0 +f.math.FractionRuleThickness = v2 +mathfont.save(f) + +v1 = 4 * mathfont.em +v2 = 1 * mathfont.em +f = mathfont.create("fraction-denominatorgapmin%d-rulethickness%d" % (v1, v2), + "Copyright (c) 2016 MathML Association") +f.math.AxisHeight = 0 +f.math.FractionDenominatorDisplayStyleGapMin = 0 +f.math.FractionDenominatorDisplayStyleShiftDown = 0 +f.math.FractionDenominatorGapMin = v1 +f.math.FractionDenominatorShiftDown = 0 +f.math.FractionNumeratorDisplayStyleGapMin = 0 +f.math.FractionNumeratorDisplayStyleShiftUp = 0 +f.math.FractionNumeratorGapMin = 0 +f.math.FractionNumeratorShiftUp = 0 +f.math.FractionRuleThickness = v2 +mathfont.save(f) + +v1 = 3 * mathfont.em +v2 = 1 * mathfont.em +f = mathfont.create("fraction-denominatorshiftdown%d-axisheight%d-rulethickness%d" % (v1, v2, v2), + "Copyright (c) 2016 MathML Association") +f.math.AxisHeight = v2 +f.math.FractionDenominatorDisplayStyleGapMin = 0 +f.math.FractionDenominatorDisplayStyleShiftDown = 0 +f.math.FractionDenominatorGapMin = 0 +f.math.FractionDenominatorShiftDown = v1 +f.math.FractionNumeratorDisplayStyleGapMin = 0 +f.math.FractionNumeratorDisplayStyleShiftUp = 0 +f.math.FractionNumeratorGapMin = 0 +f.math.FractionNumeratorShiftUp = 0 +f.math.FractionRuleThickness = v2 +mathfont.save(f) + +v1 = 8 * mathfont.em +v2 = 1 * mathfont.em +f = mathfont.create("fraction-numeratordisplaystylegapmin%d-rulethickness%d" % (v1, v2), + "Copyright (c) 2016 MathML Association") +f.math.AxisHeight = 0 +f.math.FractionDenominatorDisplayStyleGapMin = 0 +f.math.FractionDenominatorDisplayStyleShiftDown = 0 +f.math.FractionDenominatorGapMin = 0 +f.math.FractionDenominatorShiftDown = 0 +f.math.FractionNumeratorDisplayStyleGapMin = v1 +f.math.FractionNumeratorDisplayStyleShiftUp = 0 +f.math.FractionNumeratorGapMin = 0 +f.math.FractionNumeratorShiftUp = 0 +f.math.FractionRuleThickness = v2 +mathfont.save(f) + +v1 = 2 * mathfont.em +v2 = 1 * mathfont.em +f = mathfont.create("fraction-numeratordisplaystyleshiftup%d-axisheight%d-rulethickness%d" % (v1, v2, v2), + "Copyright (c) 2016 MathML Association") +f.math.AxisHeight = v2 +f.math.FractionDenominatorDisplayStyleGapMin = 0 +f.math.FractionDenominatorDisplayStyleShiftDown = 0 +f.math.FractionDenominatorGapMin = 0 +f.math.FractionDenominatorShiftDown = 0 +f.math.FractionNumeratorDisplayStyleGapMin = 0 +f.math.FractionNumeratorDisplayStyleShiftUp = v1 +f.math.FractionNumeratorGapMin = 0 +f.math.FractionNumeratorShiftUp = 0 +f.math.FractionRuleThickness = v2 +mathfont.save(f) + +v1 = 9 * mathfont.em +v2 = 1 * mathfont.em +f = mathfont.create("fraction-numeratorgapmin%d-rulethickness%d" % (v1, v2), + "Copyright (c) 2016 MathML Association") +f.math.AxisHeight = 0 +f.math.FractionDenominatorDisplayStyleGapMin = 0 +f.math.FractionDenominatorDisplayStyleShiftDown = 0 +f.math.FractionDenominatorGapMin = 0 +f.math.FractionDenominatorShiftDown = 0 +f.math.FractionNumeratorDisplayStyleGapMin = 0 +f.math.FractionNumeratorDisplayStyleShiftUp = 0 +f.math.FractionNumeratorGapMin = v1 +f.math.FractionNumeratorShiftUp = 0 +f.math.FractionRuleThickness = v2 +mathfont.save(f) + +v1 = 11 * mathfont.em +v2 = 1 * mathfont.em +f = mathfont.create("fraction-numeratorshiftup%d-axisheight%d-rulethickness%d" % (v1, v2, v2), + "Copyright (c) 2016 MathML Association") +f.math.AxisHeight = v2 +f.math.FractionDenominatorDisplayStyleGapMin = 0 +f.math.FractionDenominatorDisplayStyleShiftDown = 0 +f.math.FractionDenominatorGapMin = 0 +f.math.FractionDenominatorShiftDown = 0 +f.math.FractionNumeratorDisplayStyleGapMin = 0 +f.math.FractionNumeratorDisplayStyleShiftUp = 0 +f.math.FractionNumeratorGapMin = 0 +f.math.FractionNumeratorShiftUp = v1 +f.math.FractionRuleThickness = v2 +mathfont.save(f) + +v1 = 10 * mathfont.em +f = mathfont.create("fraction-rulethickness%d" % v1, + "Copyright (c) 2016 MathML Association") +f.math.AxisHeight = 0 +f.math.FractionDenominatorDisplayStyleGapMin = 0 +f.math.FractionDenominatorDisplayStyleShiftDown = 0 +f.math.FractionDenominatorGapMin = 0 +f.math.FractionDenominatorShiftDown = 0 +f.math.FractionNumeratorDisplayStyleGapMin = 0 +f.math.FractionNumeratorDisplayStyleShiftUp = 0 +f.math.FractionNumeratorGapMin = 0 +f.math.FractionNumeratorShiftUp = 0 +f.math.FractionRuleThickness = v1 +mathfont.save(f) -- cgit v1.2.3