Skip to content

Commit

Permalink
[shaping] Don’t write out variations for default instance
Browse files Browse the repository at this point in the history
Less noise.
  • Loading branch information
khaledhosny committed Nov 24, 2024
1 parent 79141df commit 558aa9f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Lib/alifTools/shaping/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,13 @@ def update_shaping_output(
for text in input["text"]:
if face.has_var_data and "variations" not in input:
axis_tags = [axis.tag for axis in face.axis_infos]
default_coords = [axis.default_value for axis in face.axis_infos]
for instance in face.named_instances:
instance_input = input.copy()
instance_input["variations"] = dict(
zip(axis_tags, instance.design_coords)
)
if instance.design_coords != default_coords:
instance_input["variations"] = dict(
zip(axis_tags, instance.design_coords)
)
run = shape_run(
font,
font_path,
Expand Down

0 comments on commit 558aa9f

Please sign in to comment.