11 Commits

Author SHA1 Message Date
Nikolaus Waxweiler
d584daa8fd Blacken code 2022-12-13 11:26:36 +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
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
Simon Cozens
775dc6074e
fontTools.misc.* documentation, part 2 (#1981)
* Document misc.filenames
* Document misc.fixedTools
* Document misc.intTools
* Document misc.loggingTools
* Document misc.macCreatorType
* Document misc.macRes
* Document misc.plistlib
2020-06-08 15:53:48 +01:00
Nikolaus Waxweiler
969df8303b Remove some Python 2 era import gaming 2019-10-11 22:36:33 +01:00
Nikolaus Waxweiler
01328213c7 Remove __future__ imports 2019-08-09 12:20:13 +01:00
Just van Rossum
327b05d8c0
[designspaceLib] [t1Lib] [misc.macRes] fix some cases where pathlib.Path objects were not accepted (#1421)
* fix two cases where pathlib.Path objects were not accepted

* make macRes reader accept os.PathLike objects

* use __fspath__ explicitly to support os.PathLike paths

* use __fspath__ explicitly to support os.PathLike paths

* convert tmpdir to str

* only test pathlib.Path on Python 3.6 and up
2018-12-30 12:07:05 +01:00
Cosimo Lupo
e4ab85e90a macRes: fix OverflowError while reading resource on 32-bit Python
Fixes https://github.com/behdad/fonttools/issues/436
2015-12-15 11:01:26 +00:00
Cosimo Lupo
f8e8ea6e7f [macRes] use tostr(s, encoding='mac-roman') for resource types and names 2015-10-26 14:38:20 +00:00
Cosimo Lupo
2f212ac59a [macRes] add default value [] to self.get(resType)
ops!
2015-10-26 05:16:22 +00:00
Cosimo Lupo
db70dee031 [macRes] new module and ResourceReader to read Mac resource/data forks
inspired by Sascha Brawer's GNU Classpath Java implementation

https://gcc.gnu.org/viewvc/gcc/trunk/libjava/classpath/gnu/java/awt/font/opentype/MacResourceFork.java?view=co&content-type=text%2Fplain
2015-10-26 04:40:00 +00:00