Behdad Esfahbod
4f6c739181
Move LerpGlyphSet and lerp_recordings to more prominent places
...
Fixes https://github.com/fonttools/fonttools/issues/3361
2023-12-07 04:49:59 -07:00
Cosimo Lupo
f518e5a704
[OS/2] don't error getting/setting codepages if version=0
...
return empty set, or set the bits and bump the version to match
2023-11-15 12:21:02 +00:00
Cosimo Lupo
aaed718e41
[glyf_test] Test that composite referencing empty glyph also gets zero bounds
...
Add reproducer for possible regression in Glyph.recalcBounds introduced with https://github.com/fonttools/fonttools/pull/3301
2023-11-14 16:30:26 +00:00
Khaled Hosny
be8ec35934
[OS/2] Add recalcCodePageRanges
...
Ported from the ufo2ft code (which is port from FontForge code), with
some additional functions for parity with recalcUnicodeRanges.
2023-11-11 01:54:00 +02:00
Cosimo Lupo
335a1e56ec
re-run black v23.10 on all .py files
2023-11-03 10:25:15 +00:00
Behdad Esfahbod
27932c525b
[glyf] Add tests for getGlyphID()
2023-10-16 13:14:01 -04:00
Khaled Hosny
ae31d05605
[ttLib] Fix warning when calling addMultilingualName() with "ar" name
...
I get warning from _makeMacName() because it does not have a TTFont, but
the font is there, just not passed from addMultilingualName() ->
findMultilingualName() -> _makeMacName().
2023-08-13 14:21:32 +03:00
Cosimo Lupo
d2fd4dfb24
C_O_L_R_test: add test for paint pointed to by both 3- and 4-byte offsets
2023-08-04 11:45:20 +01:00
Behdad Esfahbod
09464e5825
Comment
2023-06-27 09:53:37 -06:00
Behdad Esfahbod
9974a74a18
[cubic-glyf] Fix drawPoints() contour ending with cubic offCurve
...
Fixes https://github.com/fonttools/fonttools/issues/3189
2023-06-27 11:48:25 -04:00
Behdad Esfahbod
1138e5b0df
[Tests] Add cmap to dot-cubic.ttf
...
So we can test it with svgPathPen.
2023-06-27 08:54:42 -06:00
Behdad Esfahbod
4ae0a93692
black
...
I'm sorry.
2023-06-27 08:49:31 -06:00
Behdad Esfahbod
9983ffe27a
[cubic-glyf] Fix tests
...
Ouch.
2023-06-27 08:47:56 -06:00
Cosimo Lupo
4298c28e3c
add 2nd test contour to expose bug in dropImpliedOnCurvePoints
...
there's a bug whereby we don't correctly drop impliable oncurve if it occurs on the first point of the second contour.. because we forgot to update the contour start = last + 1...
2023-06-06 17:00:16 +01:00
Cosimo Lupo
5b93100616
also check endPtsOfContours in dropImpliedOnCurvePoints
...
as per review https://github.com/fonttools/fonttools/pull/3147#discussion_r1214708207
Also, don't do same work multiple times when dropping points from flags/endPtsOfContours arrays since these are supposed to be the same for all interpolatable glyphs
2023-06-05 12:11:17 +01:00
Cosimo Lupo
6a276d9f6a
dropImpliedOnCurvePoints: raise if incompatible, skip empty/composites
2023-06-02 13:51:28 +01:00
Cosimo Lupo
a039e1dda8
_g_l_y_f_test: add tests for dropImpliedOnCurvePoints
2023-06-01 19:27:32 +01:00
Ben Kiel
fb74c16d47
Ran black on code
2023-05-28 08:28:28 -05:00
Ben Kiel
c30f4e5074
fix lint error
2023-05-28 08:19:54 -05:00
Ben Kiel
bdc3afc468
Add in a test for writing private data
2023-05-28 08:12:11 -05:00
Behdad Esfahbod
a99e130b26
[Tests] Silence a few deprecation warnings
2023-05-24 14:38:41 -06:00
Jens Kutilek
85c80be6b6
Fix missing composite instructions in ttx ( #3092 )
...
* Fix calculation of haveInstructions
* Add test
2023-04-25 16:21:24 +02:00
Cosimo Lupo
df42e9d1e4
ttLib_main.py: test directly __main__.main(), coverage-py doesn't collect in subprocess
2023-04-24 11:48:36 +01:00
Cosimo Lupo
cb5aa96702
add missing __main__.py file to ttLib package, plus some tests
...
Fixes https://github.com/fonttools/fonttools/issues/17
2023-04-24 11:22:53 +01:00
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