Nikolaus Waxweiler
cf43ff5d22
Apply avar to variable locations
2023-03-15 16:19:39 +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
Behdad Esfahbod
1deed38b8d
[avar2] Add compile test
2023-03-14 14:09:32 -06: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
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
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
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
c5e464ad8f
C_O_L_R_test: add tests for computeClipBoxes
...
using a subset from test_glyphs font from the googlefonts/color-fonts repository
2023-03-10 15:23:30 +00:00
Cosimo Lupo
d64ee127be
ttFont_test: another test for missing glyph name that doesn't match 'glyph\d+' pattern
2023-03-10 11:44:52 +00:00
Cosimo Lupo
d77c8901c8
ttFont_test: add test for getGlyphID
2023-03-10 11:37:07 +00: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
43b16df8db
[avar] Update test expectations
2023-03-08 11:10:07 -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
Cosimo Lupo
d9570826ad
varLib_test: test build_many doesn't overwrite pre-existing STAT
2023-03-08 12:40:43 +00: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
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
Cosimo Lupo
ea8b9b85d7
mti_test: convert to pytest-style test module
2023-03-07 12:00:50 +00:00
Cosimo Lupo
c24558c57b
Merge pull request #3018 from fonttools/mtilib-debg
...
[mtiLib] Add debug info
2023-03-06 12:23:24 +00:00
Cosimo Lupo
8d546623d1
update mtiLib expected test files
2023-03-06 12:09:01 +00:00
Cosimo Lupo
1d6326ea61
ttx_test: test dumping and compiling from stdin to stdout
2023-03-03 16:30:23 +00:00
Jany Belluz
760c7376fe
[subset] Compute xAvgCharWidth even when --no-prune-unicode-ranges is given
2023-03-01 16:28:51 +00:00
Cosimo Lupo
d4c5eac780
Merge pull request #3007 from kontur/name-sort-encode-warning-only
...
Make NameRecord comparison not fail on encoding errors #3006
2023-02-27 16:31:19 +00:00
Behdad Esfahbod
b7b4a3b090
[varLib.featureVars] Fix bug in overlayBox
...
See added test. Previously we were cutting remainder box
even if the intersection had dimensions not present in the
remainder box. Ouch!
Fixes https://github.com/fonttools/fonttools/issues/3003
2023-02-24 07:51:00 -07:00
Johannes Neumeier
f52b3da721
Make NameRecord comparison not fail on encoding errors #3006
2023-02-24 15:58:53 +02:00
Behdad Esfahbod
e58ffdb982
[qu2cu_cli_test] Tests
2023-02-22 11:15:42 -07:00
Behdad Esfahbod
9808982ea1
[cu2qu.ufo_test] Add rudimentary all_quadratic=False tests
2023-02-22 10:17:23 -07:00
Behdad Esfahbod
45b6269cbb
[qu2cuPen_test] Fix test
2023-02-22 09:32:59 -07:00
Behdad Esfahbod
8f89a435ac
[ttGlyphPen] Rename preserveTopology to dropImpliedOnCurves
2023-02-22 09:08:39 -07:00
Behdad Esfahbod
dabd07e3cc
[ttGlyphPen_test] Add one more test
2023-02-22 08:53:35 -07:00
Behdad Esfahbod
a32118a19f
[ttGlyphPen_test] Add test with two contours
...
To exercise the remaining lines of ttGlyphPen.
2023-02-22 08:44:15 -07:00
Behdad Esfahbod
303eeeeec5
[ttGlyphPen_test] Parametrize test
2023-02-22 08:41:14 -07:00
Behdad Esfahbod
bbdee18f67
[ttGlyphPen_test] Exercise preserveTopology
2023-02-22 07:57:37 -07:00
Behdad Esfahbod
68bfd99da0
[ttGlyphPen_test] Exercise preserveTopology=False
...
Still wouldn't exercise non-empty drop codepath.
2023-02-22 07:43:14 -07:00
Behdad Esfahbod
5e141f027b
[cubic-glyf] Add test for offcurve wrap-around and all-offcurve
2023-02-21 16:52:36 -07:00
Behdad Esfahbod
9c60b86b46
[cu2quPen] Add all_quadratic=True
2023-02-21 14:52:15 -07:00
Behdad Esfahbod
a21b71ef01
[cu2qu] Add all_quadratic=True parameter
...
If set to False, then either a single quadratic or a single cubic
is returned.
2023-02-21 13:14:01 -07:00
Behdad Esfahbod
9e40409094
[woff2] Support cubic curves as untransformed glyph table
2023-02-21 13:01:49 -07:00
Behdad Esfahbod
568dd0c5d4
[glyf] Support and test cubic spline
2023-02-21 13:01:49 -07:00
Behdad Esfahbod
9df8e6dd64
Add missing test file
2023-02-21 13:01:49 -07:00
Behdad Esfahbod
0a0b152c33
[glyf] Support, and add test for, all-offcurve cubic contour
2023-02-21 13:01:49 -07:00
Behdad Esfahbod
77e96bdcd9
[glyf_test] Add cubic test
2023-02-21 13:01:49 -07:00
Behdad Esfahbod
24e798da95
[ttGlyphPen] Add tests for cubic glyf
2023-02-21 13:01:49 -07:00
Behdad Esfahbod
82e0536beb
[glyf] Support cubic curves
...
https://github.com/harfbuzz/boring-expansion-spec/issues/41
2023-02-21 13:01:49 -07:00
Behdad Esfahbod
085b489012
[qu2cuPen] Change stats
...
To count number of quadratic vs cubic segments.
2023-02-21 13:01:41 -07:00
Behdad Esfahbod
94ee47c6e4
[qu2cu] Add a test and fix a bug
2023-02-20 12:22:16 -07:00
Behdad Esfahbod
f87a897c7f
Merge pull request #2993 from fonttools/qu2cu
...
qu2cu
2023-02-20 11:04:48 -07:00
Behdad Esfahbod
d0896ac296
[qu2cu] Simplify API
...
Drop the one that was special-case of the other.
2023-02-20 10:03:30 -07:00
Behdad Esfahbod
77d25b332e
[qu2cu] Add test for oncurveless contour
2023-02-20 08:58:29 -07:00