Behdad Esfahbod
0e52857ffe
[VARC] Start drawing VARC glyphs
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
a30ebf0a2f
Revert "Remove some more remnants of VarComposites in ttGlyphSet"
...
This reverts commit 98d30dcf45e71b4352d9bfe2fee6ce4bfa198248.
2024-05-22 18:45:27 -06:00
Behdad Esfahbod
e9551c483a
Remove some more remnants of VarComposites in ttGlyphSet
...
Going to re-add for VARC table.
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
Behdad Esfahbod
4e57e36c8b
Typo
2024-05-16 18:17:40 -07: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
a25e584955
[removeOverlaps] Show in --help
2024-04-30 13:13:53 -06: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
Behdad Esfahbod
2c9d97652d
[ttFont] Add reorderGlyphs
...
Fixes https://github.com/fonttools/fonttools/issues/2060
2024-03-30 17:22:38 -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
Behdad Esfahbod
9afac79105
[lerp_recording] Make into a generator
2023-12-07 04:49:59 -07:00
Behdad Esfahbod
167e0cb646
[ttGlyphSet] Use lerp_recordings
2023-12-07 04:49:59 -07:00
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
Behdad Esfahbod
772dc549f3
[ttGlyphSet] Add option to not recalculate glyf bounds ( #3348 )
...
Avoids unnecessary work in the interpolator.
2023-11-21 12:06:57 -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
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
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