Behdad Esfahbod
377105f0c1
[glyf] Speed up coordinates slice access
2023-10-13 12:22:48 -04:00
Behdad Esfahbod
36eec087c4
[ttLib.main] Accept list of tables to decompile
...
Useful for performance measurement of load / save.
2023-10-13 12:13:21 -04:00
Cosimo Lupo
5c8bce194b
Merge pull request #3162 from robhagemans/bugfix-ebdt-reversebytes
...
Bug fix for `TypeError` in `_reverseBytes()` in module `E_B_D_T_`, currently breaks on `bytes` arguments longer than 1
2023-10-06 11:14:10 +01:00
Cosimo Lupo
442576fb1f
Fix UnbouldLocalError and let {h,v}hea be no-op when no {v,h}mtx is present
...
Fixes https://github.com/fonttools/fonttools/issues/3289
2023-10-06 10:30:33 +01:00
Cosimo Lupo
880d7b3f9d
black
2023-08-20 11:59:40 +01:00
Cosimo Lupo
457f11c29b
Fix AttributeError: 'OffsetToWriter' object has no attribute 'repeatIndex'
...
Fixes #3260
2023-08-20 11:47:54 +01: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
a8d5d45b39
Merge pull request #3241 from fonttools/better-packer
...
[otBase/packer] Allow sharing tables reached by different offset sizes
2023-08-04 16:06:15 +01:00
Behdad Esfahbod
4ccbcf3eb3
[COLR] Fix thinko
2023-08-03 17:56:38 -06:00
Behdad Esfahbod
286e6466cd
[otBase/packer] Remove offsetSize from OTTableWriter
2023-08-03 11:17:41 -06:00
Behdad Esfahbod
2b629e51c2
[otBase/packer] Allow sharing tables reached by different offset sizes
...
This makes us match hb-subset now.
Fixes https://github.com/fonttools/fonttools/issues/3236
2023-08-03 11:10:16 -06:00
Rob Hagemans
0e691fb432
add doctest to _reverseBytes (not detected due to _memoize)
2023-07-22 15:46:19 +01:00
Rob Hagemans
4801d84ecc
fix _memoize, as suggested by Cosimo Lupo
2023-07-22 12:24:32 +01:00
Behdad Esfahbod
530e409416
[name] Speed up NameRecordVisitor
...
Don't visit large tables without any name records.
2023-07-20 10:16:04 -06:00
Behdad Esfahbod
d27cc3abf8
Revert "Merge pull request #3214 from fonttools/subset-speed-regression"
...
This reverts commit f7965ba0086ebad9e3fa103935dc2edf41ffe780, reversing
changes made to 31319a7ef218237eea7cd6713ec29032a5cdd752.
2023-07-20 10:16:04 -06:00
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