Cosimo Lupo
687e23cf3f
[NameVisitor] remove logging, caller can log if they wish
2023-07-20 10:27:30 +01:00
Cosimo Lupo
8846b57304
Merge pull request #3201 from NightFurySL2001/patch-1
...
Convert panoseDefault to namespace object
2023-07-12 19:24:16 +01:00
Cosimo Lupo
c9d965b581
Merge pull request #3185 from m4rc1e/clean-nametable
...
Remove redundant name table records
2023-07-12 19:12:15 +01:00
Marc Foley
cfede76fd9
Implement Cosimo feedback
2023-07-10 15:01:40 +01:00
NFSL2001
be44c92cfa
Update Lib/fontTools/ttLib/tables/O_S_2f_2.py
...
Co-authored-by: Cosimo Lupo <cosimo@anthrotype.com>
2023-07-07 23:12:44 +08:00
NightFurySL2001
ef8e15a08c
Use Panose class
2023-07-07 22:09:58 +08: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
4ae0a93692
black
...
I'm sorry.
2023-06-27 08:49:31 -06:00
Behdad Esfahbod
9ec121322b
[cubic-glyf] Emit integers instead of floats when possible
...
I was seeing unnecessary ".0" in the SVG output. Granted,
should probably be fixed in the SVG pen as well. Will do.
2023-06-27 08:43:44 -06:00
Behdad Esfahbod
0b11a46e3a
[cubic-glyf] Fix rendering no-oncurve outlines
...
Test coming.
2023-06-27 08:39:29 -06:00
Marc Foley
edf8891fba
Use NameRecordVisitor in subsetter
2023-06-27 15:23:56 +01:00
Marc Foley
a792851131
add removeUnusedNames staticmethod to name table
2023-06-27 12:06:18 +01:00
Rob Hagemans
2a75378fa6
_reverseBytes() may apply to bytes and ints (loop over bytes), but ints have no len()
2023-06-12 21:30:55 +01:00
Cosimo Lupo
dfec4abf6d
glyf: use 'round' parameter in _getCoordinatesAndControls
...
as Behdad suggested in review
2023-06-08 11:47:47 +01:00
Cosimo Lupo
5c0f05cc42
allow to pass 'round' parameter in ttGlyphPen, optimize for noRound
2023-06-08 11:41:07 +01:00
Cosimo Lupo
86777525a6
drop oncurve if it's impliable either before OR after rounding
...
ofter the rounding gives us an opportunity to make an oncurve impliable, for points that were not equidistant become so after round, so why not take it!
2023-06-07 18:13:58 +01:00
Cosimo Lupo
1ca554332c
_getCoordinatesAndControls: make sure coords are rounded toInt() as gvar expects
...
ufo2ft will no longer send varLib already-rounded master glyf tables (to give it an opportunity to compute implied oncurves on the pre-rounded coords) so when retrieving coordinates off the glyf table in order to compute gvar deltas we have to round
2023-06-07 18:05:48 +01:00
Cosimo Lupo
0761508510
must update start = last + 1 in dropImpliedOnCurvePoints
...
Fixes #3155
2023-06-06 17:01:40 +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
3b62811b63
have dropImpliedOnCurvePoints return the set of point indices useful for testing
2023-06-01 18:21:59 +01:00
Cosimo Lupo
e19871981d
add docstring to dropImpliedOnCurvePoints function
2023-06-01 16:49:30 +01:00
Cosimo Lupo
b7f4e9b83e
move dropImpliedOnCurvePoints function to glyf table module
...
so it can be used by client code on multiple glyf Glyph objects regardles of TTGlyphPen
2023-06-01 16:49:29 +01:00
Ben Kiel
d11a67010f
privData needs to pad with bytes not str
2023-05-25 10:30:28 -05:00
Tim Maffett
61ca53ab10
fix ttx split tables option to work on source files which have been url encoded and contain the '%' character
2023-04-28 17:07:44 -07: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
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
Just van Rossum
56b543826c
re-wrap
2023-04-18 14:38:50 +02:00
Just van Rossum
82441262e7
Update link to Apple doco
2023-04-18 14:37:34 +02:00
Cosimo Lupo
3615b565ca
sbixGlyph: don't use imageData for empty glyphs with graphicType=None
...
Fixes https://github.com/fonttools/fonttools/issues/3059
2023-03-27 15:23:13 +01:00
Cosimo Lupo
4543910367
[ttFont] fail when input is not seekable and lazy=True
...
the SFNTReader expects the input file to be seekable, and it already rewinds the file with file.seek(0) to get to the sfnt table directory. Thus, if TTFont is loaded with an unseekable file object and lazy=True, we raise a TTLibError requiring one to either pass a seekable input file, or to not set lazy=True (in which case the input is loaded in a seekable BytesIO)
Fixes https://github.com/fonttools/fonttools/issues/3052
2023-03-21 18:15:01 +00:00
Behdad Esfahbod
05872d6878
Merge pull request #2679 from fonttools/avar2
...
Avar2
2023-03-15 11:56:30 -06:00
Behdad Esfahbod
1deed38b8d
[avar2] Add compile test
2023-03-14 14:09:32 -06: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
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
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
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