16 Commits

Author SHA1 Message Date
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
176b5f763d
change 'import ufoLib' to 'import fontTools.ufoLib' 2018-10-17 17:43:28 +01:00
Cosimo Lupo
7cd80a37dd
move Lib/ufoLib to Lib/fontTools/ufoLib 2018-10-17 17:05:17 +01:00