From 2d529fb49b93b83dde45f748a3d67a062b5635e2 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 6 Feb 2024 15:42:21 -0700 Subject: [PATCH] Newer black --- Lib/fontTools/ttLib/tables/otConverters.py | 6 +----- Lib/fontTools/varLib/instancer/__init__.py | 8 +++++--- Lib/fontTools/varLib/mutator.py | 14 ++++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Lib/fontTools/ttLib/tables/otConverters.py b/Lib/fontTools/ttLib/tables/otConverters.py index 3ef6cf766a..d214938bc7 100644 --- a/Lib/fontTools/ttLib/tables/otConverters.py +++ b/Lib/fontTools/ttLib/tables/otConverters.py @@ -1928,11 +1928,7 @@ def write(self, writer, font, tableDict, values, repeatIndex=None): offSize = ( 1 if lastOffset < 0x100 - else 2 - if lastOffset < 0x10000 - else 3 - if lastOffset < 0x1000000 - else 4 + else 2 if lastOffset < 0x10000 else 3 if lastOffset < 0x1000000 else 4 ) writer.writeUInt8(offSize) diff --git a/Lib/fontTools/varLib/instancer/__init__.py b/Lib/fontTools/varLib/instancer/__init__.py index 93cea926cd..256023c79e 100644 --- a/Lib/fontTools/varLib/instancer/__init__.py +++ b/Lib/fontTools/varLib/instancer/__init__.py @@ -668,9 +668,11 @@ def instantiateGvar(varfont, axisLimits, optimize=True): glyphnames = sorted( glyf.glyphOrder, key=lambda name: ( - glyf[name].getCompositeMaxpValues(glyf).maxComponentDepth - if glyf[name].isComposite() - else 0, + ( + glyf[name].getCompositeMaxpValues(glyf).maxComponentDepth + if glyf[name].isComposite() + else 0 + ), name, ), ) diff --git a/Lib/fontTools/varLib/mutator.py b/Lib/fontTools/varLib/mutator.py index ae848cc4e8..6c327f9454 100644 --- a/Lib/fontTools/varLib/mutator.py +++ b/Lib/fontTools/varLib/mutator.py @@ -199,9 +199,11 @@ def instantiateVariableFont(varfont, location, inplace=False, overlap=True): glyphnames = sorted( gvar.variations.keys(), key=lambda name: ( - glyf[name].getCompositeMaxpValues(glyf).maxComponentDepth - if glyf[name].isComposite() - else 0, + ( + glyf[name].getCompositeMaxpValues(glyf).maxComponentDepth + if glyf[name].isComposite() + else 0 + ), name, ), ) @@ -305,9 +307,9 @@ def instantiateVariableFont(varfont, location, inplace=False, overlap=True): if applies: assert record.FeatureTableSubstitution.Version == 0x00010000 for rec in record.FeatureTableSubstitution.SubstitutionRecord: - table.FeatureList.FeatureRecord[ - rec.FeatureIndex - ].Feature = rec.Feature + table.FeatureList.FeatureRecord[rec.FeatureIndex].Feature = ( + rec.Feature + ) break del table.FeatureVariations