Cosimo Lupo
43e2108f93
Bump version: 4.39.2 → 4.39.3.dev0
2023-03-16 19:08:18 +00:00
Cosimo Lupo
d64a26f7ef
Release 4.39.2
2023-03-16 19:08:17 +00:00
Cosimo Lupo
cf4a24182e
[varLib] don't skip buildVFStatTable from DSv5 with 'STAT' info
...
Fixes https://github.com/fonttools/fonttools/issues/3045
2023-03-16 18:29:22 +00:00
Cosimo Lupo
1216596825
Bump version: 4.39.1 → 4.39.2.dev0
2023-03-16 13:01:32 +00:00
Cosimo Lupo
199e2c2c6a
Release 4.39.1
2023-03-16 13:01:31 +00:00
Cosimo Lupo
5abdd83318
Merge pull request #3043 from fonttools/fealib-more-avar
...
Apply `avar` also to variable locations
2023-03-16 12:35:51 +00:00
Cosimo Lupo
69b1752d80
variableScalar: make model_cache parameter optional
2023-03-16 12:03:33 +00:00
Cosimo Lupo
5d0432a813
Merge pull request #3029 from daltonmaag/wrap-glif-xml-errors
...
[glifLib] Wrap XML library exceptions with glifLib types when parsing glifs
2023-03-16 11:46:45 +00:00
Nikolaus Waxweiler
ac0361fe31
Move VariableScalar cache into Builder
2023-03-16 11:27:06 +00:00
Behdad Esfahbod
05872d6878
Merge pull request #2679 from fonttools/avar2
...
Avar2
2023-03-15 11:56:30 -06:00
Nikolaus Waxweiler
cf43ff5d22
Apply avar to variable locations
2023-03-15 16:19:39 +00:00
Nikolaus Waxweiler
a993247e47
Remove unused variable
2023-03-15 16:19:12 +00:00
Nikolaus Waxweiler
73e7aad1c3
Guard against missing avar entries
2023-03-15 16:18:47 +00:00
Nikolaus Waxweiler
c3a5e9ea1f
Consult avar for normalizing user-space values in conditionsets
2023-03-15 09:16:06 +00:00
Nikolaus Waxweiler
d1b916ad04
Add missing location argument
...
and make code nicer.
2023-03-15 09:16:06 +00:00
Behdad Esfahbod
1deed38b8d
[avar2] Add compile test
2023-03-14 14:09:32 -06:00
Nikolaus Waxweiler
f926909fef
Make code nicer
2023-03-14 18:24:07 +00:00
Harry Dalton
70ca6dec9b
Identify the culprit glif in read errors with a loose backport of PEP678
...
This commit annotates errors from GlyphSet.readGlyph() with the details
of the glyph that originated them (e.g. name, path to glif). This is
implemented with a loose backport of PEP678, to avoid adding a wrapper
error that would be less specific and would break API compatibility.
In addition, this commit adds a test to ensure that the new details are
present (specifically, in the case of parsing invalid XML).
2023-03-14 15:58:18 +00:00
Jens Kutilek
032616b106
Revert black formatting of inline instruction docs ( #3037 )
...
* Revert black formatting of inline instruction docs
* Ignore block when formatting
* Format instruction list with spaces
2023-03-14 16:48:21 +01:00
Jens Kutilek
f1a75bacb2
Handle string input to Program.fromAssembly() ( #3038 )
...
* Add tests for fromAssembly() output (#3036 )
* Handle string input to fromAssembly() (Fixes #3036 )
* Fixups suggested by @anthrotype
* Add some more typing annotations
* Program.assembly always returns List[str] now
* Add annotation for bytecode
* Move code from setter to fromAssembly
* Remove property
* Fix attribute names
2023-03-14 14:51:16 +01:00
Khaled Hosny
59008b2313
Typos
2023-03-13 16:59:23 +02:00
Khaled Hosny
fd6c81585f
[otlib] Add a config option to write GPOS 7 lookups
...
See the inline comment and option documentation
2023-03-13 16:34:33 +02:00
Cosimo Lupo
580e3b3b50
otTables: forgot to actually import TTLibError ugh
2023-03-10 19:22:58 +00:00
Behdad Esfahbod
85036d5d83
[avar2] Revert unneeded change to VarIdxMap
...
We don't use VarIdxMap anymore.
2023-03-10 11:36:31 -07:00
Cosimo Lupo
3c9aa76893
Merge pull request #3027 from fonttools/colr-clipboxes
...
[COLRv1] Add method to automatically compute ClipBoxes, w/ optional quantization
2023-03-10 15:43:35 +00:00
Cosimo Lupo
c15e77cbc9
ot-spec says skewX angle should be counter-clockwise so we must negate
...
Transform.skew method assumes skewX angle goes clockwise.
verified using test_glyphs-glyf_colr_1.ttf test font from googlefonts/color-fonts repo.
Will add that to the tests.
2023-03-10 13:16:05 +00:00
Cosimo Lupo
55cc41a24e
[otTables] implement Paint.getTransform, Paint.computeClipBox & COLR.computeClipBoxes
...
This for now only works for static COLR table, not variable.
2023-03-10 13:16:04 +00:00
Cosimo Lupo
217742cc44
Merge pull request #3032 from fonttools/getGlyphID-KeyError
...
ttFont.getGlyphID should raise KeyError on missing glyphs
2023-03-10 12:11:33 +00:00
Cosimo Lupo
b137fd9616
ttFont: raise KeyError from getGlyphID instead of returning None
...
Fixes #3030
2023-03-10 11:38:55 +00:00
Guillaume Ayoub
b2c75bede4
Fix glyph compilation code
2023-03-10 11:34:16 +01:00
Harry Dalton
1f3380300b
Wrap XML library exceptions with glifLib types when parsing glifs
...
This allows dependent projects to catch errors parsing glifs without
requiring logic to account for which XML library fonttools is using
internally (e.g. for implementing fonttools/ufoLib2#264 ).
This commit also adds tests to ensure that the exception we expose when
glifs have invalid syntax remains stable across future releases.
2023-03-09 16:11:32 +00:00
Behdad Esfahbod
e9e55b29f7
chmod otData.py
2023-03-08 13:19:51 -07:00
Cosimo Lupo
17f431b9c2
[otTables] switch to generic table traversal for Paint.traverse
2023-03-08 19:19:50 +00:00
Cosimo Lupo
7433c5dbb9
[otTraverse] allow to use custom callback to iterate over subtables
2023-03-08 19:13:48 +00:00
Cosimo Lupo
92fbac8a64
[arrayTools] add quantizeRect
2023-03-08 19:03:50 +00:00
Behdad Esfahbod
b6acb83920
[avar2] Fix fromXML a bit
2023-03-08 11:44:23 -07:00
Behdad Esfahbod
90dd0685a4
[avar] black
2023-03-08 11:24:26 -07:00
Behdad Esfahbod
43b16df8db
[avar] Update test expectations
2023-03-08 11:10:07 -07:00
Behdad Esfahbod
6c35a5b65c
[avar2] Always set Version during compile
2023-03-08 11:04:52 -07:00
Behdad Esfahbod
06c725388a
[avar] Fix a few tests
2023-03-08 11:02:52 -07:00
Behdad Esfahbod
564dddced2
[avar2] Fix fromXML crash
2023-03-08 10:56:45 -07:00
Behdad Esfahbod
c8d32f2bb1
[avar2] Use DeltaSetIndexMap instead of VarIdxMap
2023-03-08 10:56:07 -07:00
Behdad Esfahbod
8dfad13288
[avar2] Implement toXML
2023-03-08 09:48:32 -07:00
Behdad Esfahbod
2b5686205e
[avar] Support previous API in compile/decompile
...
Using the otData mechanism with handcoded shim.
2023-03-08 09:29:58 -07:00
Cosimo Lupo
1a202ab1be
Merge pull request #3024 from fonttools/no-overwrite-stat
...
[varLib] Don't overwrite pre-existing STAT
2023-03-08 13:00:34 +00:00
Behdad Esfahbod
fd822a2602
Merge branch 'main' into avar2
2023-03-07 11:21:20 -07:00
Behdad Esfahbod
6ba1302ce4
black
2023-03-07 11:19:22 -07:00
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
8f3d697faa
mtiLib: check for FONTTOOLS_LOOKUP_DEBUGGING env var
...
We do the same for feaLib.builder to decide whether to build a Debg table or not: i.e. we check if FONTTOOLS_LOOKUP_DEBUGGING environment variable is defined and if so we go on to build one, otherwise we don't.
Fixes https://github.com/fonttools/fonttools/pull/3018
2023-03-07 12:02:45 +00:00