406 Commits

Author SHA1 Message Date
Cosimo Lupo
8859d8669d
ttFont_test: add tests for unseekable input file with lazy=True 2023-03-21 18:15:02 +00:00
Cosimo Lupo
1d5feb81e5
ttFont_test: add reproducer for SpooledTemporaryFile has no seekable
Reproduces https://github.com/fonttools/fonttools/issues/3052
2023-03-21 18:08:21 +00:00
Behdad Esfahbod
05872d6878
Merge pull request #2679 from fonttools/avar2
Avar2
2023-03-15 11:56:30 -06:00
Behdad Esfahbod
2edbbc1b32 [avar2] Test xml for equality 2023-03-15 11:46:57 -06:00
Behdad Esfahbod
b009e63733 [avar2] Use fl2fi in test 2023-03-15 11:40:24 -06:00
Behdad Esfahbod
1deed38b8d [avar2] Add compile test 2023-03-14 14:09:32 -06: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
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
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
Johannes Neumeier
f52b3da721 Make NameRecord comparison not fail on encoding errors #3006 2023-02-24 15:58:53 +02: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
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
b7deb93647 Move VarComposite roundtrip tests to glyf_test 2023-02-06 11:09:11 -07:00
Behdad Esfahbod
4c201b9a42 [glyf/VarComposite] Implement padding trimming 2023-02-06 11:00:05 -07:00
Behdad Esfahbod
08d03a82b2 [VarComposite] Fix test font component LSB's 2023-02-04 12:28:56 -07:00
Behdad Esfahbod
0701bd5161 More VarComposite compile test 2023-02-04 11:53:21 -07:00
Behdad Esfahbod
b63f0141e4 Fix varc-6868 component lsb's 2023-02-04 11:49:30 -07:00
Behdad Esfahbod
e3a37f07bf Add test for previous commit 2023-02-03 15:29:32 -07:00
Behdad Esfahbod
07096d4af4 Add test for compile/decompile toXML/fromXML of VarComposites 2023-02-03 14:24:25 -07:00
Behdad Esfahbod
fbf09fb24d [ttGlyphSet_test] Test that RecordingPointPen records VarComposite 2023-02-03 11:03:04 -07:00
Behdad Esfahbod
2e20e47473 [transform] Rename VarTransform to DecomposedTransform 2023-02-03 09:05:55 -07:00
Behdad Esfahbod
69966aa5d7 [BasePen] Add addVarComponent() 2023-02-02 15:25:09 -07:00
Behdad Esfahbod
e07fafc324 [scaleUpem_test.py] Scale other varComposite font as well
Just because it's there.
2023-02-01 19:06:10 -07:00
Behdad Esfahbod
2c2a0964d7 [ttGlyphSet_test] Add another varComposite test
This one has different characteristics, hitting more code.
2023-02-01 18:56:31 -07:00
Behdad Esfahbod
1d072aa30e [scaleUpem_test] Also test readint varComposite XML
Easiest place to test it. I know...
2023-02-01 18:39:20 -07:00
Behdad Esfahbod
f3dd3fb48f [ttGlyphSet_test] Use variations in varComposite test
To hit more code with test.
2023-02-01 18:31:54 -07:00
Behdad Esfahbod
6755acceee [woff2] Add fvar to glyf dependencies
Since the VarComposites added fvar to glyf dependencies in ttLib.

Add test for VarComposite to woff2 tests.
2023-01-31 12:46:17 -07:00
Behdad Esfahbod
63d355e37d [Tests/ttGlyphSet/VarComposite] Add test
And a bugfix.
2023-01-30 11:26:21 -07:00
Behdad Esfahbod
f2cf4eea73 [Tests/scaleUpem/VarComposite] Add test 2023-01-30 11:26:21 -07:00
Nikolaus Waxweiler
d584daa8fd Blacken code 2022-12-13 11:26:36 +00:00
Cosimo Lupo
b4e664da21
[woff2] Add support for encoding/decoding OVERLAP_SIMPLE glyf flags in WOFF2
Fixes #2576

This updates our woff2 encoder/decoder to support retaining the OVERLAP_SIMPLE glyf flag following the updated WOFF 2.0 specification and official google/woff2 implementation.

https://www.w3.org/TR/WOFF2/#glyf_table_format
2022-11-09 13:56:46 +00:00
Cosimo Lupo
12bf60aee0
woff2_test: [minor] remove unused local variable 2022-11-09 11:08:37 +00:00
Cosimo Lupo
04b43ed833
woff2_test: fix test_hmtx_compressed test
it had been failing after we renamed a name string containing 'master' => 'main; in https://github.com/fonttools/fonttools/pull/2883
2022-11-09 11:06:04 +00:00
Parag Nemade
0a176acabc
Update branch name from master to main 2022-11-09 10:11:02 +05:30
Behdad Esfahbod
5a9b044617 [scaleUpem] Fix test 2022-10-04 12:43:39 -06:00
Just van Rossum
6e6b86d41a [ttGlyphSet] Add comment to clarify the test 2022-09-20 11:17:58 +02:00
Just van Rossum
fa4a5f33b4 Add test case 2022-09-20 10:54:09 +02:00
Miguel Sousa
1306a71db3
Merge pull request #2786 from fonttools/msousa-bad-post-format-1
Don't crash when `post` format 1 is improperly used
2022-08-31 08:52:49 -07:00
Miguel Sousa
96c9250cf8 Update warning message [skip ci] 2022-08-31 08:52:17 -07:00
Cosimo Lupo
36de9df3cc [gvar] be non lazy for TTFont.lazy=False, add ensureDecompiled
like cmap, or glyf or OTL tables, we need to respect lazy=False flag and decompile everything upfront, also we want to add an ensureDecompiled method (called by TTFont.ensureDecompiled) to allow loading everything in one go even when a font had been opened lazily.
2022-08-31 11:10:50 +01:00
Miguel Sousa
a2efac012c Add warning log 2022-08-30 23:56:03 -07:00
Miguel Sousa
0e9c48e6ab Don't crash when post format 1 is improperly used
Fixes #2736
2022-08-30 09:14:03 -07:00