Skip to content

Commit

Permalink
Merge pull request #1081 from googlefonts/remove-instantiator
Browse files Browse the repository at this point in the history
replace fontmake.instantiator with ufo2ft.instantiator
  • Loading branch information
anthrotype authored Mar 26, 2024
2 parents 42a4601 + d001d8d commit 8305773
Show file tree
Hide file tree
Showing 6 changed files with 1,709 additions and 818 deletions.
7 changes: 3 additions & 4 deletions Lib/fontmake/font_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

from __future__ import annotations

import dataclasses
import enum
import glob
import logging
Expand All @@ -26,7 +27,6 @@
from pathlib import Path
from re import fullmatch

import attr
import ufo2ft
import ufo2ft.errors
import ufoLib2
Expand All @@ -37,13 +37,12 @@
from fontTools.misc.plistlib import load as readPlist
from fontTools.ttLib import TTFont
from fontTools.varLib.interpolate_layout import interpolate_layout
from ufo2ft import CFFOptimization
from ufo2ft import CFFOptimization, instantiator
from ufo2ft.featureCompiler import parseLayoutFeatures
from ufo2ft.featureWriters import FEATURE_WRITERS_KEY, loadFeatureWriters
from ufo2ft.filters import FILTERS_KEY, loadFilters
from ufo2ft.util import makeOfficialGlyphOrder

from fontmake import instantiator
from fontmake.compatibility import CompatibilityChecker
from fontmake.errors import FontmakeError, TTFAError
from fontmake.ttfautohint import ttfautohint
Expand Down Expand Up @@ -1021,7 +1020,7 @@ def interpolate_instance_ufos(
fea_txt = parseLayoutFeatures(
subDoc.default.font, includeDir=fea_include_dir
).asFea()
generator = attr.evolve(generator, copy_feature_text=fea_txt)
generator = dataclasses.replace(generator, copy_feature_text=fea_txt)

for instance in subDoc.instances:
# Skip instances that have been set to non-export in Glyphs, stored as the
Expand Down
Loading

0 comments on commit 8305773

Please sign in to comment.