Skip to content

Commit f7ce7f7

Browse files
authored
Merge pull request #1113 from googlefonts/fontc-decompose-components
[fontc] turn fontmake's --filter DecomposeComponents into fontc's --decompose-components
2 parents 6727b47 + ca10bdc commit f7ce7f7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Lib/gftools/builder/operations/fontc/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ def rewrite_one_arg(args: List[str]) -> str:
4848
return "--flatten-components"
4949
elif filter_ == "DecomposeTransformedComponentsFilter":
5050
return "--decompose-transformed-components"
51+
elif "DecomposeComponentsFilter" in filter_:
52+
# this is sometimes spelled with the full qualified path name as
53+
# --filter "ufo2ft.filters.decomposeComponents::DecomposeComponentsFilter"
54+
# e.g. in Jaquard12.glyphs so we use `in` instead of `filter_ == ...`
55+
return "--decompose-components"
5156
else:
5257
# glue the filter back together for better reporting below
5358
next_ = f"{next_} {filter_}"

0 commit comments

Comments
 (0)