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
Nikolaus Waxweiler
01328213c7
Remove __future__ imports
2019-08-09 12:20:13 +01:00
Cosimo Lupo
c42749466a
[S_V_G_] fix dumping toXML SVG tables containing colorPalettes
...
As reported by glukfonts in
https://github.com/fonttools/fonttools/issues/1124
2018-01-03 15:40:35 +00:00
Miguel Sousa
ce4af2a0a2
[SVG] correct __init__ method
2016-04-20 17:08:45 -07:00
Miguel Sousa
b9fc0b84ed
[SVG] Don't make <colorPalettes> element a requirement
2016-04-13 03:32:07 -07:00
Miguel Sousa
30c89b8a2f
[SVG] Don't write <colorPalettes> element if it's empty
2016-04-13 03:31:01 -07:00
Miguel Sousa
ff06131e47
[SVG] Better handling of empty <colorPalettes> element
2016-04-13 02:28:20 -07:00
Behdad Esfahbod
d82401bb8d
Fix SVG version-1 decompile
...
Untested. We should add tests for these.
2016-04-10 17:20:10 -07:00
Cosimo Lupo
75ec34f8ab
SVG: decompileEntryList method takes only one argument
...
I haven't tested if this works (but for sure it wasn't working before either)
2016-04-10 23:23:25 +01:00
Cosimo Lupo
c5659b28a2
[S_V_G_] replace print with logger
2016-01-27 19:02:48 +00:00
Miguel Sousa
a7aef47695
fix "indentation contains mixed spaces and tabs" errors reported by Landscape
2015-08-09 00:33:50 -07:00
Cosimo Lupo
bf0e336d31
replace all 'StringIO' with 'BytesIO'
2015-08-07 17:25:22 +01:00
Sascha Brawer
5cda3d4e72
Minor fixes to reduce the number of code smells
2015-05-06 19:17:08 +02:00
Behdad Esfahbod
b30e12ae00
More whitespace
2015-04-26 02:01:01 -04:00
Behdad Esfahbod
bd67253118
Some more whitespace fixes from pep8 tool
2015-04-26 01:59:01 -04:00
Behdad Esfahbod
13d53f081c
Minor
2015-04-21 11:08:49 -07:00
Behdad Esfahbod
612c70dada
[SVG] Support gzip-compressed SVG tables
...
Set font['SVG '].compressed=True to enable. Here's a snippet to convert a
WOFF-compressed SVG+OpenType font to a compressed SVG+OpenType non-WOFF font:
from fontTools.ttLib import TTFont
font = TTFont("NotoColorEmojiSvg.woff")
font['SVG '].compressed=True
font.flavor=None
font.save("NotoColorEmojiSvgCompressed.ttf")
2015-03-02 15:41:57 -08:00
Behdad Esfahbod
b1f46be65c
Minor
2015-03-02 15:22:39 -08:00
Behdad Esfahbod
9fc8ac0559
Whitespace
2015-03-02 13:05:29 -08:00
Behdad Esfahbod
5a7ec608c8
Fix SVG doc length calculations
...
Patch from Doug Felt.
2015-02-23 14:03:06 -08: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
Denis Jacquerye
af1c9968b2
from __future__ imports must be first for python 3.3.2
...
adding \ to break lines in fontTools/misc/transorm.py
unneeded closing parenthesis in T_S_I__1.py
2013-11-29 16:03:42 -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
ca80208a15
Revert XML name table format changes
...
For the sake of separating py23 effort from feature changes,
I'm reverting the name table XML dump format back to what it
was. I will clean it up after py23 is merged.
2013-11-28 17:33:23 -05:00
Behdad Esfahbod
6962f0cfb2
py23 XML encoding fixes
...
Name table entries that are Unicode are written out as native Unicode
now text in the XML now.
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
ac1b435946
2to3 --fix=idioms
2013-11-27 04:15:34 -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
2b06aaa2a6
2to3 --fix=import
2013-11-27 02:34:11 -05:00
Behdad Esfahbod
1e4c89f83a
Update SVG table implementation
...
New drop from Read Roberts.
2013-10-07 17:23:35 -04: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
Behdad Esfahbod
ddcca79308
Add 'SVG ' table implementation from Read Roberts (Adobe)
2013-08-28 17:25:16 -04:00