Behdad Esfahbod
9cbde09cdc
[varStore.optimize] Speed up
2023-05-25 08:09:27 -06:00
Behdad Esfahbod
f12f3d863c
[varStore.optimize] Remove unused best_new_encoding
2023-05-25 07:56:33 -06:00
Behdad Esfahbod
da305615d0
[varStore.optimize] Simplify algorithm
...
Produces better results even.
2023-05-25 07:49:13 -06:00
Behdad Esfahbod
47ec18f788
[varStore] Better optimize() algorithm
...
See comments.
Produces better results.
2023-05-25 07:39:41 -06:00
Behdad Esfahbod
93d87df315
[varStore] Refactor code into a method
2023-05-25 07:12:27 -06:00
Behdad Esfahbod
035529883c
[varStore] Minor rename a method
2023-05-25 07:06:48 -06:00
Behdad Esfahbod
c1ab8995f2
[varStore] Minor adjustment to the optimize() algorithm
...
It's very unlikely that this path is needed, but it's correct
to have it.
2023-05-25 07:00:28 -06:00
Behdad Esfahbod
a08f5ebbc9
[varStore] Update comment
2023-05-25 06:24:00 -06:00
Behdad Esfahbod
ae7394e68a
[varLib.main] Accept --quantization
2023-05-24 18:10:08 -06:00
Behdad Esfahbod
d9649a7835
[varStore] Add test for quantization
2023-05-24 18:10:08 -06:00
Behdad Esfahbod
311bda2021
[varStore] Add optional quantization to optimize()
2023-05-24 18:10:08 -06:00
Behdad Esfahbod
47813b217c
[varStore] Make optimize() stable
...
Before, calling optimize() on its own output could generate different
result. I think it's stable now.
2023-05-24 18:09:58 -06:00
Behdad Esfahbod
6b20edf1fb
[varStore] Fix algorithm comment to match code
2023-05-24 17:08:20 -06:00
Behdad Esfahbod
1aa088e150
[varStore.main] Speed up if output is not requested
2023-05-24 17:05:00 -06:00
Behdad Esfahbod
2f78605c27
[varStore] Change a sort key in optimize()
...
Produces more optimized results in empirical testing.
2023-05-24 16:55:16 -06:00
Behdad Esfahbod
aeaf98a438
[varStore] Another fix and test
2023-05-24 16:34:15 -06:00
Behdad Esfahbod
8ae33a7ef3
[varStore] Add a round=round parameter to storeMasters
2023-05-24 14:24:36 -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
cb2f5aacd3
[varStore] More documentation
2023-05-24 12:19:46 -06:00
Behdad Esfahbod
cdcbf64d36
[varStore] Document the optimize algorithm
2023-05-24 12:09:43 -06:00
Behdad Esfahbod
58954179ec
[varStore] Another fix to the optimize algorithm
...
Previously we were disregarding the best_gain. Ouch!
2023-05-24 12:02:05 -06:00
Behdad Esfahbod
6097b3293b
[varStore] Improve optimize algorithm
...
This was always supposed to be how it works, but was missed in
the initial implementation apparently.
2023-05-24 11:07:19 -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
6a13bdc2e6
[featureVars] Remove unused argument
2023-05-02 10:57:43 -06: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
Behdad Esfahbod
623f3f14be
[iup] Micro-optimize
2023-04-22 15:07:03 -06:00
Behdad Esfahbod
afd4695d26
[iup] Fix cython tests
2023-04-22 14:49:25 -06:00
Behdad Esfahbod
e92c79e0e8
[iup] Micro-optimize cython
2023-04-22 14:34:41 -06:00
Behdad Esfahbod
b5899772c7
[interpolatable] Use math.sqrt()
2023-04-22 14:10:11 -06:00
Colin M. Ford
edc3584d5b
Using set comprehension
...
Suggestion by anthrotype
Co-authored-by: Cosimo Lupo <cosimo@anthrotype.com>
2023-04-06 10:34:48 -04:00
Colin M. Ford
9656e3faf1
formatting with black to get lint to pass
2023-04-05 22:33:38 -04:00
Colin M. Ford
491bd74f4b
Missed a m0idx
2023-04-05 18:22:21 -04:00
Colin M. Ford
9c1380be96
Oops, UFOLib's getGlyphSet
does not have an items
function
2023-04-05 18:21:17 -04:00
Colin M. Ford
4a991d1d89
Comment corrections
2023-04-05 17:12:43 -04:00
Colin M. Ford
208c36800b
Oops, any
could potentially block a list like [None, [], []]
, which is not what we want
2023-04-05 17:11:30 -04:00
Colin M. Ford
7a86dd325e
Rewriting varLib.interpolatable to allow for sparse masters + tests
2023-04-05 16:35:03 -04:00
Cosimo Lupo
cf4a24182e
[varLib] don't skip buildVFStatTable from DSv5 with 'STAT' info
...
Fixes https://github.com/fonttools/fonttools/issues/3045
2023-03-16 18:29:22 +00:00
Cosimo Lupo
5955a47f42
[varLib] build_many(DSv5) from main(); add --output-dir & --variable-fonts options
...
Fixes https://github.com/fonttools/fonttools/issues/2659
2023-03-07 18:13:28 +00:00
Cosimo Lupo
587b0fbf11
[varLib] don't overwrite existing feaLib-built 'STAT' table
...
Fixes https://github.com/googlefonts/fontmake/issues/985 and https://github.com/googlefonts/ufo2ft/issues/723
2023-03-07 17:26:15 +00:00
Cosimo Lupo
0df4997661
prevent cython.compiled raise AttributeError if cython not properly installed
...
It's possible sometimes that 'import cython' does not fail but then 'cython.compiled' raises AttributeError.
It actually happened in our internal production environment...
Similar issue to https://github.com/pydantic/pydantic/pull/573 and https://github.com/ipython/ipython/issues/13294
2023-03-02 17:43:38 +00:00
Behdad Esfahbod
b7b4a3b090
[varLib.featureVars] Fix bug in overlayBox
...
See added test. Previously we were cutting remainder box
even if the intersection had dimensions not present in the
remainder box. Ouch!
Fixes https://github.com/fonttools/fonttools/issues/3003
2023-02-24 07:51:00 -07:00
Behdad Esfahbod
33a94d820d
[instancer/VarComposite] Allow instancing non-variable VarComposite axes
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
e4c25d02e6
[instancer/VarComposite] Raise NotImplementedError when warranted
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
0d24114ad0
[varLib/VarComposite] Plug in in a couple places
2023-01-30 11:26:20 -07:00
Rod S
2f1f5e5e7b
Odd check pattern
2023-01-26 14:35:55 -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
Behdad Esfahbod
8c6e14674a
Typo
2023-01-06 14:17:12 -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