425 Commits

Author SHA1 Message Date
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
e538b9c02f
[featureVars_test] test appending records for new features 2023-12-02 11:18:31 +00:00
Cosimo Lupo
82021732ae
[featureVars] expose method to addGSUBFeatureVariations to existing VF
Fixes https://github.com/fonttools/fonttools/issues/3357
2023-12-01 18:54:15 +00:00
Cosimo Lupo
a2e05fb084
[varLib_test] use multiple tags in FeatureVarsCustomTag.designspace 2023-12-01 16:53:32 +00:00
Behdad Esfahbod
51e70f9742
[interpolatable] Return master indices in addition to master names (#3346)
[interpolatable] Add master indices to problem reports

More solid than using names to refer back to the master index,
as needed in interpolatablePlot.
2023-11-20 08:59:11 -07: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
53e71f9eb7
Merge pull request #3309 from fonttools/pyup-scheduled-update-2023-10-23
Scheduled weekly dependency update for week 43
2023-11-03 10:33:00 +00:00
Cosimo Lupo
335a1e56ec re-run black v23.10 on all .py files 2023-11-03 10:25:15 +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
9e36b9465d [varStore] Micro-optimize storeDeltas()
Also speed up the test slightly by skipping rounding.
2023-10-23 15:18:11 -06:00
Behdad Esfahbod
c7ce5b0f3c [varStore] Handle >65535 items per encoding
By creating a new major for each 65535.
2023-10-23 14:43:10 -06: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
Qunxin Liu
a51b3c9d68 fix the order of prune_unused_regions, should be after vardata optimization 2023-09-05 10:44:29 -07:00
Simon Cozens
57fb47de3a
Allow for merging of NULL anchors (#3248)
* A failing test for #3247

* Fix up NULL entry/exit records on merge, fixes #3247
2023-08-07 17:12:12 +01:00
Cosimo Lupo
48ae9cbf1c
use 0 for sidebearing sparse metrics sentinel
font sources only allow to specify advances, the sidebearings are computed. Makes more sense for the sparse metrics to have 0 for the sidebearings as the glyph that's meant to be 'sparse' is most likely empty with no outlines
2023-08-02 15:12:26 +01:00
Cosimo Lupo
ecfc5eeeb7
varLib: use sentinel to mark glyph metrics as sparse
as discussed in https://github.com/googlefonts/ufo2ft/issues/501
2023-08-02 14:54:47 +01:00
Cosimo Lupo
653bccdb02
varLib_test: add test for variable CFF2 with empty glyph in sparse master
Three masters, Regular and Bold have glyphs .notdef, a, e; Medium only has .notdef (but empty, no contours) and e.
2023-08-02 14:01:01 +01: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
b14a29c353 [varLib.merger] Support sparse CursivePos
Part of https://github.com/fonttools/fonttools/issues/3168
2023-07-18 07:14:25 -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
b3ce0979cb
Merge pull request #3123 from fonttools/avar2-designspace
[designspace] Add avar2 mapping support
2023-06-08 12:58:51 +01: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
Cosimo Lupo
0690703b86
varLib: add --drop-implied-oncurves option
For the test, I used the Tests/varLib/data/Build.designspace as starting point, modified the 'a' glyph so that 1 on-curve point (the first one) becomes impliable for all the masters.
2023-06-02 15:50:32 +01:00
Behdad Esfahbod
a08acf41f8 [varLib/avar2] Omit identity VarIdx map 2023-05-30 13:22:12 -06:00
Behdad Esfahbod
d915f08e76 [varLib/avar2] Don't require base master to be specified explicitly
We can deduce it as empty mapping.
2023-05-30 13:13:49 -06:00
Behdad Esfahbod
ff7f49a94c [varLib/avar2] Add compile test 2023-05-30 13:13:49 -06: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
5255c01bcc
Merge pull request #3126 from fonttools/varStore-quantize
Var store quantize
2023-05-25 14:26:47 +02:00
Cosimo Lupo
62bca25c04
Merge pull request #3125 from fonttools/tests-warnings
[Tests] Silence a few deprecation warnings
2023-05-25 13:06:09 +01:00
Behdad Esfahbod
d9649a7835 [varStore] Add test for quantization 2023-05-24 18:10:08 -06:00
Behdad Esfahbod
aeaf98a438 [varStore] Another fix and test 2023-05-24 16:34:15 -06:00
Behdad Esfahbod
ab510d1e7b [varStore] Add test resulting in empty varStore 2023-05-24 15:53:14 -06:00
Behdad Esfahbod
09dfed6b5e [varStore] Remove unused variable in test 2023-05-24 15:38:21 -06:00
Behdad Esfahbod
171741baf2 [varStore] Log XML when first assert fails in test 2023-05-24 15:36:06 -06:00
Behdad Esfahbod
a99e130b26 [Tests] Silence a few deprecation warnings 2023-05-24 14:38:41 -06:00
Behdad Esfahbod
abe2a37b6f [varStore] Add another test 2023-05-24 13:30:08 -06:00
Behdad Esfahbod
b72a8da045 [varStore] Adjust encoding overhead in optimize()
Previously we were not accounting for the LOffset to VarData.
2023-05-24 13:21:33 -06:00
Behdad Esfahbod
0677c0e705 [varStore] Another bugfix in optimize() 2023-05-24 13:18:58 -06:00
Behdad Esfahbod
e4281b07bc [varStore] Add test for optimize()
Doesn't hit all branches yet.
2023-05-24 12:51:24 -06:00
Behdad Esfahbod
4c24a3e328 [varLib/merger] Fix merging of SinglePos with pos=0
Fixes https://github.com/fonttools/fonttools/issues/3111
2023-05-19 18:37:15 +02:00
Behdad Esfahbod
5b96fff9ce [featureVars] Process lookups for features other than rvrn last
Fixes https://github.com/fonttools/fonttools/issues/3097
2023-05-02 10:57:43 -06:00