31 Commits

Author SHA1 Message Date
Behdad Esfahbod
b85d1c7d35 [ttGlyphSet] Draw VarComposite glyphs
Still some bugs there.
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
1c8741a2ca [glyf/VarComponent] Add setCoordinates 2023-01-30 11:26:20 -07:00
Behdad Esfahbod
8a2e918bae [glyf] Black 2023-01-30 11:26:20 -07:00
Just van Rossum
d0f4133df0 Fix arguments in calls to (glyf) glyph.draw() and glyph.drawPoints(); this fix also exposed a second bug, where lsb and tsb were not set; this fixes #2824 2022-09-20 09:00:35 +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
6d2a9904c4 Add TTFont.normalizeLocation() as a public method. 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
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
Just van Rossum
8932ab427f Convert tabs to spaces 2022-08-29 19:28:46 +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
Behdad Esfahbod
f5a1d0ba10 [ttVarGlyphSet-CFF] Handle font without advance variation 2022-08-26 21:24:24 -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
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
5454989987 [ttGlyphSet] Copy glyph components before shifting
Fixes https://github.com/fonttools/fonttools/issues/2774
2022-08-24 13:30:28 -06:00
Just van Rossum
5aa83bed33 make glyphset[gn].drawPoints(pointPen) work for CFF 2022-08-24 14:48:58 +02:00
Cosimo Lupo
320cbf7c47 [ttGlyphSet] Inherit ttVarGlyphSet from ttGlyphSet
Fixes #2759
2022-08-22 17:07:31 +01:00
Behdad Esfahbod
dc99ab6b3f [ttGlyphSet] Address review comments 2022-08-15 11:06:51 -06:00
Behdad Esfahbod
226761c8ed [ttVarGlyphSet] Set glyph height
Untested
2022-08-14 12:08:12 -06:00
Behdad Esfahbod
617e6ff3c7 [ttVarGlyphSet] Implement 'avar' mapping 2022-08-14 12:08:12 -06:00
Behdad Esfahbod
37277ee86e [glyphSet] Fix lsb offsetting 2022-08-14 12:08:12 -06:00
Behdad Esfahbod
e1d8496d73 [TTVarGlyphSet] Use shallow glyph copying 2022-08-14 12:08:12 -06:00
Behdad Esfahbod
3ae5a673bc [ttFont/ttGlyphSet] Add option to pass normalized locations 2022-08-14 12:08:12 -06:00
Behdad Esfahbod
c148dc76e6 [ttFont/ttGlyphSet] Add API for drawing variable fonts
Fixes https://github.com/fonttools/fonttools/issues/1021
2022-08-14 12:08:12 -06:00
Behdad Esfahbod
0d1550febe [ttFont] Split TTGlyphSet code into ttGlyphSet.py 2022-08-14 12:08:12 -06:00