Behdad Esfahbod
3806fd2558
Move a couple of functions outline
2024-05-22 18:45:28 -06:00
Behdad Esfahbod
7471ac6d4d
[gvar] Speed up loading by not reading all offsets
2024-05-22 18:45:28 -06:00
Behdad Esfahbod
61916c1034
[gvar] Speed up loading a bit
...
More to come.
2024-05-22 18:45:28 -06:00
Behdad Esfahbod
7de1306d92
[CFF2Index] Make even faster
...
Load offsets on-demand as well.
2024-05-22 18:45:28 -06:00
Behdad Esfahbod
feb6820d03
[_LazyList] Make much faster
2024-05-22 18:45:28 -06:00
Behdad Esfahbod
450c8f1581
[CFF2Index] Make loading lazy
...
Still too slow, but much faster.
2024-05-22 18:45:28 -06:00
Behdad Esfahbod
5faf139417
[CFF2Index] Minor massage
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
c952237ed3
[otConverters] Make _LazyList generic
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
c50a0f6195
[VARC] Rename a type
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
950d39b9d3
[VARC] Finish drawing!
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
c69fd12251
[VARC] Move code around
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
4b6c574d54
[VARC] More towards drawing
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
68277fc0b5
[TupleVariation] Fix 32bit reading / writing
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
8cce745d90
[TupleVariation] Assert message
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
bcd5e4c216
Rip out glyf1 VarComposites
...
In favor of separate VARC table.
ttGlyphSet does NOT yet know how to draw VARC table though.
The 9 failing tests are all VarComposite-related and need
to be updated with VARC equivalents eventually when we
add VARC support to subsetter and instancer.
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
ec78b572c9
[MultiVarStore] Fix up XML read/write
...
Looks complete now.
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
c78ba01c80
[VarCompositeGlyph] Use two varIdxes per component
...
Seems to save space now with MultiVarStore.
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
b4d3fc54b2
[TupleVariation] Support 32bit encoding in delta-encoding
...
Uses an used combination of top two bits.
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
02c6a94529
[VARC] Use TupleVariation value encoding
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
0e9eff8990
Add MultiVarStore
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
1a1e9e198b
[VARC] Use one varIndexBase only
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
aad01a9d85
[VARC] Towards XML
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
ef6903e097
[VARC] Start
...
Based on https://github.com/harfbuzz/boring-expansion-spec/issues/103#issuecomment-1856325577
2024-05-22 18:45:27 -06:00
Simon Cozens
9acbd12637
Better failure mode for sstruct ( #3500 )
...
* Check format fits and give sensible error if not
* sstruct.getformat now returns dictionaries, merge them
2024-05-07 14:01:46 +01:00
Behdad Esfahbod
ed092f2552
[avar] Raise exception instead of assert
2024-04-03 07:55:04 -06:00
Behdad Esfahbod
6e0acc9e4b
Add a couple of __getitem__'s
2024-04-02 10:38:36 -06:00
Behdad Esfahbod
bf6ff3b514
[avar] Add support for mapping avar2
...
Untested.
2024-04-02 10:23:09 -06:00
Behdad Esfahbod
781dda70de
[ttFont] Move some code into fvar and avar modules
2024-04-02 10:23:09 -06:00
Simon Cozens
430e364db7
Compile aux fields
2024-03-19 16:46:37 -06:00
Khaled Hosny
cf08265cd5
Black
2024-02-06 15:47:35 +02:00
Thatchapon Unprasert
447c9e1887
Support sbix Glyphs with graphicType "flip" ( #3433 )
...
* Support sbix Glyphs with graphicType = "flip"
Since iOS 17.4 beta, Apple introduced the "flip" graphic type for the sbix glyphs to reference the another glyph to be flipped by their render engine. Their use case is for directional emojis.
Example emoji: https://emojipedia.org/woman_walking_facing_right#technical
This is the example of the output XML after this PR:
```
<glyph graphicType="flip" name="u1F3C3.0.M.u27A1" originOffsetX="0" originOffsetY="0">
<ref glyphname="u1F3C3.0.M" />
</glyph>
```
Before, it was just `<hexdata>` with some data in it.
2024-01-26 11:09:44 +00:00
Cosimo Lupo
f96b2128a1
[feaLib] keep declaration order of ligatures within ligature set
...
Fixes #3428
2024-01-24 12:59:00 +00: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
4610bf39e3
[glyf] skip empty components when computing bounds of composite glyphs
2023-11-14 16:47:20 +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
53e71f9eb7
Merge pull request #3309 from fonttools/pyup-scheduled-update-2023-10-23
...
Scheduled weekly dependency update for week 43
2023-11-03 10:33:00 +00:00
Cosimo Lupo
335a1e56ec
re-run black v23.10 on all .py files
2023-11-03 10:25:15 +00:00
Cosimo Lupo
92cbfee0d0
[Debg] in toXML, dump the JSON as multi-line string with indentation
...
the table is for debugging, so let's make it easier for human-beings to read its content when dumped to TTX
2023-10-26 14:56:29 +01:00
Behdad Esfahbod
db393f6560
[glyf] Review feedback
2023-10-16 12:30:36 -04:00
Behdad Esfahbod
67be79d77a
[glyf] Use a boundsCache within _setCoordinates
...
Speeds up "pixel" fonts that reuse the same component a lot.
Speeds up instantiating Handjet by 47%.
2023-10-14 13:02:21 -04:00
Behdad Esfahbod
e1117da0af
[glyf] Speed up getGlyphID()
...
Speeds up compiling of fonts with lots of composite glyphs.
For example, 40% speedup in decompile/compiling Handjet font:
./fonttools ttLib Handjet\[ELGR,ELSH,wght\].ttf -t'*' -o out.ttf
2023-10-14 12:57:32 -04:00
Behdad Esfahbod
cc09d5f381
[TupleVariation] Slightly speed up compileCoords
...
Small but measurable speedup.
2023-10-14 12:57:32 -04:00
Behdad Esfahbod
9eeee75b03
[glyf] Speed up recalcBounds()
2023-10-13 13:53:44 -04:00
Behdad Esfahbod
fe37e91258
[glyf] Speed up recalcBounds of composite glyphs
...
Brings down decompile/compiling of Handjet font from 11s to 0.3s.
Test with:
time ./fonttools ttLib Handjet.ttf -o out.ttf -tglyf
Part of fixing https://github.com/fonttools/fontbakery/discussions/4301
2023-10-13 13:52:19 -04:00
Behdad Esfahbod
377105f0c1
[glyf] Speed up coordinates slice access
2023-10-13 12:22:48 -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