Just van Rossum
9825ab0977
Fix for #2293 : allow more than one lookahead glyph/class in contextual positioning with "value at end" ( #2294 )
...
* add test that fails for #2293
* fixing #2293 : rewrite of contextual positioning logic, ensure len(suffix) > 1 yields the correct result; checking more edge cases and raising errors inspired by makeotf
* test error cases
* only check when we actually have a value
* catch one more case that makeotf errors on and we didn't
2021-05-08 09:22:30 +02:00
Just van Rossum
d601951eab
[otTables] Default varIdx should be 0xFFFFFFFF ( #2298 )
...
* default value for varIdx should be 0xFFFFFFFF to indicate 'no variations'
* use lc hex notation as per feedback
2021-05-07 22:26:48 +02:00
Just van Rossum
9c18e2a07d
Merge pull request #2292 from Eigi/main
...
#2289 fix for typo in typo in ttLib.tables._g_l_y_f.py
2021-05-06 16:10:46 +02:00
Eigi
1091ff5e05
#2289 fix for typo in typo in ttLib.tables._g_l_y_f.py
2021-05-06 14:33:57 +02:00
Cosimo Lupo
83e044f4a4
Merge pull request #2291 from fonttools/fix-varlib-merge-error
...
VarLibMergeError.stack is a list of str, not a str
2021-05-06 12:11:53 +01: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
Nikolaus Waxweiler
2100a96e77
Merge pull request #2284 from fonttools/pen-error-maintenance
...
Pen error maintenance
2021-05-03 15:09:57 +01:00
Khaled Hosny
8caf2f0dfb
Merge pull request #2286 from fonttools/mutator-round-lsb
...
[mutator] Round lsb for CFF2 fonts as well
2021-05-03 01:20:01 +02: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
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
Nikolaus Waxweiler
b449686a84
Use TypeError for not enough points
2021-05-01 18:56:38 +01:00
Nikolaus Waxweiler
2831096eeb
Introduce PenError, use instead of asserts
2021-04-30 17:19:40 +01:00
Nikolaus Waxweiler
bc2bbe6a98
RecordingPointPen: handle identifier args
2021-04-30 17:19:28 +01:00
Cosimo Lupo
cf8deef420
Bump version: 4.22.1 → 4.22.2.dev0
2021-04-26 14:42:17 +01:00
Cosimo Lupo
61b62626a8
Release 4.22.1
2021-04-26 14:42:17 +01:00
Cosimo Lupo
5d16f10781
Update changelog [skip ci]
2021-04-26 14:41:00 +01:00
Cosimo Lupo
8064028ecb
Merge pull request #2277 from fonttools/fix-aalt-empty-lookup
...
fix AttributeError while generating aalt feature with empty lookup
2021-04-26 14:19:02 +01:00
Cosimo Lupo
2830260a01
another test to check that empty lookups blocks are skipped
2021-04-26 10:07:36 +01:00
Behdad Esfahbod
9959916c64
Merge pull request #2275 from fonttools/subset-device
...
[subset] Fix hint-dropping
2021-04-22 12:37:48 -06:00
Behdad Esfahbod
3a6ebb8dc7
[subset] Fix drop-hints implementation in Device tables
...
Fixes https://github.com/fonttools/fonttools/issues/2272
2021-04-22 12:29:16 -06:00
Behdad Esfahbod
f514a6823d
[varLib.merger] Use Value.getEffectiveFormat() instead of .getFormat()
2021-04-22 12:29:16 -06:00
Cosimo Lupo
9b5bc9e18b
feaLib: ignore empty named lookup reference
...
Fixes #2276
2021-04-22 13:11:57 +01:00
Cosimo Lupo
bd618d0117
add test to repro AttributeError when getAlternateGlyphs for empty lookups
...
https://github.com/fonttools/fonttools/issues/2276
2021-04-22 12:21:30 +01:00
Behdad Esfahbod
ae982abf5c
Merge pull request #2274 from googlefonts/mvar_fix
...
Include record size adjustment.
2021-04-21 15:54:45 -06:00
Garret Rieger
1bb3183231
Add tests for lazy loading of MVAR with more than 8 value records.
2021-04-21 14:37:47 -07:00
Behdad Esfahbod
830cff6253
[ttLib] Add Value.getEffectiveFormat()
...
This ignores 0/None values that don't need to be encoded.
2021-04-21 14:10:27 -06:00
Garret Rieger
e0f1c15ad0
Include record size adjustment.
2021-04-21 12:15:29 -07:00
Behdad Esfahbod
8ab6af03c8
Merge pull request #2266 from fonttools/varLib-phantomPoints
...
[varLib/glyf] Rework phantom-points calculations
2021-04-15 08:00:05 -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
51a76e319e
[glyf] Add old setCoordinates, getCoordinatesAndControls, getPhantomPoints
...
https://github.com/fonttools/fonttools/pull/2266
2021-04-14 14:36:35 -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
24140e154e
[glyf] Add default=None to glyf.get()
2021-04-14 13:36:07 -06:00
Behdad Esfahbod
d12d7fbb75
[glyf] Remove unused code
...
Also simplify bounds check.
2021-04-13 15:13: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
75ef521fd0
[gvar] Reduce TTFont.__getitem__() calls
2021-04-13 14:45:40 -06:00
Behdad Esfahbod
3cbbc25d29
[glyf] Remove useless assert in setCoordinates()
2021-04-13 13:50:01 -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
ddf2f0369b
[glyf] Remove useless assert in getPhantomPoints()
2021-04-13 13:27:03 -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
3cfc87be71
Merge pull request #2261 from fonttools/faster-GlyphCoordinates
...
Faster glyph coordinates
2021-04-09 14:05:19 -06:00
Behdad Esfahbod
dc0600c764
[TupleVariation] Fold call to hasImpact() into getUsedPoints()
...
Related:
https://github.com/fonttools/fonttools/issues/2263
Part of:
https://github.com/fonttools/fonttools/pull/2261
2021-04-09 13:36:29 -06:00
Behdad Esfahbod
bcd4a62f10
[TupleVariation] Use b'' instead of NotImplemented for "use shared points"
2021-04-09 12:16:15 -06:00
Behdad Esfahbod
ef0d695de9
[TupleVariation] Remove unused usesSharedPoints return from tv.compile()
2021-04-09 12:13:49 -06:00
Behdad Esfahbod
b3a9ef551a
[GlyphCoordinates] Use double, not float, again
...
https://github.com/fonttools/fonttools/pull/2261#discussion_r609928776
2021-04-09 11:43:44 -06:00
Behdad Esfahbod
85c9102d47
[TupleVariation] Use Counter() instead of defaultdict() for sharedCoords
2021-04-09 09:23:34 -06:00
Behdad Esfahbod
f3f1628571
[TupleVariation] Comment
2021-04-08 19:47:28 -06:00