fonttools 4.55.2__cp39-cp39-macosx_10_9_x86_64.whl → 4.55.7__cp39-cp39-macosx_10_9_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fonttools might be problematic. Click here for more details.
- fontTools/__init__.py +1 -1
- fontTools/cu2qu/cu2qu.cpython-39-darwin.so +0 -0
- fontTools/feaLib/ast.py +2 -2
- fontTools/feaLib/builder.py +29 -4
- fontTools/feaLib/lexer.cpython-39-darwin.so +0 -0
- fontTools/misc/bezierTools.c +3256 -2972
- fontTools/misc/bezierTools.cpython-39-darwin.so +0 -0
- fontTools/misc/bezierTools.py +8 -1
- fontTools/misc/transform.py +13 -15
- fontTools/otlLib/builder.py +17 -0
- fontTools/pens/momentsPen.cpython-39-darwin.so +0 -0
- fontTools/pens/statisticsPen.py +5 -0
- fontTools/qu2cu/qu2cu.cpython-39-darwin.so +0 -0
- fontTools/ttLib/tables/B_A_S_E_.py +9 -0
- fontTools/ttLib/tables/C_B_D_T_.py +10 -0
- fontTools/ttLib/tables/C_B_L_C_.py +10 -0
- fontTools/ttLib/tables/C_F_F_.py +15 -0
- fontTools/ttLib/tables/C_F_F__2.py +13 -0
- fontTools/ttLib/tables/C_O_L_R_.py +9 -1
- fontTools/ttLib/tables/C_P_A_L_.py +9 -0
- fontTools/ttLib/tables/D_S_I_G_.py +7 -0
- fontTools/ttLib/tables/E_B_D_T_.py +8 -0
- fontTools/ttLib/tables/E_B_L_C_.py +8 -0
- fontTools/ttLib/tables/F_F_T_M_.py +10 -0
- fontTools/ttLib/tables/F__e_a_t.py +7 -2
- fontTools/ttLib/tables/G_D_E_F_.py +8 -0
- fontTools/ttLib/tables/G_M_A_P_.py +7 -0
- fontTools/ttLib/tables/G_P_K_G_.py +7 -0
- fontTools/ttLib/tables/G_P_O_S_.py +9 -0
- fontTools/ttLib/tables/G_S_U_B_.py +8 -0
- fontTools/ttLib/tables/G__l_a_t.py +3 -2
- fontTools/ttLib/tables/G__l_o_c.py +3 -2
- fontTools/ttLib/tables/H_V_A_R_.py +8 -0
- fontTools/ttLib/tables/J_S_T_F_.py +8 -0
- fontTools/ttLib/tables/L_T_S_H_.py +10 -0
- fontTools/ttLib/tables/M_A_T_H_.py +8 -0
- fontTools/ttLib/tables/M_E_T_A_.py +7 -0
- fontTools/ttLib/tables/M_V_A_R_.py +8 -0
- fontTools/ttLib/tables/O_S_2f_2.py +8 -1
- fontTools/ttLib/tables/S_I_N_G_.py +7 -0
- fontTools/ttLib/tables/S_T_A_T_.py +10 -0
- fontTools/ttLib/tables/S_V_G_.py +8 -0
- fontTools/ttLib/tables/S__i_l_f.py +4 -1
- fontTools/ttLib/tables/S__i_l_l.py +5 -0
- fontTools/ttLib/tables/T_S_I_B_.py +8 -0
- fontTools/ttLib/tables/T_S_I_C_.py +9 -0
- fontTools/ttLib/tables/T_S_I_D_.py +8 -0
- fontTools/ttLib/tables/T_S_I_J_.py +8 -0
- fontTools/ttLib/tables/T_S_I_P_.py +8 -0
- fontTools/ttLib/tables/T_S_I_S_.py +8 -0
- fontTools/ttLib/tables/T_S_I_V_.py +6 -0
- fontTools/ttLib/tables/T_S_I__0.py +2 -0
- fontTools/ttLib/tables/T_S_I__1.py +2 -0
- fontTools/ttLib/tables/T_S_I__2.py +2 -0
- fontTools/ttLib/tables/T_S_I__3.py +2 -0
- fontTools/ttLib/tables/T_S_I__5.py +2 -0
- fontTools/ttLib/tables/T_T_F_A_.py +9 -0
- fontTools/ttLib/tables/V_A_R_C_.py +7 -0
- fontTools/ttLib/tables/V_D_M_X_.py +8 -0
- fontTools/ttLib/tables/V_O_R_G_.py +8 -1
- fontTools/ttLib/tables/V_V_A_R_.py +8 -0
- fontTools/ttLib/tables/_a_n_k_r.py +3 -2
- fontTools/ttLib/tables/_a_v_a_r.py +3 -1
- fontTools/ttLib/tables/_b_s_l_n.py +9 -0
- fontTools/ttLib/tables/_c_i_d_g.py +7 -2
- fontTools/ttLib/tables/_c_m_a_p.py +2 -0
- fontTools/ttLib/tables/_c_v_a_r.py +8 -0
- fontTools/ttLib/tables/_c_v_t.py +8 -0
- fontTools/ttLib/tables/_f_e_a_t.py +7 -4
- fontTools/ttLib/tables/_f_p_g_m.py +11 -0
- fontTools/ttLib/tables/_f_v_a_r.py +8 -0
- fontTools/ttLib/tables/_g_a_s_p.py +8 -0
- fontTools/ttLib/tables/_g_c_i_d.py +7 -0
- fontTools/ttLib/tables/_g_l_y_f.py +31 -7
- fontTools/ttLib/tables/_g_v_a_r.py +11 -3
- fontTools/ttLib/tables/_h_d_m_x.py +8 -0
- fontTools/ttLib/tables/_h_e_a_d.py +7 -0
- fontTools/ttLib/tables/_h_h_e_a.py +12 -0
- fontTools/ttLib/tables/_h_m_t_x.py +9 -0
- fontTools/ttLib/tables/_k_e_r_n.py +11 -0
- fontTools/ttLib/tables/_l_c_a_r.py +8 -0
- fontTools/ttLib/tables/_l_o_c_a.py +8 -0
- fontTools/ttLib/tables/_l_t_a_g.py +8 -0
- fontTools/ttLib/tables/_m_a_x_p.py +8 -0
- fontTools/ttLib/tables/_m_e_t_a.py +8 -0
- fontTools/ttLib/tables/_m_o_r_t.py +8 -0
- fontTools/ttLib/tables/_m_o_r_x.py +9 -0
- fontTools/ttLib/tables/_n_a_m_e.py +15 -13
- fontTools/ttLib/tables/_o_p_b_d.py +8 -0
- fontTools/ttLib/tables/_p_o_s_t.py +9 -0
- fontTools/ttLib/tables/_p_r_e_p.py +9 -0
- fontTools/ttLib/tables/_p_r_o_p.py +6 -0
- fontTools/ttLib/tables/_s_b_i_x.py +10 -0
- fontTools/ttLib/tables/_t_r_a_k.py +7 -0
- fontTools/ttLib/tables/_v_h_e_a.py +12 -0
- fontTools/ttLib/tables/_v_m_t_x.py +9 -0
- fontTools/varLib/iup.cpython-39-darwin.so +0 -0
- {fonttools-4.55.2.dist-info → fonttools-4.55.7.dist-info}/METADATA +46 -1383
- {fonttools-4.55.2.dist-info → fonttools-4.55.7.dist-info}/RECORD +104 -104
- {fonttools-4.55.2.dist-info → fonttools-4.55.7.dist-info}/WHEEL +1 -1
- {fonttools-4.55.2.data → fonttools-4.55.7.data}/data/share/man/man1/ttx.1 +0 -0
- {fonttools-4.55.2.dist-info → fonttools-4.55.7.dist-info}/LICENSE +0 -0
- {fonttools-4.55.2.dist-info → fonttools-4.55.7.dist-info}/entry_points.txt +0 -0
- {fonttools-4.55.2.dist-info → fonttools-4.55.7.dist-info}/top_level.txt +0 -0
fontTools/__init__.py
CHANGED
|
Binary file
|
fontTools/feaLib/ast.py
CHANGED
|
@@ -595,8 +595,8 @@ class MarkClassDefinition(Statement):
|
|
|
595
595
|
class AlternateSubstStatement(Statement):
|
|
596
596
|
"""A ``sub ... from ...`` statement.
|
|
597
597
|
|
|
598
|
-
``
|
|
599
|
-
|
|
598
|
+
``glyph`` and ``replacement`` should be `glyph-containing objects`_.
|
|
599
|
+
``prefix`` and ``suffix`` should be lists of `glyph-containing objects`_."""
|
|
600
600
|
|
|
601
601
|
def __init__(self, prefix, glyph, suffix, replacement, location=None):
|
|
602
602
|
Statement.__init__(self, location)
|
fontTools/feaLib/builder.py
CHANGED
|
@@ -1106,7 +1106,13 @@ class Builder(object):
|
|
|
1106
1106
|
if (language == "dflt" or include_default) and lookups:
|
|
1107
1107
|
self.features_[key] = lookups[:]
|
|
1108
1108
|
else:
|
|
1109
|
-
|
|
1109
|
+
# if we aren't including default we need to manually remove the
|
|
1110
|
+
# default lookups, which were added to all declared langsystems
|
|
1111
|
+
# as they were encountered (we don't remove all lookups because
|
|
1112
|
+
# we want to allow duplicate script/lang statements;
|
|
1113
|
+
# see https://github.com/fonttools/fonttools/issues/3748
|
|
1114
|
+
cur_lookups = self.features_.get(key, [])
|
|
1115
|
+
self.features_[key] = [x for x in cur_lookups if x not in lookups]
|
|
1110
1116
|
self.language_systems = frozenset([(self.script_, language)])
|
|
1111
1117
|
|
|
1112
1118
|
if required:
|
|
@@ -1328,9 +1334,10 @@ class Builder(object):
|
|
|
1328
1334
|
self, location, prefix, glyphs, suffix, replacement, forceChain
|
|
1329
1335
|
):
|
|
1330
1336
|
if prefix or suffix or forceChain:
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1337
|
+
self.add_ligature_subst_chained_(
|
|
1338
|
+
location, prefix, glyphs, suffix, replacement
|
|
1339
|
+
)
|
|
1340
|
+
return
|
|
1334
1341
|
else:
|
|
1335
1342
|
lookup = self.get_lookup_(location, LigatureSubstBuilder)
|
|
1336
1343
|
|
|
@@ -1387,6 +1394,24 @@ class Builder(object):
|
|
|
1387
1394
|
sub.mapping[glyph] = replacements
|
|
1388
1395
|
chain.rules.append(ChainContextualRule(prefix, [{glyph}], suffix, [sub]))
|
|
1389
1396
|
|
|
1397
|
+
def add_ligature_subst_chained_(
|
|
1398
|
+
self, location, prefix, glyphs, suffix, replacement
|
|
1399
|
+
):
|
|
1400
|
+
# https://github.com/fonttools/fonttools/issues/3701
|
|
1401
|
+
if not all(prefix) or not all(suffix):
|
|
1402
|
+
raise FeatureLibError(
|
|
1403
|
+
"Empty glyph class in contextual substitution", location
|
|
1404
|
+
)
|
|
1405
|
+
chain = self.get_lookup_(location, ChainContextSubstBuilder)
|
|
1406
|
+
sub = chain.find_chainable_ligature_subst(glyphs, replacement)
|
|
1407
|
+
if sub is None:
|
|
1408
|
+
sub = self.get_chained_lookup_(location, LigatureSubstBuilder)
|
|
1409
|
+
|
|
1410
|
+
for g in itertools.product(*glyphs):
|
|
1411
|
+
sub.ligatures[g] = replacement
|
|
1412
|
+
|
|
1413
|
+
chain.rules.append(ChainContextualRule(prefix, glyphs, suffix, [sub]))
|
|
1414
|
+
|
|
1390
1415
|
# GSUB 8
|
|
1391
1416
|
def add_reverse_chain_single_subst(self, location, old_prefix, old_suffix, mapping):
|
|
1392
1417
|
if not mapping:
|
|
Binary file
|