Skip to content

Commit

Permalink
features: Do not include empty labels
Browse files Browse the repository at this point in the history
  • Loading branch information
m4rc1e committed Jan 9, 2024
1 parent ac74ae0 commit cb523a5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Lib/glyphsLib/builder/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,11 @@ def _to_ufo_features(
# Replace special chars backslash and doublequote for AFDKO syntax
name = name.replace("\\", r"\005c").replace('"', r"\0022")
feature_names = ["featureNames {", f' name "{name}";', "};"]
elif font.format_version == 3 and feature.labels:
elif (
font.format_version == 3
and feature.labels
and all(l["value"] != "" for l in feature.labels)
):
feature_names = []
feature_names.append("featureNames {")
for label in feature.labels:
Expand Down

0 comments on commit cb523a5

Please sign in to comment.