1175 Commits

Author SHA1 Message Date
Behdad Esfahbod
8355b58e85 [varLib.avarPlanner] Use space-separate lists instead of comma 2023-07-23 11:12:26 -06:00
Behdad Esfahbod
700f69a559 [varLib.avarPlanner] Add --glyphs 2023-07-23 10:40:02 -06:00
Behdad Esfahbod
deb472c47f [varLib.avarPlanner] Add --weights 2023-07-23 10:29:59 -06:00
Behdad Esfahbod
758fbb7d74 [varLib.avarPlanner] Add --samples 2023-07-23 10:27:19 -06:00
Behdad Esfahbod
ffc1cd4801 [varLib.avarPlanner] Add __all__ 2023-07-23 10:23:39 -06:00
Behdad Esfahbod
3ad51d6339 [varLib.avarPlanner] Add addEmptyAvar 2023-07-23 10:19:35 -06:00
Behdad Esfahbod
6f7102021a [varLib.avarPlanner] Demote a couple messages to debug 2023-07-23 10:16:10 -06:00
Behdad Esfahbod
385dc84b1e [varLib.avarPlanner] Remove slntAxis for now
Will add back when implementing slant planning.
2023-07-23 10:08:09 -06:00
Behdad Esfahbod
43df0ae0a1 [varLib.avarPlanner] Fix creation of new avar table 2023-07-23 10:06:51 -06:00
Behdad Esfahbod
1a36440d3d [varLib.avarPlanner] A couple of error messages 2023-07-23 10:04:28 -06:00
Behdad Esfahbod
3662efc1e9 [varLib.avarPlanner] Write out designspace snippet 2023-07-23 09:53:20 -06:00
Behdad Esfahbod
5c1c192dac [varLib.avarPlanner] Add assertion 2023-07-23 09:45:58 -06:00
Behdad Esfahbod
023da81731 [varLib.avarPlanner] Add --plot 2023-07-23 09:44:07 -06:00
Behdad Esfahbod
a95c084355 [varLib.avarPlanner] Use proper logging 2023-07-23 09:30:54 -06:00
Behdad Esfahbod
3efd204a06 [varLib.avarPlanner] Comment out plotting 2023-07-23 09:18:44 -06:00
Behdad Esfahbod
805f459f56 [varLib.avarPlanner] Actually remove old avar 2023-07-23 09:01:42 -06:00
Behdad Esfahbod
ef91a236d2 Black 2023-07-22 23:13:36 -06:00
Behdad Esfahbod
e8caaf9955 [varLib.avarPlanner] Delete old avar before calculations
Ouch!
2023-07-22 23:07:48 -06:00
Behdad Esfahbod
2253722dfb [varLib.avarPlanner] Increase target widths 2023-07-22 22:32:10 -06:00
Behdad Esfahbod
a9fbeda24b [varLib.avarPlanner] Add library support for glyph frequencies
No cmdline support yet.
2023-07-22 22:04:18 -06:00
Behdad Esfahbod
7d05b896e6 [varLib.avarPlanner] Better blackness calculation
Consider glyph width.
2023-07-22 22:01:03 -06:00
Behdad Esfahbod
8557e535eb [varLib] Add avarPlanner 2023-07-22 21:59:01 -06: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
fb56e7b7c9
Merge pull request #3179 from fonttools/L4-fixes
L4 fixes
2023-07-11 10:47:59 -04:00
Behdad Esfahbod
0893ba93f8 [instancer/L4] Address review comments 2023-07-11 08:46:46 -06:00
Behdad Esfahbod
46086cdb66 [interpolatable] Add --glyphs 2023-06-27 16:59:05 -06:00
Behdad Esfahbod
71cca00b05 [instancer/L4] Remove an unreachable code path and better comment 2023-06-21 19:01:27 -06:00
Behdad Esfahbod
ddc484d384 [instancer/L4] Add a comment 2023-06-21 18:30:19 -06:00
Behdad Esfahbod
10bc7a804a [instancer/L4] Implement an optimization 2023-06-21 17:52:12 -06:00
Behdad Esfahbod
204532aee3 [instancer/L4] Misc fixes and fix tests 2023-06-21 15:09:56 -06:00
Behdad Esfahbod
43e5aae018 [instancer/L4] Fix avar mapping as well 2023-06-21 15:09:56 -06:00
Behdad Esfahbod
72b6102949 [instancer/L4] Fix normalizeValue for L4 solver
Imagine a font with current min/default/max of 100,700,1000. And new
setting of 100,400,1000. The current normalizeLocation will calculate
the new location for 700 to be +.33, whereas it should calculate +.5!
This is because 400 translates to -.5, so 700 will be normalized to
-1,-.5,+1 and get +.33...

We need a special normalizeLocation that is aware of the "distance"
between min/default/max, ie. the non-normalized values. Then it will be
clear that the distance from 400 to 700 is equal to 700 to 1000, and as
such 700 should be normalized to .5, not .33... I'm still trying to
figure out the case where avar is present.

Store this distance in NormalizeAxisLimit and reach it out in the
solver.

Fixes https://github.com/fonttools/fonttools/issues/3177
2023-06-21 15:09:56 -06:00
Behdad Esfahbod
94e081611c [instancer/L4] Further simplify
outGain is always zero in this branch.
2023-06-21 15:09:56 -06:00
Behdad Esfahbod
7385cbbc34 [instancer/L4] Simplify 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
Behdad Esfahbod
d601646cf2 [varLib/avar2] Remove warning
https://github.com/fonttools/fonttools/pull/3123#issuecomment-1573199305
2023-06-02 12:51:25 -06: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
ddf16c9130 [designspaceLib/avar2] Apply review comments 2023-06-01 11:54:43 -06:00
Behdad Esfahbod
ce0a32d1a4 [varLib.builder] Fixup 2023-05-30 22:46:47 -06:00
Behdad Esfahbod
a99a75e8a6 [varLib/avar2] Use buildDeltaSetIndexMap()
Also change buildDeltaSetIndexMap() to move the identity
optimization there. Update the only other callsite (COLRv2).
2023-05-30 13:30:36 -06: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
246d539e29 [designspaceLib/avar2] Warn if input location missing for an output axis
https://github.com/fonttools/fonttools/pull/3123#issuecomment-1568852694
2023-05-30 12:10:15 -06:00
Behdad Esfahbod
588cbc982d [designspaceLib/avar2] Rename variables 2023-05-30 11:55:48 -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
ae2305196a [designspaceLib/avar2] Store axis name, not tag, in <dimension> 2023-05-28 15:14:25 -06:00
Behdad Esfahbod
0b57567c14 [designspaceLib/avar2] Add AxisMappingDescriptor 2023-05-28 15:14:25 -06:00