Skip to content

Commit

Permalink
Merge pull request #663 from m4rc1e/b-gen-stat
Browse files Browse the repository at this point in the history
builder: gen stat tables after post processing fonts
  • Loading branch information
m4rc1e authored Mar 3, 2023
2 parents e85644d + 71fba6e commit 6af0296
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Lib/gftools/builder/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,13 +337,13 @@ def build_variable(self):
if not ttFonts:
return

self.gen_stat(ttFonts)
# We post process each variable font after generating the STAT tables
# because these tables are needed in order to fix the name tables.
for ttFont in ttFonts:
self.post_process_variable(ttFont.reader.file.name)
self.outputs.add(ttFont.reader.file.name)

ttFonts = [TTFont(f.reader.file.name) for f in ttFonts]
self.gen_stat(ttFonts)

def run_fontmake(self, source, args):
if "output_dir" in args:
original_output_dir = args["output_dir"]
Expand Down
6 changes: 6 additions & 0 deletions Lib/gftools/fix.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,12 @@ def fix_colr_font(ttfont: TTFont) -> TTFont:
raise NotImplementedError(f"COLR version '{colr_version}' not supported.")


def fix_nbspace_glyph(ttfont: TTFont):
cmap = ttfont.getBestCmap()
if 0x00A0 in cmap:
return


def fix_font(font, include_source_fixes=False, new_family_name=None, fvar_instance_axis_dflts=None):
fixed_font = deepcopy(font)
if new_family_name:
Expand Down

0 comments on commit 6af0296

Please sign in to comment.