Behdad Esfahbod
40adc5760a
[glyf/VarComponent] More towards getCoordinates
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
24e368349f
[glyf/VarComponent] Fix use of .location
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
48dafdb351
[glyf/VarComponent] Use .location
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
5d5569d77a
[glyf/VarComponent] Fix fromXML
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
4dcbed503a
[glyf] Black
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
f84d0845cd
[glyf/VarComponent] Implement compile()
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
fb170aadfb
[glyf/VarComponent] Implement fromXML
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
76802fbd92
[glyf/VarComponent] Scale rotation values
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
828a407846
[glyf/VarComponent] Add toXML
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
aba64ea402
[glyf] Remove copy/pasted unimplemented VarComponent code
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
86420d1150
[gvar] Decompile VarComposite glyph
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
483013be69
[glyf] Decompile VarComponent
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
de6eee7373
[glyf] Hook up VarComposite in a few places
...
Unimplemented functions.
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
0f3b7b5b99
[glyf] Add isVarComposite()
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
796cfe750a
[glyf] Remove __getitem__
...
This used to iterate over components. Pretty weird choice.
2023-01-30 11:26:20 -07:00
Behdad Esfahbod
f651809ac5
[glyf] endPointsOfContours is unsigned
2023-01-17 09:12:49 -07:00
Nikolaus Waxweiler
d584daa8fd
Blacken code
2022-12-13 11:26:36 +00:00
Behdad Esfahbod
3d2fa8a342
[glyf] Return component transform as part of control data
...
This makes sure that when we are building variable fonts, we
check that all masters have the same component transform in
composite glyphs. We were not checking for this before.
2022-10-20 11:05:08 -06:00
Behdad Esfahbod
2a8f408b31
Fix signature of ensureDecompiled()
2022-08-17 14:27:47 -06:00
Behdad Esfahbod
9b0d0e7b56
[visitor] ensureDecompiled(recurse=False)
2022-08-15 12:09:26 -06: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
7f1e5e1fc7
glyf: add ensureDecompiled method
...
to 'expand' all the lazy glyphs
2022-03-17 12:51:56 +00:00
Simon Cozens
3e0caa881e
[docs] Fully document the glyf table ( #2457 )
...
* Fully document the glyf table
* Correct docs for getGlyphName/getGlyphId
* Fix typo
* Grammar nits
2021-12-02 15:32:20 +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
Cosimo Lupo
616fc065e0
add deprecation warnings for old getPhantomPoints, etc.
2021-05-13 10:13:28 +01:00
Cosimo Lupo
3c98250dbd
g_l_y_f: fix undefined name 'topSideBearing'
...
Fixes #2295
2021-05-13 10:12:46 +01:00
Eigi
1091ff5e05
#2289 fix for typo in typo in ttLib.tables._g_l_y_f.py
2021-05-06 14:33:57 +02:00
Behdad Esfahbod
51a76e319e
[glyf] Add old setCoordinates, getCoordinatesAndControls, getPhantomPoints
...
https://github.com/fonttools/fonttools/pull/2266
2021-04-14 14:36:35 -06:00
Behdad Esfahbod
a756bb01ab
[glyf] Prefix setCoordinates, getCoordinatesAndControls, getPhantomPoints
...
Will add old name with old API next.
2021-04-14 14:09:40 -06:00
Behdad Esfahbod
24140e154e
[glyf] Add default=None to glyf.get()
2021-04-14 13:36:07 -06:00
Behdad Esfahbod
d12d7fbb75
[glyf] Remove unused code
...
Also simplify bounds check.
2021-04-13 15:13:00 -06:00
Behdad Esfahbod
15c34e9ba9
[glyf] Add .get() which is like __getitem__() but returning None if not found
...
And use it in a couple places.
2021-04-13 15:06:25 -06:00
Behdad Esfahbod
3cbbc25d29
[glyf] Remove useless assert in setCoordinates()
2021-04-13 13:50:01 -06:00
Behdad Esfahbod
34b5ff623c
[varLib] Optimize getPhantomPoints()
...
To reduce calling TTFont.__getitem__ many times per glyph!
2021-04-13 13:49:12 -06:00
Behdad Esfahbod
ddf2f0369b
[glyf] Remove useless assert in getPhantomPoints()
2021-04-13 13:27:03 -06:00
Behdad Esfahbod
ee5ecd19d7
[varLib/glyf] Remove fallback vertical phantom-points code
...
I suggested Cosimo add that code in
https://github.com/fonttools/fonttools/pull/1528
Upon further inspection now, that code is unnecessary and even wrong in
cases where different masters have different ascent, because that would
result in encoding variations for vertical phantom points, which will
be then either be unused or double-apply on top of ascent etc.
2021-04-12 18:28:01 -06:00
Behdad Esfahbod
b3a9ef551a
[GlyphCoordinates] Use double, not float, again
...
https://github.com/fonttools/fonttools/pull/2261#discussion_r609928776
2021-04-09 11:43:44 -06:00
Behdad Esfahbod
f40ca25726
[GlyphCoordinates] Remove isFloat() again
...
Based on subsequent review feedback.
2021-04-08 11:22:08 -06:00
Behdad Esfahbod
faaac34acf
[GlyphCoordinates] Add back isFloat() and deprecate it
2021-04-08 10:58:58 -06:00
Behdad Esfahbod
c206341bb0
[GlyphCoordinates] Inline _i()
2021-04-08 10:52:40 -06:00
Behdad Esfahbod
645a3eb104
[GlyphCoordinates] Use float.is_integer()
2021-04-08 10:43:20 -06:00
Behdad Esfahbod
c5e3fca636
[GlyphCoordinates] Format
2021-04-08 09:48:35 -06:00
Behdad Esfahbod
869f00507b
[glyf] Use bytearray() instead of array.array('B') for flags
2021-04-08 09:41:45 -06:00
Behdad Esfahbod
db918e3355
[glyf] Use bytearray() in trim()
2021-04-08 09:41:45 -06:00
Behdad Esfahbod
bbbc877af9
[glyf] Remove several bytes slicings
2021-04-08 09:41:45 -06:00
Behdad Esfahbod
c23a540d07
[GlyphCoordinates] Micro-optimize _i() access
2021-04-08 09:41:45 -06:00
Behdad Esfahbod
b5af979fbd
[glyf] Minor
2021-04-08 09:41:45 -06:00
Behdad Esfahbod
1f3c23e62b
[glyf] Remove most use of py23 byteord etc
2021-04-08 09:41:45 -06:00
Behdad Esfahbod
693bf0457a
[glyf] Remove reprflag()
...
If compatibility is an issue, we should rewrite it in terms of "bin(flag)".
2021-04-08 09:41:45 -06:00