1671 Commits

Author SHA1 Message Date
Behdad Esfahbod
5c278464e0 [subset/VARC] Subset MultiVarStore 2024-05-22 18:45:28 -06:00
Behdad Esfahbod
c50a0f6195 [VARC] Rename a type 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
4b6c574d54 [VARC] More towards drawing 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
0e52857ffe [VARC] Start drawing VARC glyphs 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
bcd5e4c216 Rip out glyf1 VarComposites
In favor of separate VARC table.

ttGlyphSet does NOT yet know how to draw VARC table though.

The 9 failing tests are all VarComposite-related and need
to be updated with VARC equivalents eventually when we
add VARC support to subsetter and instancer.
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
ec78b572c9 [MultiVarStore] Fix up XML read/write
Looks complete now.
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
5fe9da49f3 [MultiVarStore] Fix caching 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
6bcab786a1 [varStore] Fix caching when setModel() is called repeatedly 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
0e9eff8990 Add MultiVarStore 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
b7ab1d8c12 [varStore] Fix overflow logic 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
a8005130cc [varStore] Cache individual items in store*Many() 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
6f4feffa11 [varStore] Add storeMastersMany / storeDeltasMany 2024-05-22 18:45:27 -06:00
Behdad Esfahbod
5dca3c5a50 [instancer] Warn about missing VORG support 2024-05-17 12:44:29 -07:00
Behdad Esfahbod
4b62d5efe9 [instancer] Set VarDataCount 2024-05-17 12:25:20 -07:00
Behdad Esfahbod
15af3425e9 [instancer] Add --downgrade-cff2 2024-05-17 11:45:35 -07:00
Behdad Esfahbod
9ffcabd360 [instancer] Remove resolved TODO 2024-05-17 11:41:06 -07:00
Behdad Esfahbod
0a7433f847 [cffLib] Add CFF<->CFF2 convertors that work on otFont 2024-05-16 16:29:22 -07:00
Behdad Esfahbod
ec36fe74d5 [cffLib / varLib] Merge two impls of convertCFFToCFF2
Fixes https://github.com/fonttools/fonttools/issues/1835
2024-05-16 15:57:31 -07:00
Behdad Esfahbod
39ec4e6c0c [cffLib] Add CFFToCFF2 and CFF2ToCFF cmdline and module
The CFF2ToCFF module is rather solid, at least IMO.

This takes convertCFFToCFF2 from cffLib. Apparently there's a more
complete one in varLib.cff:

https://github.com/fonttools/fonttools/issues/1835

Should merge the two and finish them.
2024-05-16 10:47:24 -07:00
Behdad Esfahbod
60e30fe008 [cffLib] Add a simple (and quite possibly incomplete) convertCFF2ToCFF() 2024-05-15 17:33:00 -07:00
Behdad Esfahbod
c06e8ba1e8 [instancer/CFF2] Comment 2024-05-14 18:26:35 -06:00
Behdad Esfahbod
3d2df43a67 [instancer/CFF2] Comment 2024-05-14 17:13:21 -06:00
Behdad Esfahbod
b3dc48a967 [instancer/CFF2] Micro-optimize commands 2024-05-14 13:39:09 -06:00
Behdad Esfahbod
1011d7e996 [instancer/CFF2] Add another test 2024-05-14 13:34:20 -06:00
Behdad Esfahbod
6d915fc816 [instancer/CFF2] Add test 2024-05-14 12:28:00 -06:00
Behdad Esfahbod
1891a7220d [instancer/CFF2] Fixups 2024-05-14 11:11:39 -06:00
Behdad Esfahbod
385c2cb979 [instancer/CFF2] Instantiate private-dict values 2024-05-14 11:11:25 -06:00
Behdad Esfahbod
bdd42f14fc [instancer/CFF2] Fixups with used-vsindex handing
vsindex 0 is implied.

