2076 Commits

Author SHA1 Message Date
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
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
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
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
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
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
0637b24b2a Read gvar more lazily by not parsing all of the 'glyf' table 2022-08-24 16:38:00 +02:00
Just van Rossum
5aa83bed33 make glyphset[gn].drawPoints(pointPen) work for CFF 2022-08-24 14:48:58 +02:00
Behdad Esfahbod
1d285e82ca [scaleUpem] Scale all FontMatrix entries, not just two 2022-08-22 11:16:47 -06:00
Cosimo Lupo
0adc164355
Merge pull request #2762 from fonttools/var-glyph-set-inheritance
[ttGlyphSet] Inherit ttVarGlyphSet from ttGlyphSet
2022-08-22 17:24:05 +01:00
Cosimo Lupo
320cbf7c47 [ttGlyphSet] Inherit ttVarGlyphSet from ttGlyphSet
Fixes #2759
2022-08-22 17:07:31 +01:00
Behdad Esfahbod
3eed84da01
Merge pull request #2756 from fonttools/makeOutputFileName-fragment
[cliTools.makeOutputFileName] Add fragment argument
2022-08-22 06:29:19 -06:00
Behdad Esfahbod
24c9fb6ffa [cliTools] Rename fragment to suffix 2022-08-22 06:26:30 -06:00
Behdad Esfahbod
68f31b580c
Merge pull request #2755 from fonttools/scaleUpem-cff
[scaleUpem] Support CFF/CFF2
2022-08-22 06:23:54 -06:00
Behdad Esfahbod
90a14aa68c Note that CFF fonts are desubroutinized 2022-08-22 06:23:28 -06:00
Behdad Esfahbod
46e2d07f8b [kern] More work handling large kern tables
Fixes https://github.com/fonttools/fonttools/issues/2335
2022-08-20 11:09:36 -06:00
Behdad Esfahbod
d21cfdede5 [kern] Allow compiling kern tables with more than 64k entries
Fixes https://github.com/fonttools/fonttools/issues/2397
2022-08-20 11:03:11 -06:00
Behdad Esfahbod
561ae06b52 [scaleUpem] Scale CFF FontMatrix 2022-08-19 13:22:49 -06:00
Behdad Esfahbod
3763641d40 [scaleUpem] Scale CFF topDict/Private values 2022-08-19 13:21:23 -06:00
Behdad Esfahbod
2c2dbb1343 [scaleUpem] Update docstring 2022-08-19 12:51:27 -06:00
Behdad Esfahbod
f24bdddb28 [scaleUpem] Add argparse and --output-file 2022-08-19 12:28:52 -06:00
Behdad Esfahbod
21cfebd76b [scaleUpem] Scale CFF args in-place 2022-08-19 11:25:09 -06:00
Behdad Esfahbod
d4d8c4ac5b [scaleUpem] Support CFF/CFF2 2022-08-19 11:03:23 -06:00
Behdad Esfahbod
0c2f125ba0 [scaleUpem] Use PaintFormat enum 2022-08-18 07:50:18 -06:00
Behdad Esfahbod
86c5aa859b [scaleUpem] Make it show in fonttools --help 2022-08-18 07:38:46 -06:00
Behdad Esfahbod
c20582b5e5 [scaleUpem] Add comments 2022-08-18 07:20:55 -06:00
Behdad Esfahbod
64627c2299 [scaleUpem] Support MATH table 2022-08-18 07:19:39 -06:00
Behdad Esfahbod
c43f234a4d [scaleUpem] Support VORG table 2022-08-18 07:17:49 -06:00
Behdad Esfahbod
0c6b67e8ec [scaleUpem] Optimize COLRv1 scale paint
032ff5620a
2022-08-18 07:05:34 -06:00
Behdad Esfahbod
1aff3e8fa2 [scaleUpem] Support post table 2022-08-18 06:20:33 -06:00
Behdad Esfahbod
376caff386
Merge pull request #2718 from fonttools/visitor
Add fontTools.misc.visitor, fontTools.ttLib.ttVisitor, ttLib.scaleUpem, Snippets/print-json.py
2022-08-18 06:12:19 -06:00