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
Cosimo Lupo
40b2473a48
Merge pull request #2728 from fonttools/instancer-l4
...
[instancer] Towards L4 instancing
2022-10-21 16:39:09 +01:00
Cosimo Lupo
c41cda33c1
featureVars: set FeatureCount/LangSysCount, even if 0
2022-10-20 16:45:44 +01:00
Cosimo Lupo
040fdb03a0
Rework assertion per feedback
2022-10-13 19:17:33 +01:00
Cosimo Lupo
3c935f95ca
normalizeLocation: fix ZeroDivisionErrors with extrapolate=True
...
these happens when v < default and default==lower, or when v > default but default==upper...
2022-10-13 18:39:56 +01:00
Behdad Esfahbod
233014117b
[instancer] Adjust featureVariations retaining logic
...
https://github.com/fonttools/fonttools/pull/2728#discussion_r975606307
2022-10-13 10:35:02 -06:00
Behdad Esfahbod
9c7ffef55e
[instancer] Run black
2022-10-13 10:35:02 -06: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
bce11dfc85
[instancer.solver] Improve diagram for a case
2022-10-13 10:35:02 -06:00
Behdad Esfahbod
3bdfb3e205
[instancer] Remove debug print
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
5ff9546531
[TupleVariation] Add __imul__
2022-10-13 10:35:02 -06:00
Behdad Esfahbod
fbf796a0a9
[instancer] Use minimum/maximum instead of tuple indices
...
One of the cases is a bugfix in fact...
2022-10-13 10:35:02 -06:00
Behdad Esfahbod
36bf633555
[instancer.solver] Format
2022-10-13 10:35:02 -06:00
Behdad Esfahbod
b54ac734cc
[instancer.solver] Add assertion
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
528bcdf1a2
[instancer] No need to check for scalar=1
...
The scaleDeltas() function does it.
2022-10-13 10:35:02 -06:00
Behdad Esfahbod
d2cb561cee
[instancer] L4 avar mapping
2022-10-13 10:35:02 -06:00
Behdad Esfahbod
24cd9dc00e
[instancer] Simplify avar mapping more
2022-10-13 10:35:02 -06:00
Behdad Esfahbod
7330c78b10
[instancer] Towards L4 avar
2022-10-13 10:35:02 -06:00
Behdad Esfahbod
d17d1355a2
[instancer] Simplify avar normalization
2022-10-13 10:35:02 -06:00
Behdad Esfahbod
3108e52a90
[instancer] Remove redundant checks
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
890938ef09
[instancer.solver] Try harder to fix on python 3.7
2022-10-13 10:35:02 -06:00
Behdad Esfahbod
3c998785db
[instancer.solver] Use older lru_cache instead of cache
2022-10-13 10:35:02 -06:00
Behdad Esfahbod
8f6779d67e
[instancer] Fix the rest of tests
2022-10-13 10:35:02 -06:00