35 Commits

Author SHA1 Message Date
Tom Archer
0b93480808 Change startwith or statement to use tupple of strings rather than or. 2020-05-22 15:56:48 +01:00
Tom Archer
b88f717885 Get test working that shows duplicates are removed 2020-05-22 09:53:40 +01:00
Tom Archer
2b654a1d2a Add code that removes duplicates when parsing groups.plist 2020-05-20 11:59:16 +01:00
Cosimo Lupo
c57e843d1f
UFOReader: close underlying fs object if UFOLibError raised in constructor 2020-05-07 16:53:38 +01:00
Cosimo Lupo
57f4904363
ufoLib/glifLib: use TupleEnum instead of namedtuple for {UFO,GLIF}FormatVersion
Also add dedicated Unsupported{UFO,GLIF}Format exceptions in
fontTools.ufoLib.errors module
2020-05-07 16:53:38 +01:00
Cosimo Lupo
c066cfc4d5
WIP: ufoLib: support UFO formatVersionMinor and GLIF formatMinor 2020-05-05 18:52:30 +01:00
Nikolaus Waxweiler
f30e41b863 [ufoLib] Only write fontinfo.plist when there is content 2020-04-30 11:11:43 +01:00
Cosimo Lupo
8423e01a18
ufoLib: don't crash if UFO2 has openTypeHheaCaretOffset=0.0
validators are picky so give them integers when they want integers
2020-02-15 13:25:45 +00:00
Jens Kutilek
6c3edaded2
ufoLib groupnames conversion 2 → 3 (#1762)
* If a group name is the same as a glyph name, it cannot be a kerning group name
* Add test
2019-11-22 09:51:35 +01:00
Nikolaus Waxweiler
cf2fd0671b Assume layer and glyph names are always str 2019-09-14 22:11:20 +01:00
Nikolaus Waxweiler
562052bb86 Don't allow byte layer names 2019-09-14 21:55:46 +01:00
Nikolaus Waxweiler
9825553e06 Use !r in-string formatter syntax instead of repr(value) 2019-09-13 18:45:19 +01:00
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
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
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