34 Commits

Author SHA1 Message Date
Nikolaus Waxweiler
b51a2b616e Minor: revert docstring change 2019-09-13 18:28:08 +01:00
Nikolaus Waxweiler
51c8a7a3e1 Remove some unused imports 2019-09-13 18:27:05 +01:00
Nikolaus Waxweiler
54dc6b2dcc Minor: adjust docstring 2019-09-13 18:27:05 +01:00
Nikolaus Waxweiler
0f5b6e2e83 Reduce use of py23 2019-09-13 18:27:05 +01:00
Nikolaus Waxweiler
66dec63231 Trim now redundant code in ufoLib.utils 2019-09-13 18:27:05 +01:00
Nikolaus Waxweiler
bc344380e8 Upgrade syntax to Python 3.6+ 2019-09-13 18:27:05 +01:00
Nikolaus Waxweiler
01328213c7 Remove __future__ imports 2019-08-09 12:20:13 +01:00
justvanrossum
faadb91c8b remove leftover comma, should fix #1666 2019-07-22 15:53:42 +02:00
Miguel Sousa
ddff29cb5d Fix DeprecationWarning: invalid escape sequence 2019-04-01 14:04:14 -07:00
Khaled Hosny
e0b517a6e7 A couple ufoLib.pointPen → pens.pointPen 2019-02-14 23:38:11 +02:00
Chris Simpkins
7458cebda1 [ufoLib glifLib] minor typo fix 2019-01-23 11:21:06 -05:00
Cosimo Lupo
42ab9aba57
[ufoLib] rename deprecated fs.setbytes -> writebytes
Follow up of #1445
Fixes #1424
2019-01-15 11:07:04 +00:00
Nikolaus Waxweiler
f47fee933c
ufoLib, fs calls: Replace deprecated getbytes with readbytes (#1445)
fs 2.2.0 comes with some renamed APIs.
2019-01-15 09:49:24 +00:00
Cosimo Lupo
78f572294f
Revert "UFOReader: have readInfo return a dict"
This reverts commit 440c71345a88f32ccad06d662fb30272f9253f07.
2018-10-25 16:55:59 +01:00
Cosimo Lupo
440c71345a
UFOReader: have readInfo return a dict
but keep current behavior whereby caller can pass an Info object.
The readInfo method was the only one that takes an output argument,
all the others just return some raw data.
I like to fully construct my classes in their __init__ method.
E.g. Info(**reader.readInfo())
2018-10-25 15:36:08 +01:00
Cosimo Lupo
59d9abf5f3
UFOReader: getFileModificationTime should be without leading underscore
that's what it's currently in UFOReader. The UFOWriter and GlyphSet will gain that one for free.
2018-10-24 17:43:47 +01:00
Cosimo Lupo
46ffe7ef42
reuse __enter__, __exit__ and close methods from UFOReader superclass 2018-10-24 14:14:37 +01:00
Cosimo Lupo
8cc613fda3
ufoLib: remove stray print()
I forgot this in a previous commit
2018-10-24 12:37:37 +01:00
Cosimo Lupo
7f3bf46096
ufoLib: use a single (abstract) base class for sharing methods between UFOReader, UFOWriter and GlyphSet 2018-10-23 20:41:35 +01:00
Cosimo Lupo
0a9e1e56ef
ufoLib: Add UFOReaderWriter alias of UFOWriter 2018-10-23 20:40:53 +01:00
Cosimo Lupo
3167e31be8
ufoLib: also reuse _readLayerContents method
plus fix some redundant 2to3 left-overs
2018-10-23 20:30:52 +01:00
Cosimo Lupo
f997005fb7
make UFOWriter a subclass of UFOReader, use mixins for shared methods 2018-10-23 19:43:37 +01:00
Cosimo Lupo
1a14b38de2
UFOWriter: normalize path by removing trailing slashes
or else os.path.dirname(Font.ufo/) would think that the directory doesn't exist...
2018-10-23 19:10:39 +01:00
Cosimo Lupo
fe4381df56
ufoLib: add readData, writeData and removeData methods 2018-10-21 15:42:02 +01:00
Ben Kiel
8bb9d0ed6c Change UFOLib creator 2018-10-19 11:25:52 -05:00
Cosimo Lupo
8081bf57fa
etree/plistlib/glifLib: using (default) single quotes in XML_DECLARATION
https://github.com/fonttools/fonttools/pull/1335#issuecomment-431118568
2018-10-18 19:49:52 +01:00
Cosimo Lupo
6b1bf4247b
move pointPen to fontTools.pens subpackage; keep ufoLib.pointPen alias 2018-10-18 16:03:09 +01:00
Cosimo Lupo
b23a208805
ufoLib: fix doctests failing on py27 for unicode_literals
I hate doctests.
2018-10-18 15:40:32 +01:00
Cosimo Lupo
3e19f6d985
keep fontTools.ufoLib.etree as a shim module for fontTools.misc.etree 2018-10-18 11:12:08 +01:00
Cosimo Lupo
081b0fc090
keep fontTools.ufoLib.plistlib compatibility shim
the old readPlist, writePlist are only kept in fontTools.ufoLib.plistlib,
not in fontTools.misc.plistlib
2018-10-18 11:11:34 +01:00
Cosimo Lupo
176b5f763d
change 'import ufoLib' to 'import fontTools.ufoLib' 2018-10-17 17:43:28 +01:00
Cosimo Lupo
7ee7ccd568
move ufoLib.etree to fontTools.misc.etree
we can use this ElementTree-like XML API for ttx or designspaceLib, not
just ufoLib
2018-10-17 17:30:39 +01:00
Cosimo Lupo
e42bfd65f4
move ufoLib.plistlib to fontTools.misc.plistlib
As PLIST are not only UFOs (e.g. DesignSpace documents)
2018-10-17 17:29:34 +01:00
Cosimo Lupo
7cd80a37dd
move Lib/ufoLib to Lib/fontTools/ufoLib 2018-10-17 17:05:17 +01:00