9941 Commits

Author SHA1 Message Date
Just van Rossum
2f79fbc951 remove GDEF warning completely, as per discussion in #2694 2022-08-16 14:08:46 +02:00
Behdad Esfahbod
033e811c8f [scale-upem] Add output message 2022-08-15 22:03:37 -06:00
Behdad Esfahbod
380ea83191 [print-json] Print GlyphOrder 2022-08-15 21:59:33 -06:00
Behdad Esfahbod
82b894c497 [print-json] Actually valid json now! 2022-08-15 21:44:13 -06:00
Behdad Esfahbod
f8e5ea4f95 [print-json] Towards valid json syntax 2022-08-15 21:37:23 -06:00
Behdad Esfahbod
dcff7a2d8b [Snippets/print-json.py] Add using the visitor module 2022-08-15 21:17:05 -06:00
Behdad Esfahbod
09ea38bac6 [visitor] Add visitDict 2022-08-15 17:39:53 -06:00
Behdad Esfahbod
cb27c528cb [visitor] Add visitLeaf 2022-08-15 17:29:08 -06:00
Behdad Esfahbod
6af0637e02 [ttVisitor] Pass arbitrary args 2022-08-15 17:08:16 -06:00
Behdad Esfahbod
e2850886d9 [scale-upem] Err on CFF fonts 2022-08-15 14:30:04 -06:00
Behdad Esfahbod
4b472cbc3a [scale-upem] Implement vmtx 2022-08-15 14:27:15 -06:00
Behdad Esfahbod
6bac64ff9f [scale-upem] Implement vhea 2022-08-15 14:25:15 -06:00
Behdad Esfahbod
ec2919cc34 [scale-upem] Implement GDEF 2022-08-15 14:21:31 -06:00
Behdad Esfahbod
c588b2d5b3 [scale-upem] Scale GPOS using register_attrs as well 2022-08-15 14:19:26 -06:00
Behdad Esfahbod
3a6fa9812d [scale-upem] Implement ItemVariationStore 2022-08-15 14:09:13 -06:00
Behdad Esfahbod
f360cf92ec [Snippets/scale-upem] Implement gvar scaling 2022-08-15 14:03:42 -06:00
Behdad Esfahbod
ef1a009bea [visitor] Fix up attrs visiting 2022-08-15 13:59:05 -06:00
Behdad Esfahbod
8213c58a38 [visitor] Don't recurse on private or TTFont attributes 2022-08-15 13:43:03 -06:00
Behdad Esfahbod
24d63d068e [scale-upem] Take scale-factor from command-line 2022-08-15 13:36:28 -06:00
Just van Rossum
10c92ba338 Fix for #2694: only warn about not-requested-GDEF if building a VF AND GPOS is requested but GDEF isn't 2022-08-15 21:20:13 +02:00
Behdad Esfahbod
f582469cb8 [visitor] Split TTVisitor into its own module 2022-08-15 13:01:46 -06:00
Behdad Esfahbod
61d651e387 [scale-upem] Implement kern table 2022-08-15 12:56:38 -06:00
Behdad Esfahbod
d9338ea539 [Snippets] Rename scale-font.py to scale-upem.py 2022-08-15 12:52:08 -06:00
Behdad Esfahbod
fcc4a875dd Rename visitor_test to Snippets/scale-font.py 2022-08-15 12:51:07 -06:00
Behdad Esfahbod
3e82ce1e2d [visitor_test] Take scaleFactor 2022-08-15 12:50:16 -06:00
Behdad Esfahbod
be7df107e2 [visitor_test] Implement glyf table visiting 2022-08-15 12:47:17 -06:00
Behdad Esfahbod
a0686e8d2e [visitor] Add register_attr(s) example 2022-08-15 12:37:38 -06:00
Behdad Esfahbod
9b0d0e7b56 [visitor] ensureDecompiled(recurse=False) 2022-08-15 12:09:26 -06:00
Behdad Esfahbod
de091983d5 [visitor] Handle enums 2022-08-15 12:05:52 -06:00
Behdad Esfahbod
5eb63212ad [visitor] Convert tabs to spaces and run black 2022-08-15 12:04:36 -06:00
Behdad Esfahbod
171670a15f
[instancer] Simplify a couple of things (#2732)
* [instancer] Simplify normalization
2022-08-15 11:47:09 -06:00
Behdad Esfahbod
41e6f60011
Merge pull request #2738 from fonttools/glyphset
TTVarGlyphset
2022-08-15 11:07:41 -06:00
Behdad Esfahbod
dc99ab6b3f [ttGlyphSet] Address review comments 2022-08-15 11:06:51 -06:00
Behdad Esfahbod
03d264756b
Test var model error (#2217)
* [varLib.models] Add test for modeling rounding error

Tests https://github.com/fonttools/fonttools/pull/2214

If you flip demo to True, it does a slower test and demos the new error as well
as the error the old code was producing (ie. rounding deltas post-modeling).

Indeed, the new error is always capped by 0.5 as expected, whereas the old one
was unbounded. Here's the worst-case error of the bad code:

...
240     0.42    4.8
...

240 is just the line number. 0.42 is new error. 4.8 is old error.

* turn test_modeling_error into a parametrized pytest test

Like the other test methods in the same module, all those whose name starts with 'test_' are automatically discovered and run by pytest which is our default test runner. So there is no need to call the test method itself in the top-level module scope. One simply runs the test via pytest. To execute this specific test method one can do 'pytest Tests/varLib/models_test.py::test_modeling_error'.

* use pytest markers to mark specific test as 'slow'

So that one can optionally deselect tests marked with specific marker by passing -m option (e.g. to deselect 'slow' tests, pytest -m 'not slow' ...).

https://docs.pytest.org/en/stable/mark.html#registering-marks
https://docs.pytest.org/en/stable/example/parametrize.html#set-marks-or-test-id-for-individual-parametrized-test

* [varLib/models_test] Comment out non-test code

Co-authored-by: Cosimo Lupo <clupo@google.com>
2022-08-15 10:30:45 -06:00
Cosimo Lupo
9716b1c455 Bump version: 4.35.0 → 4.35.1.dev0 2022-08-15 15:53:13 +02:00
Cosimo Lupo
691a17d289 Release 4.35.0 2022-08-15 15:53:13 +02:00
Cosimo Lupo
0c2056e54d Update changelog [skip ci] 2022-08-15 15:50:09 +02:00
Cosimo Lupo
a8c09989bd
Merge pull request #2743 from fonttools/variable-colr-with-sweep-angle-bias
support proposed PaintSweepGradient's angles with +1.0 (180°) bias
2022-08-15 14:00:22 +01:00
Cosimo Lupo
e3aaf59084
Merge pull request #2734 from fonttools/instancer-bug
[instancer] Fix bug in _instantiateFeatureVariations()
2022-08-15 13:59:41 +01:00
Cosimo Lupo
1dffbae240 support proposed PaintSweepGradient's angles with +1.0 (180°) bias
In the upcoming draft of COLR spec, PaintSweepGradient's startAngle/endAngle are encoded with a +1.0 bias to allow for representation of a full +360° positive angle. Normal F2Dot14-fraction-of-half-circle angles can only represent angles between -360 <= angle < +360

This is a breaking change and will need to be coordinated with rendering implementations (at least FreeType/Skia).
2022-08-15 12:52:28 +02:00
Cosimo Lupo
87e86cb5fb
Merge pull request #2731 from fonttools/pyup-scheduled-update-2022-08-08
Scheduled weekly dependency update for week 32
2022-08-15 11:33:37 +01:00
Cosimo Lupo
0f33634a9e subset_test: fix mock test with uharfbuzz>=0.30 new 'repack_with_tag' method 2022-08-15 12:10:13 +02:00
Cosimo Lupo
615d62ab25 requirements.txt: keep scipy pinned for python_version < 3.7 2022-08-15 12:03:27 +02:00
Behdad Esfahbod
e31b214089 [visitor_test] Make it into the start of a font rescaler 2022-08-14 14:43:28 -06:00
Behdad Esfahbod
ec7057a56e [visitor] Add visitor for TTFont 2022-08-14 14:43:11 -06:00
Behdad Esfahbod
87deecebe2 [ttFont] Add "recurse" argument to ensureDecompiled() 2022-08-14 14:42:21 -06:00
Behdad Esfahbod
688939394b [varLib.models] Generate narrower tents
Based on https://github.com/fonttools/fonttools/pull/2218
but modify the general solver instead.
2022-08-14 14:00:09 -06:00
Behdad Esfahbod
449049a933 [mtiLib] Pad scriptTags with space
Fixes https://github.com/fonttools/fonttools/issues/1727
2022-08-14 13:05:53 -06:00
Behdad Esfahbod
26ae03f58f [ttGlyphSet] Add tests 2022-08-14 12:52:49 -06:00
Behdad Esfahbod
cdc5307d1b
[merge] Use '.' instead of '#' in duplicate glyph names (#2742)
Fixes https://github.com/fonttools/fonttools/issues/1950
2022-08-14 12:49:35 -06:00