use 0 for sidebearing sparse metrics sentinel
font sources only allow to specify advances, the sidebearings are computed. Makes more sense for the sparse metrics to have 0 for the sidebearings as the glyph that's meant to be 'sparse' is most likely empty with no outlines
This commit is contained in:
parent
ecfc5eeeb7
commit
48ae9cbf1c
@ -563,11 +563,11 @@ def _get_advance_metrics(
|
||||
):
|
||||
vhAdvanceDeltasAndSupports = {}
|
||||
vOrigDeltasAndSupports = {}
|
||||
# HACK: we treat width 65535 and lsb -32768 as sentinel values to signal that a
|
||||
# glyph from a non-default master should not participate in computing {H,V}VAR,
|
||||
# HACK: we treat width 65535 and lsb 0 as sentinel values to signal that a glyph
|
||||
# from a non-default master should not participate in computing {H,V}VAR,
|
||||
# as if it were missing. Allows to variate other glyph-related data independently
|
||||
# from glyph metrics
|
||||
sparse_metrics = (0xFFFF, -0x8000)
|
||||
sparse_metrics = (0xFFFF, 0)
|
||||
for glyph in glyphOrder:
|
||||
vhAdvances = [
|
||||
metrics[glyph][0]
|
||||
|
@ -93,7 +93,7 @@
|
||||
</CFF>
|
||||
|
||||
<hmtx>
|
||||
<mtx name=".notdef" width="65535" lsb="-32768"/>
|
||||
<mtx name=".notdef" width="65535" lsb="0"/>
|
||||
<mtx name="e" width="600" lsb="40"/>
|
||||
</hmtx>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user