Merge pull request #3317 from fonttools/instantiate-avgcharwidth

Recalc avgcharwidth after instancing
This commit is contained in:
Cosimo Lupo 2023-11-03 10:12:07 +00:00 committed by GitHub
commit 74da89beeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 9 additions and 6 deletions

View File

@ -1287,6 +1287,9 @@ def instantiateVariableFont(
ignoreErrors=(overlap == OverlapMode.REMOVE_AND_IGNORE_ERRORS),
)
if "OS/2" in varfont:
varfont["OS/2"].recalcAvgCharWidth(varfont)
varLib.set_default_weight_width_slant(
varfont, location=axisLimits.defaultLocation()
)

View File

@ -74,7 +74,7 @@
<!-- The fields 'usFirstCharIndex' and 'usLastCharIndex'
will be recalculated by the compiler -->
<version value="4"/>
<xAvgCharWidth value="577"/>
<xAvgCharWidth value="502"/>
<usWeightClass value="100"/>
<usWidthClass value="5"/>
<fsType value="00000000 00000000"/>

View File

@ -74,7 +74,7 @@
<!-- The fields 'usFirstCharIndex' and 'usLastCharIndex'
will be recalculated by the compiler -->
<version value="4"/>
<xAvgCharWidth value="577"/>
<xAvgCharWidth value="383"/>
<usWeightClass value="100"/>
<usWidthClass value="2"/>
<fsType value="00000000 00000000"/>

View File

@ -74,7 +74,7 @@
<!-- The fields 'usFirstCharIndex' and 'usLastCharIndex'
will be recalculated by the compiler -->
<version value="4"/>
<xAvgCharWidth value="577"/>
<xAvgCharWidth value="543"/>
<usWeightClass value="400"/>
<usWidthClass value="5"/>
<fsType value="00000000 00000000"/>

View File

@ -74,7 +74,7 @@
<!-- The fields 'usFirstCharIndex' and 'usLastCharIndex'
will be recalculated by the compiler -->
<version value="4"/>
<xAvgCharWidth value="577"/>
<xAvgCharWidth value="428"/>
<usWeightClass value="400"/>
<usWidthClass value="2"/>
<fsType value="00000000 00000000"/>

View File

@ -74,7 +74,7 @@
<!-- The fields 'usFirstCharIndex' and 'usLastCharIndex'
will be recalculated by the compiler -->
<version value="4"/>
<xAvgCharWidth value="577"/>
<xAvgCharWidth value="609"/>
<usWeightClass value="900"/>
<usWidthClass value="5"/>
<fsType value="00000000 00000000"/>

View File

@ -74,7 +74,7 @@
<!-- The fields 'usFirstCharIndex' and 'usLastCharIndex'
will be recalculated by the compiler -->
<version value="4"/>
<xAvgCharWidth value="577"/>
<xAvgCharWidth value="506"/>
<usWeightClass value="900"/>
<usWidthClass value="2"/>
<fsType value="00000000 00000000"/>