@@ -372,6 +372,7 @@ def build_variable_fonts(
372
372
flatten_components = False ,
373
373
filters = None ,
374
374
auto_use_my_metrics = True ,
375
+ drop_implied_oncurves = False ,
375
376
** kwargs ,
376
377
):
377
378
"""Build OpenType variable fonts from masters in a designspace."""
@@ -434,6 +435,7 @@ def build_variable_fonts(
434
435
inplace = True ,
435
436
variableFontNames = list (vf_name_to_output_path ),
436
437
autoUseMyMetrics = auto_use_my_metrics ,
438
+ dropImpliedOnCurves = drop_implied_oncurves ,
437
439
)
438
440
else :
439
441
fonts = ufo2ft .compileVariableCFF2s (
@@ -466,6 +468,7 @@ def _iter_compile(self, ufos, ttf=False, debugFeatureFile=None, **kwargs):
466
468
"reverseDirection" ,
467
469
"flattenComponents" ,
468
470
"autoUseMyMetrics" ,
471
+ "dropImpliedOnCurves" ,
469
472
):
470
473
options .pop (key , None )
471
474
compile_func , fmt = ufo2ft .compileOTF , "OTF"
@@ -513,6 +516,7 @@ def save_otfs(
513
516
generate_GDEF = True ,
514
517
fea_include_dir = None ,
515
518
auto_use_my_metrics = True ,
519
+ drop_implied_oncurves = False ,
516
520
):
517
521
"""Build OpenType binaries from UFOs.
518
522
@@ -570,6 +574,8 @@ def save_otfs(
570
574
be disabled with other arguments.
571
575
auto_use_my_metrics: whether to automatically set USE_MY_METRICS glyf
572
576
component flags (0x0200). Not needed unless the font has hinted metrics.
577
+ drop_implied_oncurves: drop on-curve points that can be implied when exactly
578
+ in the middle of two off-curve points (TrueType only; default: False).
573
579
""" # noqa: B950
574
580
assert not (output_path and output_dir ), "mutually exclusive args"
575
581
@@ -624,6 +630,7 @@ def save_otfs(
624
630
flattenComponents = flatten_components ,
625
631
filters = filters ,
626
632
autoUseMyMetrics = auto_use_my_metrics ,
633
+ dropImpliedOnCurves = drop_implied_oncurves ,
627
634
inplace = True , # avoid extra copy
628
635
)
629
636
0 commit comments