Skip to content

Commit

Permalink
Merge pull request #371 from arrowtype/improve-code-metadata
Browse files Browse the repository at this point in the history
update code font generator & build fonts to resolve issue #370
  • Loading branch information
arrowtype authored Aug 4, 2020
2 parents ca4b798 + a9dc0a4 commit 88513e6
Show file tree
Hide file tree
Showing 17 changed files with 18 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
18 changes: 18 additions & 0 deletions src/build-scripts/make-release/instantiate-code-fonts.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,14 +283,32 @@ def splitFont(
# make dir for new fonts
pathlib.Path(outputSubDir).mkdir(parents=True, exist_ok=True)

# -------------------------------------------------------
# OpenType Table fixes

# drop STAT table to allow RIBBI style naming & linking on Windows
del instanceFont["STAT"]

# In the post table, isFixedPitched flag must be set in the code fonts
instanceFont['post'].isFixedPitch = 1

# In the OS/2 table Panose bProportion must be set to 9
instanceFont["OS/2"].panose.bProportion = 9

# Also in the OS/2 table, xAvgCharWidth should be set to 600 rather than 612 (612 is an average of glyphs in the "Mono" files which include wide ligatures).
instanceFont["OS/2"].xAvgCharWidth = 600

# -------------------------------------------------------
# save instance font

outputPath = f"{outputSubDir}/{newFileName}"

# save font
instanceFont.save(outputPath)

# -------------------------------------------------------
# Code font special stuff in post processing

# freeze in rvrn features with pyftfeatfreeze: serifless 'f', unambiguous 'l', '6', '9'
pyftfeatfreeze.main(["--features=rvrn,ss03,ss05,ss07,ss09", outputPath, outputPath])

Expand Down

0 comments on commit 88513e6

Please sign in to comment.