20 Commits

Author SHA1 Message Date
Khaled Hosny
cf08265cd5 Black 2024-02-06 15:47:35 +02:00
Cosimo Lupo
335a1e56ec re-run black v23.10 on all .py files 2023-11-03 10:25:15 +00:00
Nikolaus Waxweiler
d584daa8fd Blacken code 2022-12-13 11:26:36 +00:00
Cosimo Lupo
83ee6bcdab ttCollection: don't close file inside init if lazy=True
Fixes 'seek of closed file' error #2549
2022-03-17 12:30:40 +00:00
Cosimo Lupo
c08bfc1e1a ttCollection: fix 'ResourceWarning: unclosed file'
Thanks Mike L.
2022-03-10 18:12:23 +00:00
Khaled Hosny
000bf81700 Default to "\n" for newlinestr instead of None
If newlinestr is None, os.linesep is used, bu it is the third millennium
and we don’t need or want different line endings per-platform.
2021-07-30 04:12:33 +02: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
msoxzw
fcbbce5ca2
Add with statement context manager like ttFont 2019-10-21 07:03:45 +00:00
Nikolaus Waxweiler
01328213c7 Remove __future__ imports 2019-08-09 12:20:13 +01:00
Cosimo Lupo
5682693a3e
[ttCollection] don't seek(0) when writing to possibly unseekable strems
see 0daed6eb59 (r27608260)
2018-02-16 18:02:05 +00:00
Behdad Esfahbod
c99a731adb [ttc] Implement saveXML() 2018-01-25 17:50:03 -08:00
Behdad Esfahbod
370368d8c2 [ttc] Implement table sharing in save() 2018-01-25 17:08:30 -08:00
Behdad Esfahbod
fb77bd0b0c [ttc] Don't close file, we need it if lazy reading 2018-01-25 16:55:40 -08:00
Behdad Esfahbod
de54c280cc [ttc] Fix saving 2018-01-25 16:48:13 -08:00
Behdad Esfahbod
0daed6eb59 [ttc] Implement TTCollection.save()
Doesn't share tables currently.
2018-01-25 15:33:30 -08:00
Behdad Esfahbod
bd06ecce7c [ttc] Towards saving TTCs, prep work 2018-01-25 15:08:31 -08:00
Behdad Esfahbod
764e27556d [ttc] Move tag check 2018-01-25 14:50:46 -08:00
Cosimo Lupo
1c5e892894
revert closeStream to try fix failing pypy tests
reverts commit 28cf254c
2018-01-24 15:41:19 -08:00
Behdad Esfahbod
49b6004040 Move TTFont into fontTools.ttLib.ttFont
Users can still import TTFont from fontTools.ttLib.  It was for
cleaning up only.
2018-01-23 16:12:46 -08:00
Behdad Esfahbod
76ba3b423f [ttc] Move to fontTools.ttLib.ttCollection
TTCollection can still be imported from fontTools.ttLib.
2018-01-23 15:46:51 -08:00