Skip to content

Commit

Permalink
Some fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
khaledhosny committed Feb 27, 2025
1 parent cbf5a30 commit 8424087
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,14 +667,17 @@ def buildBase(font, instance, vf, args):
underlineThickness=master.customParameters["underlineThickness"] or 0,
)

# Compile to get font bbox
fb.font["head"].compile(fb.font)

codePages = [CODEPAGE_RANGES[v] for v in font.customParameters["codePageRanges"]]
fb.setupOS2(
version=4,
sTypoAscender=master.customParameters["typoAscender"],
sTypoDescender=master.customParameters["typoDescender"],
sTypoLineGap=master.customParameters["typoLineGap"] or 0,
usWinAscent=master.customParameters["winAscent"],
usWinDescent=master.customParameters["winDescent"],
usWinAscent=master.customParameters["winAscent"] or fb.font["head"].yMax,
usWinDescent=master.customParameters["winDescent"] or -fb.font["head"].yMin,
sxHeight=master.xHeight,
sCapHeight=master.capHeight,
achVendID=font.properties["vendorID"],
Expand Down

0 comments on commit 8424087

Please sign in to comment.