80 Commits

Author SHA1 Message Date
Behdad Esfahbod
e88e47f8ff [VARC] Take a stab at instancing 2024-05-22 18:46:07 -06:00
Behdad Esfahbod
22e02ccb47 [VARC/test] Adjust a test
This worked with the previous font it seems, but not with
the new font. Or maybe I've screwed up something...
2024-05-22 18:46:06 -06:00
Behdad Esfahbod
60e30fe008 [cffLib] Add a simple (and quite possibly incomplete) convertCFF2ToCFF() 2024-05-15 17:33:00 -07:00
Behdad Esfahbod
17474e19a4 [instancer/CFF2] Yet another test 2024-05-14 14:04:12 -06:00
Behdad Esfahbod
267fa79cca [instancer/CFF2] Add another test
This one has private blend values.
2024-05-14 13:47:08 -06:00
Behdad Esfahbod
b3dc48a967 [instancer/CFF2] Micro-optimize commands 2024-05-14 13:39:09 -06:00
Behdad Esfahbod
1011d7e996 [instancer/CFF2] Add another test 2024-05-14 13:34:20 -06:00
Behdad Esfahbod
6d915fc816 [instancer/CFF2] Add test 2024-05-14 12:28:00 -06:00
Cosimo Lupo
345d6b2f81 [instancer] drop explicit no-op axes from tuplevariations
Fixes #3453
2024-03-04 15:25:48 +00:00
Behdad Esfahbod
8728789c05 [instancer] Don't produce triples outside <-1,0,+1>
Fixes https://github.com/fonttools/fonttools/issues/3350
2023-12-06 10:22:11 -05:00
Cosimo Lupo
a92b2b0725
[instancer_test] check that vertical metrics stay in sync after MVAR instancing 2023-11-15 14:05:43 +00:00
Cosimo Lupo
74da89beeb
Merge pull request #3317 from fonttools/instantiate-avgcharwidth
Recalc avgcharwidth after instancing
2023-11-03 10:12:07 +00:00
Simon Cozens
71e991b87f Fixup expectations 2023-11-02 17:28:13 +00:00
Behdad Esfahbod
ae69e9e8be
[instancer] Allow relaxed limits syntax (#3323)
* [instancer] Allow relaxed limits syntax

Fixes https://github.com/fonttools/fonttools/issues/3322

Co-authored-by: Cosimo Lupo <clupo@google.com>
2023-11-02 10:22:23 -06:00
Simon Cozens
49570c3599
[instancer] Check if an axis has values before requiring it to be found (#3319)
* Check if an axis has values before requiring it to be found

* Add test
2023-10-31 08:21:34 +00:00
Behdad Esfahbod
f1e56cd757 [instancer.solver] Fix case where axisDef < lower and upper < axisMax
Fixes https://github.com/fonttools/fonttools/issues/3291
2023-10-16 13:46:39 -06:00
Cosimo Lupo
2dcdb17e90
instancer_test: add test for null ConditionSet offset 2023-07-20 11:15:32 +01:00
Behdad Esfahbod
b0cf3e1ebe [instancer] Allow null ConditionSet
Fixes https://github.com/fonttools/fonttools/issues/3211
2023-07-19 19:55:42 -06:00
Behdad Esfahbod
0893ba93f8 [instancer/L4] Address review comments 2023-07-11 08:46:46 -06:00
Behdad Esfahbod
10bc7a804a [instancer/L4] Implement an optimization 2023-06-21 17:52:12 -06:00
Behdad Esfahbod
17761cc616 [instancer/L4] Add tests 2023-06-21 15:09:56 -06:00
Behdad Esfahbod
204532aee3 [instancer/L4] Misc fixes and fix tests 2023-06-21 15:09:56 -06:00
Behdad Esfahbod
023ad3a363 [instancer/L4] Fix crossing calculation 2023-06-21 15:09:56 -06:00
Cosimo Lupo
dfec4abf6d
glyf: use 'round' parameter in _getCoordinatesAndControls
as Behdad suggested in review
2023-06-08 11:47:47 +01:00
Cosimo Lupo
1ca554332c
_getCoordinatesAndControls: make sure coords are rounded toInt() as gvar expects
ufo2ft will no longer send varLib already-rounded master glyf tables (to give it an opportunity to compute implied oncurves on the pre-rounded coords) so when retrieving coordinates off the glyf table in order to compute gvar deltas we have to round
2023-06-07 18:05:48 +01:00
Behdad Esfahbod
3ba7e6d706 [instancer-solver] Fix a bug
Fixes https://github.com/fonttools/fonttools/issues/3139
2023-05-29 17:39:02 -06:00
Behdad Esfahbod
a99e130b26 [Tests] Silence a few deprecation warnings 2023-05-24 14:38:41 -06:00
Behdad Esfahbod
43b16df8db [avar] Update test expectations 2023-03-08 11:10:07 -07:00
Behdad Esfahbod
0f1eb4673c [instancer_test] Add varComposite test 2023-01-31 13:25:06 -07:00
Behdad Esfahbod
7899dd8dbc [instancer] Limit axis ranges to that of fvar
Fixes https://github.com/fonttools/fonttools/issues/2959
2023-01-26 11:47:25 -07:00
Nikolaus Waxweiler
d584daa8fd Blacken code 2022-12-13 11:26:36 +00:00
Cosimo Lupo
dbc3b48879
[instancer] udpdate OS/2 class and post.italicAngle when default moved (L4)
Previously we were only updating these when pinning wght/wdth/slnt axes.
Now we do whenever any of these axes defaults are changed, whether or not the axes are pinned or kept

Fixes https://github.com/fonttools/fonttools/issues/2885
2022-11-09 16:33:23 +00:00
Behdad Esfahbod
672c4bacdd [instancer.featureVars] Address review comments 2022-11-04 11:55:48 -06:00
Behdad Esfahbod
ea2ae7df86 [instancer.featureVars] Add one more test 2022-11-03 17:15:40 -06:00
Behdad Esfahbod
392706949c [instancer.featureVars] Fix deficiency in L4 instancing
See discussion on the issue.  I think I got this right.

Fixes https://github.com/fonttools/fonttools/issues/2737
2022-11-03 14:55:01 -06:00
Behdad Esfahbod
6e156a7f13 [instancer] Split featureVars code into own module
Towards fixing https://github.com/fonttools/fonttools/issues/2737
2022-11-03 14:21:27 -06:00
Cosimo Lupo
0c30d96906
Update instancer tests to use triples as axis limits 2022-10-21 18:01:01 +01:00
Behdad Esfahbod
e554ec1dc6 [instancer] Small fix for featureVariations instancing 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
1ff1a537e8 [instancer] Implement L4 featureVariations 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
3f7b250803 [instancer] Add test for FeatureVariations limiting range 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
5cbfe2a956 [instancer] Add test for parseLimits with default value 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
aabced171e [instancer.solver] Fix case3 with gain
Ouch!
2022-10-13 10:35:02 -06:00
Behdad Esfahbod
7ee8414cab [instancer.solver] Better handling of peak==axisDef 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
e08553011a [instancer.solver] Handle when peak falls on new axis default 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
e2a875b26c [instancer] Implement featureVariations L4 instancing
I *think* this is all.
2022-10-13 10:35:02 -06:00
Behdad Esfahbod
d3e0a39362 [instancer] Fix more tests 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
11aa044515 [instancer] Fix another couple of tests 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
08c896f534 [instancer.solver] Cleanup tests of pytest.approx 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
eddc53c267 [instancer.solver] More test 2022-10-13 10:35:02 -06:00
Behdad Esfahbod
743033d755 [instancer.solver] Use pytest.approx() in tests 2022-10-13 10:35:02 -06:00