Skip to content

Commit

Permalink
Fix glyph assembly data for axisheight5000-verticalarrow14000.woff (#…
Browse files Browse the repository at this point in the history
…22084)

* Make full advance of the "bot" match the glyph height (19em).
  instead of the incorrect 1em value.
* Force min overlap to be 0 and max part overlap to be 1em, so
  that GlyphAssembly is valid per [1] and the engine has
  flexibility to adjust the overlap in order to match the target
  size.

[1] https://mathml-refresh.github.io/mathml-core/#the-glyphassembly-table
"For each GlyphPartRecord in GlyphAssembly.partRecords, the values of GlyphPartRecord.startConnectorLength and GlyphPartRecord.endConnectorLength must be at least omin. Otherwise, it is not possible to satisfy the condition of MathVariant.minConnectorOverlap."
  • Loading branch information
fred-wang authored Mar 6, 2020
1 parent 6d7f862 commit 73c3225
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Binary file modified fonts/math/axisheight5000-verticalarrow14000.woff
Binary file not shown.
4 changes: 3 additions & 1 deletion mathml/tools/axisheight.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
v2 = 14 * mathfont.em
f = mathfont.create("axisheight%d-verticalarrow%d" % (v1, v2))
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)
Expand All @@ -18,6 +19,7 @@
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, 0, mathfont.em), ("ext", True, 0, 0, mathfont.em));
(("bot", False, 0, mathfont.em, v2 + v1), ("ext", True, mathfont.em, mathfont.em, mathfont.em));
mathfont.save(f)

0 comments on commit 73c3225

Please sign in to comment.