Also, add Unimplemented code for private-dict variable
values. I couldn't find any fonts using them, so for
now they remain unimplemented.
2024-05-14 01:15:04 -06:00
Behdad Esfahbod
68f87dd850 [instancer/CFF2] Fix tests
gvar is removed by the time we get to hmtx/vmtx subsetting.
2024-05-14 00:47:39 -06:00
Behdad Esfahbod
21fb882e67 [instancer/CFF2] Prune ununsed data 2024-05-14 00:35:09 -06:00
Behdad Esfahbod
6f85ebb02c [instancer/CFF2] Full-instancing 2024-05-14 00:11:29 -06:00
Behdad Esfahbod
ae18197f6f [instancer/CFF2] Instantiate hmtx/vmtx 2024-05-14 00:11:29 -06:00
Behdad Esfahbod
c9ed0d1348 [instancer/CFF2] Minor sanity check 2024-05-14 00:11:29 -06:00
Behdad Esfahbod
f6c72eabf9 [instancer/CFF2] Add specialize and generalize arguments 2024-05-14 00:11:29 -06:00
Behdad Esfahbod
bb9a23702b [instancer] Instantiate CFF2! 2024-05-14 00:11:29 -06:00
Behdad Esfahbod
969d09dcaf [instancer] Fix name decision-making
All limits are tuple these days.
2024-05-14 00:10:50 -06:00
Behdad Esfahbod
e724acd41e [instancer] Raise NotImplementedError if avar2 VarStore present 2024-04-15 08:21:14 -06:00
Behdad Esfahbod
6a2a204cc3 [interpolatable] Support avar2 in the .ttf codepath 2024-04-02 13:20:19 -06:00
Cosimo Lupo
345d6b2f81 [instancer] drop explicit no-op axes from tuplevariations
Fixes #3453
2024-03-04 15:25:48 +00:00
Khaled Hosny
cf08265cd5 Black 2024-02-06 15:47:35 +02:00
Behdad Esfahbod
16991a8cd2 [varLib] Remove unused code 2024-01-26 12:20:34 -08:00
Qunxin Liu
3e548ff29c fix bug in instancer iup optimization
pass in correct value to tolerance
2024-01-25 16:18:24 -08:00
Cosimo Lupo
701b06f3c6
[varLib]: do not log when there are no OTL tables to be merged 2024-01-11 12:00:08 +00:00
خالد حسني (Khaled Hosny)
1c25210360
[featureVars] Re-use FeatureVariationRecord's when possible
If a FeatureVariationRecord with the same ConditionTable exists re-use
it and append FeatureTableSubstitutionRecord’s.

Without this, in the following feature code only the first lookup will
be applied since there will be two FeatureVariationRecord with the same
ConditionTable, so the first will be matched and the other will be
skipped:

    conditionset test {
        wght 600 1000;
        wdth 150 200;
    } test;

    variation ccmp test {
        sub e by a;
    } ccmp;

    variation rlig test {
        sub b by c;
    } rlig;

With this change only one FeatureVariationRecord will be created with
two FeatureTableSubstitutionRecord’s.
2024-01-10 19:06:26 +02:00
Behdad Esfahbod
62d54b03d3 [interpolatable] Remove unused code 2024-01-04 09:30:33 -07:00
Behdad Esfahbod
348774af36 [interpolatable] Disable overweight again
It mostly produces false-positives still.
2024-01-03 16:23:17 -07:00
Behdad Esfahbod
03c0d78489 [interpolatable] Enable overweight test
Very conservative.
2024-01-03 15:56:52 -07:00
Behdad Esfahbod
71f7515ef5 [interpolatable] Speed up by removing unused data 2023-12-14 11:04:23 -07:00
Behdad Esfahbod
7fc14d81fa [interpolatablePlot] Reformat
Mostly resize to fit Letter paper size, and misc adjustments.
2023-12-14 10:22:15 -07:00
Behdad Esfahbod
0906c75dc1 [interpolatable] Rename variable 2023-12-14 10:20:32 -07:00