Simon Cozens
ab328b5ecc
axisPoints is not used outside the sort function
2021-05-12 14:55:14 +01:00
Just van Rossum
31ab3aae0b
Merge pull request #2285 from fonttools/varStore-32bit
...
Improve otBase facilities / towards 32bit VariationStore
2021-05-08 17:10:17 +02:00
Behdad Esfahbod
03e97edf14
[varLib.varStore] Use binary notation for bit constants
...
https://github.com/fonttools/fonttools/pull/2285#discussion_r625708297
2021-05-07 15:45:55 -06:00
Behdad Esfahbod
98e2bf5526
[varLib.builder] Document bit-tweedling
...
https://github.com/fonttools/fonttools/pull/2285#discussion_r628401241
2021-05-07 15:41:33 -06:00
Cosimo Lupo
6b9b23251e
VarLibMergeError.stack is a list of str, not a str
...
Fixes https://github.com/googlefonts/fontmake/issues/766
2021-05-06 11:59:10 +01:00
Khaled Hosny
a1c6c184ef
[mutator] Round lsb for CFF2 fonts as well
...
Otherwise head table compilation would fail because of the floating
point side bearing. The advance width is already rounded.
2021-05-03 00:06:46 +02:00
Behdad Esfahbod
0549b27afb
[varLib.varStore] Implement 32bit VarStore optimization
...
This concludes https://github.com/fonttools/fonttools/issues/2279
Part of https://github.com/fonttools/fonttools/pull/2285
2021-05-01 15:12:08 -06:00
Behdad Esfahbod
9350166792
[varLib.varStore] Remove use of array.array
2021-05-01 15:04:51 -06:00
Behdad Esfahbod
e454e96238
[varLib.builder] Implement building 32bit VarStore
...
The full optimizer in varLib.varStore still needs to be updated.
But this pretty much enables building 32bit VarStores, even if they
won't be fully optimal.
Part of https://github.com/fonttools/fonttools/issues/2279
2021-05-01 14:27:11 -06:00
Chris Simpkins
8a63c06b8b
[varLib.instancer] update instantiateVariableFont docs
...
updated to indicate that Level 3 sub-space ranges are supported, but you must include the default axis value in the new range
2021-05-01 12:04:13 -06:00
Behdad Esfahbod
f514a6823d
[varLib.merger] Use Value.getEffectiveFormat() instead of .getFormat()
2021-04-22 12:29:16 -06:00
Behdad Esfahbod
438dcb5a7f
Update Lib/fontTools/varLib/instancer/__init__.py
...
Co-authored-by: Nikolaus Waxweiler <madigens@gmail.com>
2021-04-14 21:04:48 -06:00
Behdad Esfahbod
a43690ef5b
[varLib.instancer] Add back instantiateGvarGlyph()
2021-04-14 14:43:24 -06:00
Behdad Esfahbod
a756bb01ab
[glyf] Prefix setCoordinates, getCoordinatesAndControls, getPhantomPoints
...
Will add old name with old API next.
2021-04-14 14:09:40 -06:00
Behdad Esfahbod
6aa9d192b6
[varLib] Use TTFont.get() in a couple of places
2021-04-14 13:50:00 -06:00
Behdad Esfahbod
15c34e9ba9
[glyf] Add .get() which is like __getitem__() but returning None if not found
...
And use it in a couple places.
2021-04-13 15:06:25 -06:00
Behdad Esfahbod
f80e19da35
[varLib] Minor optimizations in maxp and TThinting
2021-04-13 15:03:42 -06:00
Behdad Esfahbod
f387620572
[varLib] Reduce TTFont.__getitem__() in _merge_TTHinting
2021-04-13 14:49:50 -06:00
Behdad Esfahbod
34b5ff623c
[varLib] Optimize getPhantomPoints()
...
To reduce calling TTFont.__getitem__ many times per glyph!
2021-04-13 13:49:12 -06:00
Behdad Esfahbod
ee5ecd19d7
[varLib/glyf] Remove fallback vertical phantom-points code
...
I suggested Cosimo add that code in
https://github.com/fonttools/fonttools/pull/1528
Upon further inspection now, that code is unnecessary and even wrong in
cases where different masters have different ascent, because that would
result in encoding variations for vertical phantom points, which will
be then either be unused or double-apply on top of ascent etc.
2021-04-12 18:28:01 -06:00
Behdad Esfahbod
ef0d695de9
[TupleVariation] Remove unused usesSharedPoints return from tv.compile()
2021-04-09 12:13:49 -06:00
Behdad Esfahbod
416ff89171
[TupleVariation] Minor optimize in using sharedCoordinates
2021-04-08 11:40:44 -06:00
Behdad Esfahbod
96690de9a9
[varLib] Optimize out multiplication by 1 when computing deltas
2021-04-08 09:41:45 -06:00
Just van Rossum
5fc65d7168
Misc py23 cleanups ( #2243 )
...
* Replaced all from ...py23 import * with explicit name imports, or removed completely when possible.
* Replaced tounicode() with tostr()
* Changed all BytesIO ans StringIO imports to from io import ..., replaced all UnicodeIO with StringIO.
* Replaced all unichr() with chr()
* Misc minor tweaks and fixes
2021-03-29 11:45:58 +02:00
Behdad Esfahbod
3d578dd1de
[varLib.merger] Adjust for removal of Coverage / ClassDef .Format
2021-03-23 11:05:00 -07:00
Behdad Esfahbod
69918d2945
Revert "[varLib.merge] Fix tests"
...
This reverts commit fb0c60cd2ce68df546ea2887946bc7f97bbb6921.
2021-03-23 11:02:41 -07:00
Simon Cozens
baf6c5d1e1
Remove pass if we have a docstring
2021-03-19 10:48:58 +00:00
Simon Cozens
5d7c826b0b
Make CFF merge errors inherit differently
2021-03-19 10:40:02 +00:00
Simon Cozens
bfe4bad37b
Use kwargs and explicit stack
2021-03-19 10:38:15 +00:00
Simon Cozens
8ba31b0a43
Improve error message
2021-03-18 21:23:40 +00:00
Simon Cozens
956087eb81
super doesn’t magically call its own methods
2021-03-18 21:23:34 +00:00
Simon Cozens
3e0a87a146
Shorten exception names
2021-03-18 20:58:11 +00:00
Simon Cozens
6c547864b6
Use individual exception classes instead of enum
2021-03-18 15:49:49 +00:00
Simon Cozens
02ebcf8077
Redundant computation
2021-03-17 14:59:36 +00:00
Simon Cozens
bfc4ac9524
Compare enums by identity
2021-03-17 14:59:11 +00:00
Simon Cozens
b26728d3cb
Specifically catch VarLibMergeError
2021-03-17 11:56:02 +00:00
Simon Cozens
539b3cd71d
Special case must actually be special-cased
2021-03-17 11:52:50 +00:00
Simon Cozens
939962f858
Check we can actually get a name
2021-03-17 11:52:35 +00:00
Simon Cozens
1bf3cccead
Provide additional information for a common failure
2021-03-15 12:51:02 +00:00
Simon Cozens
46bd7a7e97
Many fixes...
2021-03-15 12:50:47 +00:00
Simon Cozens
5bac84374b
Ensure TTF list is correct
2021-03-15 12:50:07 +00:00
Simon Cozens
e2a859d649
Ensure table name is in error message stack
2021-03-15 12:04:36 +00:00
Simon Cozens
7fc2e37e41
Try harder to get a name from file being merged
2021-03-15 12:00:31 +00:00
Simon Cozens
1abfbb6cc7
Explain merge errors in designer-friendly terms
2021-03-13 22:30:27 +00:00
Cosimo Lupo
882d09ca8e
instancer: log.warn is deprecated
2021-03-11 18:24:23 +00:00
Cosimo Lupo
d89b3fbea6
Merge pull request #2216 from fonttools/jh-disambiguate-varlib-merge-errors
...
[varlib] disambiguate cff merge errors
2021-03-11 10:51:38 +00:00
Josh Hadley
50fb04fd57
[varlib] use VarLibCFFHintTypeMergeError for hint merging
2021-03-05 08:50:43 -08:00
Josh Hadley
aafc814088
[varlib] Add VarLibCFFHintTypeMergeError
2021-03-05 08:47:33 -08:00
Behdad Esfahbod
062b7c434e
Merge pull request #2214 from fonttools/varLib-round
...
[varLib] Move rounding to VariationModel, to avoid error accumulation from multiple deltas
2021-03-04 16:40:40 -07:00
Behdad Esfahbod
8b52b107c1
Merge pull request #2208 from simoncozens/refactor-variationmodel
...
Refactor VariationModel
2021-03-04 13:44:13 -07:00