• Home
  • Raw
  • Download

Lines Matching refs:varfont

8 def test_pruningUnusedNames(varfont):  argument
9 varNameIDs = instancer.names.getVariationNameIDs(varfont)
13 fvar = varfont["fvar"]
14 stat = varfont["STAT"].table
16 with instancer.names.pruningUnusedNames(varfont):
22 assert not any(n for n in varfont["name"].names if n.nameID in {256, 258})
24 with instancer.names.pruningUnusedNames(varfont):
25 del varfont["fvar"]
26 del varfont["STAT"]
28 assert not any(n for n in varfont["name"].names if n.nameID in varNameIDs)
29 assert "ltag" not in varfont
32 def _test_name_records(varfont, expected, isNonRIBBI, platforms=[0x409]): argument
33 nametable = varfont["name"]
48 if "fvar" not in varfont:
132 varfont, limits, expected, isNonRIBBI argument
134 instancer.names.updateNameTable(varfont, limits)
135 _test_name_records(varfont, expected, isNonRIBBI)
138 def test_updatetNameTable_axis_order(varfont): argument
155 nametable = varfont["name"]
156 buildStatTable(varfont, axes)
157 instancer.names.updateNameTable(varfont, {"wdth": 75, "wght": 400})
163 buildStatTable(varfont, axes)
164 instancer.names.updateNameTable(varfont, {"wdth": 75, "wght": 400})
204 def test_updateNameTable_with_multilingual_names(varfont, limits, expected, isNonRIBBI): argument
205 name = varfont["name"]
213 instancer.names.updateNameTable(varfont, limits)
214 _test_name_records(varfont, expected, isNonRIBBI, platforms=[0x405])
217 def test_updateNameTable_missing_axisValues(varfont): argument
219 instancer.names.updateNameTable(varfont, {"wght": 200})
222 def test_updateNameTable_missing_stat(varfont): argument
223 del varfont["STAT"]
227 instancer.names.updateNameTable(varfont, {"wght": 400})
258 varfont, limits, expected, isNonRIBBI argument
260 font_link_axisValue = varfont["STAT"].table.AxisValueArray.AxisValue[4]
265 instancer.names.updateNameTable(varfont, limits)
266 _test_name_records(varfont, expected, isNonRIBBI)
269 def test_updateNameTable_format4_axisValues(varfont): argument
271 stat = varfont["STAT"].table
276 varfont["name"].setName("Dominant Value", 297, 3, 1, 0x409)
288 instancer.names.updateNameTable(varfont, {"wdth": 79, "wght": 900})
295 _test_name_records(varfont, expected, isNonRIBBI=True)
298 def test_updateNameTable_elided_axisValues(varfont): argument
299 stat = varfont["STAT"].table
305 instancer.names.updateNameTable(varfont, {"wght": 400})
311 _test_name_records(varfont, expected, isNonRIBBI=True)
314 def test_updateNameTable_existing_subfamily_name_is_not_regular(varfont): argument
318 varfont["name"].setName("Bold", 2, 3, 1, 0x409) # subFamily Regular --> Bold
320 instancer.names.updateNameTable(varfont, {"wght": 100})
322 _test_name_records(varfont, expected, isNonRIBBI=True)