Nathan Williis
e5eb053105
Docs: add boilerplate docstrings to table converters. Mostly links to reference specs.
2024-12-04 15:58:46 +00: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
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
Behdad Esfahbod
2a15c450a4
[EBDT/EBLC] Make them work with TTVisitor
2022-08-18 06:10:52 -06: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
46c8f90da8
Use _ to denoted unused loop variable
2020-05-07 21:00:28 +01:00
Cosimo Lupo
c5dfbab521
EBLC: fix padding length calculation for Format 3 IndexSubTable
...
Fixes #1817
2020-01-31 17:30:12 +00:00
Nikolaus Waxweiler
01328213c7
Remove __future__ imports
2019-08-09 12:20:13 +01:00
justvanrossum
723e7a1d3c
updated inline github issue URLs
2019-03-06 16:01:28 +01:00
Adrien Tétar
a4a3ae6d49
EBLC: fixes for py3 zip
...
Closes #909 .
2017-04-10 01:10:45 +02:00
Behdad Esfahbod
bf28ca10d7
[EBLC] Decompile and release copies of data early
...
Apparently string slices are not as smart as I was hoping for.
Slicing a looong (say, 1MB) string and holding onto it is not a
good idea if done thousands of times. So, do fewer slicings and
decompile subtables immediately instead of holding onto data.
This makes me want to rethink the kind of data structures we use
for lazy processing.
Fixes https://github.com/behdad/fonttools/issues/317
2016-03-02 11:31:20 +09:00
Cosimo Lupo
7d67e9c257
[E_B_L_C_] replace print with logger
2016-01-27 19:01:12 +00:00
Behdad Esfahbod
1ae29591ef
from __future__ import absolute_import
...
Such that our Python 2 is closer to Python 3.
Part of https://github.com/behdad/fonttools/issues/77
2014-01-14 15:07:50 +08:00
Behdad Esfahbod
9e6ef94b55
Use "is None" instead of "== None"
...
The latter hits the __eq__ method and can fail because we now
do not allow comparing objects of different types.
For example, was failing subsetting Andika-R.ttf.
2013-12-04 16:35:10 -05:00
Behdad Esfahbod
e388db566b
py23 Use new-style classes
...
Such that we get the same semantics in both Python 2 and 3.
2013-11-28 18:53:30 -05:00
Behdad Esfahbod
4be8db031d
Fix up EBLC/EBDT non-lazy decompile
...
Fallout from 3d8d5cd10d2d30ba9997b7cc43336e504111be9a.
2013-11-28 17:32:43 -05:00
Behdad Esfahbod
18316aa769
ps23 More bytes fixes. All ''join()'s fixed
2013-11-28 17:32:43 -05:00
Behdad Esfahbod
32c10eecff
py23 from __future__ import division and adjust divisions
2013-11-28 17:32:42 -05:00
Behdad Esfahbod
30e691edd0
py23 from __future__ import print_function
2013-11-27 17:27:45 -05:00
Behdad Esfahbod
7ed91eca1e
py23 import in all nontrivial source files and unused import cleanup
2013-11-27 15:25:00 -05:00
Behdad Esfahbod
14fb031125
Remove most uses of module string
2013-11-27 14:01:44 -05:00
Behdad Esfahbod
b774f9f684
2to3 --fix=types manual additions
...
Don't know why the tool didn't catch these.
2013-11-27 14:01:44 -05:00
Behdad Esfahbod
3ec6a25823
2to3 --fix=print with manual fixup
2013-11-27 04:57:33 -05:00
Behdad Esfahbod
e5ca79699d
2to3 --fix=map with manual cleanup
2013-11-27 04:38:16 -05:00
Behdad Esfahbod
ac1b435946
2to3 --fix=idioms
2013-11-27 04:15:34 -05:00
Behdad Esfahbod
fa5f2e85ab
2to3 --fix=zip with manual cleanup
2013-11-27 04:13:15 -05:00
Behdad Esfahbod
28aeabb08b
2to3 --fix=filter
2013-11-27 04:07:28 -05:00
Behdad Esfahbod
4b775ee5f1
2to3 --fix=itertools
2013-11-27 03:48:06 -05:00
Behdad Esfahbod
97dea0a5d0
2to3 --fix=xrange
2013-11-27 03:34:48 -05:00
Behdad Esfahbod
3a9fd30180
2to3 equivalent to --fix=tuple_params
...
I hope I got this all right...
2013-11-27 03:30:21 -05:00
Behdad Esfahbod
cd5aad92f2
2to3 --fix=raise
2013-11-27 02:42:28 -05:00
Behdad Esfahbod
2b06aaa2a6
2to3 --fix=import
2013-11-27 02:34:11 -05:00
Behdad Esfahbod
3d8d5cd10d
Port ttLib to respect font.lazy
...
I *hope* I didn't break anything...
Notably, cffLib is not ported yet.
2013-11-24 19:58:57 -05:00
Behdad Esfahbod
8413c108d2
Move sstruct under fontTools.misc
...
Our footprint in the Python module namespace is all under
fontTools now. User code importing sstruct should be updated
to say "from fontTools.misc import sstruct".
2013-09-17 16:59:39 -04:00
Matt Fontaine
c33b0a22ef
Add support for standard EBLC/EBDT embedded bitmaps
2013-08-19 14:15:46 -04:00