Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

PR: Preserves timestamp, bboxes, and table order for faithful to original and reproducible font updating #190

Merged
merged 1 commit into from
Dec 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions setupbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def rename_font(font_path, font_name):
Font renaming code originally from:
https://github.com/chrissimpkins/fontname.py/blob/master/fontname.py
"""
tt = ttLib.TTFont(font_path)
tt = ttLib.TTFont(font_path, recalcBBoxes=False, recalcTimestamp=False)
namerecord_list = tt["name"].names
variant = ""

Expand Down Expand Up @@ -68,7 +68,7 @@ def rename_font(font_path, font_name):

# write changes to the font file
try:
tt.save(font_path)
tt.save(font_path, reorderTables=False)
except:
raise RuntimeError(
f"ERROR: unable to write new name to OpenType tables for: {font_path}")
Expand Down