Behdad Esfahbod
87ddb244ea
[otBase] Add comment based on review feedback
2024-05-22 18:46:07 -06:00
Behdad Esfahbod
ec78b572c9
[MultiVarStore] Fix up XML read/write
...
Looks complete now.
2024-05-22 18:45:27 -06:00
Khaled Hosny
cf08265cd5
Black
2024-02-06 15:47:35 +02: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
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
Cosimo Lupo
d9f9acd5c2
copy OTTableReader before copying/pickling lazily loaded table
...
Fixes https://github.com/fonttools/fonttools/issues/2965
2023-01-26 16:52:13 +00:00
Nikolaus Waxweiler
d584daa8fd
Blacken code
2022-12-13 11:26:36 +00:00
Garret Rieger
a33972da62
Use new uharfbuzz repack_with_tag if available.
2022-07-29 21:48:25 +00:00
Cosimo Lupo
32aa8eafcb
[otBase] fix AttributeError when uharfbuzz < 0.23.0 and 'repack' missing
...
Fixes #2671
2022-07-19 14:46:50 +02:00
Cosimo Lupo
2a07518b70
Merge pull request #2660 from fonttools/variable-colr
...
[varLib] add support for building variable COLR from set of master COLRv1 tables
2022-07-06 10:55:50 +01:00
Garret Rieger
10140f9df3
Remove TODO.
2022-06-27 18:32:04 +00:00
Garret Rieger
8196166e53
Add some additional comments about packing state machine.
2022-06-27 18:28:02 +00:00
Garret Rieger
d92fd2665c
Use enum's for repacker state.
2022-06-27 18:18:20 +00:00
Cosimo Lupo
fcd2a67f52
Merge remote-tracking branch 'origin/main' into variable-colr
2022-06-24 10:16:51 +01:00
Garret Rieger
c63b84db7e
Update how table packing falls back to fontTools from harfbuzz.
...
Introduce three compilation modes:
1. Pure python: only uses the existing fonttools packing and overflow resolution.
2. Harfbuzz+python: uses harfbuzz packing and python overflow resolution. Extensions are allowed to be shared.
3. Python fallback: if harfbuzz+python runs out of resolution options, this disables extension sharing and only uses python packing. Once it succeeds control is passed back to the harfbuzz packer to produce the final packing with extension sharing enabled.
2022-06-23 19:39:56 +00:00
Cosimo Lupo
0e6a4ec581
[otBase] temporarily disable extension sharing during harfbuzz repacking
...
If extension sharing is enabled some fonts may fail to repack due to fontTools repacker getting stuck in a unrecoverable error.
https://github.com/fonttools/fonttools/issues/2661
2022-06-23 16:34:12 +01:00
Cosimo Lupo
ca2f9e0a94
otBase: use OptionalValue.DEFAULT in populateDefaults()
2022-06-21 17:27:12 +01:00
Cosimo Lupo
97bcda9d35
otBase: define method to get variable attrs with associated VarIndexBase + {offset}
2022-06-21 17:27:11 +01:00
Cosimo Lupo
0cbdc8536b
[otBase/varLib.merger] don't recurse in ensureDecompiled, merger is already working recursively
2022-06-21 17:27:11 +01:00
Garret Rieger
086799357a
Enable sharing across subtables of extension for harfbuzz packing.
...
Harfbuzz repacker can handle subtables shared across extension lookups so there's no need to disallow such sharing. Add a parameter to _doneWriting to allow sharing to be enabled when preparing the object graph for passing to harfbuzz.
2022-05-25 23:55:43 +00:00
Cosimo Lupo
350f893e17
[otBase] demote repacker ERROR to WARNING, only 1 per loop; don't exit at firstfail
...
Fixes https://github.com/fonttools/fonttools/issues/2594
2022-04-22 19:05:54 +01:00
Cosimo Lupo
f68ce14d7a
[otBase] log the name of uharfbuzz exception
2022-04-22 15:31:34 +01:00
Cosimo Lupo
af6804bed5
make USE_HARFBUZZ_REPACKER a 3-state option, defaults to auto
...
if explicitly enabled, it will raise ImportError if uharfbuzz is not found, and will propagate the uharfbuzz error instead of silently falling back to the pure-python serializer
2022-04-21 18:11:20 +01:00
Cosimo Lupo
c204537073
[otBase] check USE_HARFBUZZ_REPACKER in TTFont.cfg, add more logging
2022-04-21 15:46:12 +01:00
Qunxin Liu
fe196bf88e
Use Harfbuzz Repacker for packing GSUB/GPOS tables
2022-04-14 10:42:50 -07:00
Cosimo Lupo
25746a3600
add clarifying comment as per review
2022-03-18 09:23:07 +00:00
Cosimo Lupo
ab8fc321a7
otBase: also return name and index from iterSubTables
...
makes it more useful for constructing generic traversals of trees of otTables
2022-03-17 17:47:41 +00:00
Cosimo Lupo
43d2ee2822
Revert "return self so one can do font=TTFont(file).ensureDecompiled()"
...
This reverts commit 61e7b294483cbe729b1437804406b4571ae57cfb.
2022-03-17 15:55:20 +00:00
Cosimo Lupo
61e7b29448
return self so one can do font=TTFont(file).ensureDecompiled()
2022-03-17 15:44:02 +00:00
Cosimo Lupo
ee27b73d7c
BaseTTXConverter: add ensureDecompiled method
...
to unlazify a whole tree of otTables, recursively
2022-03-17 12:54:22 +00:00
Cosimo Lupo
64dc37fc01
otBase: add iterSubTables method to iterate over all BaseTables
...
can be useful to traverse a tree of otTables
2022-03-17 12:53:06 +00:00
Simon Cozens
c04639af70
Add comment to demystify deduplication
2021-12-06 11:15:12 +00:00
Simon Cozens
00f37ea6b6
[docs] Split table docs into individual pages ( #2444 )
2021-11-18 09:01:27 +00:00
Khaled Hosny
232b2ccbc4
Move the rest of py23 module to textTools
...
Change all imports to use textTools module, except the test_py23.py test
which is kept until we decide to remove the module (if ever).
2021-08-20 01:29:45 +02:00
Behdad Esfahbod
7af43123d4
[otBase] Tiniest cleanup
2021-05-24 14:52:34 -06:00
Behdad Esfahbod
f21091b6ff
[otBase] Assert array.array('i').itemsize
2021-05-07 15:52:35 -06:00
Behdad Esfahbod
b8963256fd
[otBase/otConverters] Add back array index to exception in writeArray()
...
db6171df14 (r628543432)
2021-05-07 15:31:53 -06:00
justvanrossum
747f9f49b7
fix struct vs array mismatch: for array 'l' is 8 bytes, not 4. I'm not 100% sure this is correct for all platforms.
2021-05-04 18:54:26 +02:00
Behdad Esfahbod
db6171df14
[otBase] Actually call conv.writeArray()
...
Huh. Somehow the writeArray() was never wired up. We lose the failing
array index in the exception, but is fine to me.
2021-04-30 16:28:28 -06:00
Behdad Esfahbod
81ca053039
[otBase] Add array reader/writer for UInt24
2021-04-30 16:28:08 -06:00
Behdad Esfahbod
36dd271cd5
[otBase/otConverters] Add array-writers for int types
2021-04-30 15:58:45 -06:00
Behdad Esfahbod
1fd2a44bbf
[otBase] fix array-reader to return list, not array.array
...
Was not noticed because it was for the most part unused.
2021-04-30 15:57:53 -06:00
Behdad Esfahbod
df0d6bbadf
[otBase] Add array version of various int readers
2021-04-30 15:26:32 -06:00
Behdad Esfahbod
9959916c64
Merge pull request #2275 from fonttools/subset-device
...
[subset] Fix hint-dropping
2021-04-22 12:37:48 -06:00
Behdad Esfahbod
830cff6253
[ttLib] Add Value.getEffectiveFormat()
...
This ignores 0/None values that don't need to be encoded.
2021-04-21 14:10:27 -06:00
Garret Rieger
e0f1c15ad0
Include record size adjustment.
2021-04-21 12:15:29 -07:00
Just van Rossum
5fc65d7168
Misc py23 cleanups ( #2243 )
...
* Replaced all from ...py23 import * with explicit name imports, or removed completely when possible.
* Replaced tounicode() with tostr()
* Changed all BytesIO ans StringIO imports to from io import ..., replaced all UnicodeIO with StringIO.
* Replaced all unichr() with chr()
* Misc minor tweaks and fixes
2021-03-29 11:45:58 +02:00
Behdad Esfahbod
6243a24a09
[otBase] Delete .Format if was introduced by .preWrite()
...
https://github.com/fonttools/fonttools/pull/2238#issuecomment-805192631
2021-03-23 18:13:07 -07:00