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
Behdad Esfahbod
672c4bacdd
[instancer.featureVars] Address review comments
2022-11-04 11:55:48 -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
1b6f4fb858
[instancer.featureVars] Minor adjustments
2022-11-03 14:54:47 -06:00
Behdad Esfahbod
ecfcdffe9f
[instancer.featureVars] Combine two functions
...
Fold _limitFeatureVariationRecord() into
_instantiateFeatureVariationRecord().
2022-11-03 14:22:02 -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
Behdad Esfahbod
0f48f0a5ea
[varLib/featureVars] Insert rvrn lookups at beginning
...
Fixes https://github.com/fonttools/fonttools/issues/2140
Fixes https://github.com/googlefonts/fontmake/issues/950
2022-10-28 15:45:40 -06:00
Behdad Esfahbod
492645239b
[varLib / instancer] Remove DSIG table from font
...
Fixes https://github.com/fonttools/fonttools/issues/1480
2022-10-28 11:42:57 -06:00
Behdad Esfahbod
9369edb6a9
[mutator] Remove DSIG table if present
...
Fixes https://github.com/fonttools/fonttools/issues/1480
2022-10-26 14:48:32 -06:00
Cosimo Lupo
b74d098115
add custom repr to AxisTriple so they print nicer in the logging output
2022-10-21 18:38:55 +01:00
Cosimo Lupo
86e1202129
[instancer] expand singles/tuples to triples upfront and use triples throughout
...
Also renamed AxisTent => AxisTriple because I think "tent" is more appropriate to visualize master supports (i.e. a triangle with a peak in the middle), here it's simply the new desired min, default, max values of an axis, or the axis limits.
The public facing instantiateVariableFont continues to accept a hybrid map of axis tags to single values or 2- (and now also 3-) tuples, these are normalized to an AxisLimits mapping that contains only AxisTriples and passed around to the internal methods.
2022-10-21 17:49:35 +01:00