10170 Commits

Author SHA1 Message Date
Cosimo Lupo
fc984ff7e7
Merge pull request #2794 from fonttools/gvar-ensure-decompiled
[gvar] be non lazy for TTFont.lazy=False, add ensureDecompiled
2022-08-31 15:13:14 +01:00
Cosimo Lupo
36de9df3cc [gvar] be non lazy for TTFont.lazy=False, add ensureDecompiled
like cmap, or glyf or OTL tables, we need to respect lazy=False flag and decompile everything upfront, also we want to add an ensureDecompiled method (called by TTFont.ensureDecompiled) to allow loading everything in one go even when a font had been opened lazily.
2022-08-31 11:10:50 +01:00
Miguel Sousa
a2efac012c Add warning log 2022-08-30 23:56:03 -07:00
Miguel Sousa
0e9c48e6ab Don't crash when post format 1 is improperly used
Fixes #2736
2022-08-30 09:14:03 -07:00
Just van Rossum
55192edb0c
Merge pull request #2789 from fonttools/varglyphset-refactor
[ttGlyphSet] Refactor/rebuild class hierarchy
2022-08-30 12:49:32 +02:00
Just van Rossum
8fa79f3c68 Use ABC baseclass, instead of ABCMeta metaclass 2022-08-30 12:02:43 +02:00
Just van Rossum
a4f3cb1c98 drawPoints can have an implementation that calls draw using SegmentToPointPen 2022-08-30 12:00:50 +02:00
Just van Rossum
7ae37322cd make _TTGlyph an abstract base class, with draw and drawPoints abstract methods 2022-08-30 11:47:39 +02:00
Just van Rossum
b1441c583b Add test for non-VF exception 2022-08-30 09:26:16 +02:00
Just van Rossum
da539e5c4d use fixture for test font 2022-08-30 08:56:24 +02:00
Just van Rossum
86e4f2bf94 test file for font.normalizeLocation() 2022-08-30 08:49:36 +02:00
Just van Rossum
d2f0611fea test font.normalizeLocation() 2022-08-30 08:49:36 +02:00
Just van Rossum
6ec0177f1f tweak getGlyphSet() doct string, using backticks, and fixing a typo 2022-08-30 08:49:36 +02:00
Just van Rossum
6d2a9904c4 Add TTFont.normalizeLocation() as a public method. 2022-08-30 08:49:36 +02:00
Just van Rossum
cca0faae74 oops, look at 'normalized' flag again 2022-08-30 08:49:36 +02:00
Just van Rossum
0c68a5621a move normalization of location to TTFont 2022-08-30 08:49:36 +02:00
Just van Rossum
42a8d5cbdf no need for if expression 2022-08-30 08:49:36 +02:00
Just van Rossum
7aa4c0fb29 Avoid glyphSetClass variable; reads a little bit better 2022-08-30 08:49:36 +02:00
Just van Rossum
8fb071a403 remove redundant initializer 2022-08-30 08:49:36 +02:00
Just van Rossum
b45d9b014a simplify class selection logic 2022-08-30 08:49:36 +02:00
Just van Rossum
65814c3ccd inline haveCFF condition 2022-08-30 08:49:36 +02:00
Just van Rossum
d5db47e09d minor cleanup 2022-08-30 08:49:36 +02:00
Just van Rossum
b818e1494f Refactor ttGlyphSet.py
- only differentiate between glyf and CFF/CFF2 implementations, not var vs non-var
- use collections.abc.Mapping to get a more consistent dict-like object with less code
- prefer HVAR metrics over gvar metrics
- move some responsibilities from the _TTGlyphSet objects to the _TTGlyph objects
- adjust some tests to the changes
2022-08-30 08:49:36 +02:00
Behdad Esfahbod
c04afbedaf [varLib.interpolatable] Fix naming of varfont masters 2022-08-29 17:08:30 -06:00
Behdad Esfahbod
250cec869e [interpolatable] Compare all masters to first master
Reduces number of errors reported.
2022-08-29 17:03:11 -06:00
Just van Rossum
4abf2ee8c6
Merge pull request #2788 from fonttools/varglyphset-spaces
[ttVarGlyphSet] Convert tabs to spaces
2022-08-29 19:33:23 +02:00
Just van Rossum
8932ab427f Convert tabs to spaces 2022-08-29 19:28:46 +02:00
Just van Rossum
633bc2732f
Merge pull request #2784 from fonttools/varglyphset-cff
[ttVarGlyphSet] Support CFF
2022-08-29 19:26:14 +02:00
Behdad Esfahbod
24bd200b6e [ttGlyphSet-CFF] Cache instancer 2022-08-27 13:32:19 -06:00
Behdad Esfahbod
bcd637bd1a [ttGlyphSet-cff] Remove rounding 2022-08-27 12:20:15 -06:00
Just van Rossum
a2f67b964a
Merge pull request #2785 from fonttools/fontbuilder-empty-cmap
[fontBuilder] don't error when there are zero code points
2022-08-27 10:44:45 +02:00
Just van Rossum
8af6c16b6a don't error when there are zero code points 2022-08-27 10:29:12 +02:00
Behdad Esfahbod
b3d6868516 [ttGlyphSet_test] Test CFF2 variations 2022-08-26 21:42:14 -06:00
Behdad Esfahbod
f5a1d0ba10 [ttVarGlyphSet-CFF] Handle font without advance variation 2022-08-26 21:24:24 -06:00
Behdad Esfahbod
a949380b4a [psCharStrings] Internal var rename 2022-08-26 21:23:04 -06:00
Behdad Esfahbod
9fe1f8c73e [ttVarGlyphSet-cff] Handle non-variable fonts 2022-08-26 21:20:56 -06:00
Behdad Esfahbod
683308abb5 [varGlyphSet-cff] Apply advance width variation 2022-08-26 21:07:10 -06:00
Behdad Esfahbod
4650b8d293 [cff] Store varStore in CharStrings 2022-08-26 21:00:37 -06:00
Behdad Esfahbod
a7cda37fbb [ttVarGlyphSet] Support CFF 2022-08-26 20:52:18 -06:00
Behdad Esfahbod
9cb418cbfc [varLib.plot] Add plotModelFromMasters 2022-08-26 11:17:26 -06:00
Just van Rossum
a32a92e6d7 add custom __init__ in favor of setting .data externally 2022-08-26 10:53:32 -06:00
Just van Rossum
a0af5727e1 Use UserDict for lazy gar variations dict; alternative for #2779 2022-08-26 10:53:32 -06:00
Behdad Esfahbod
4669372b46 [cu2qu.benchmark] Document main() 2022-08-25 14:38:35 -06:00
Behdad Esfahbod
80033bb2a0 [cu2qu] Move benchmark code into cu2qu.benchmark module 2022-08-25 14:37:59 -06:00
Behdad Esfahbod
2d5a3576d1 [varLib.interpolatable] Report index of contour in error message 2022-08-25 14:15:58 -06:00
Just van Rossum
d1f09e4b34
Merge pull request #2778 from fonttools/varglyphset-pointpen
[ttLib] VarGlyphSet: implement drawPoints natively
2022-08-25 19:02:59 +02:00
Just van Rossum
66411c426b address feedback 2022-08-25 16:11:24 +02:00
Just van Rossum
b460afca09 Implement drawPoints natively 2022-08-25 15:21:54 +02:00
Behdad Esfahbod
d5a08b3b96 [Snippets/statShape] Handle empty shapes 2022-08-24 17:08:07 -06:00
Behdad Esfahbod
1500e35b1c [Snippets/statShape] Draw slant line 2022-08-24 16:32:09 -06:00