216 Commits

Author SHA1 Message Date
Denis Jacquerye
d05df7eb7e Python 2/3: replace str by basestring 2015-11-18 13:22:14 +00:00
Adrien Tétar
0d3cdb1ee4 glifLib: open files as binary to avoid line-endings normalization 2015-11-08 15:41:43 +01:00
Adrien Tétar
0b60503f4f test: fix a test on Windows 2015-11-08 11:49:06 +01:00
Adrien Tétar
ae7ad468c0 stop importing robofab in the test suite 2015-11-08 11:33:29 +01:00
Adrien Tétar
e345fec96f meta: remove robofab files 2015-11-08 11:11:11 +01:00
Denis Jacquerye
5b43ab5b42 ufoLib.test.test_glifLib: undo some 2to3 2015-11-06 15:11:04 +00:00
Denis Jacquerye
3be6afbf72 ufoLib.test.test_glifLib: remove test for robofab’s glyphNameToShortFileName 2015-11-06 15:06:52 +00:00
Denis Jacquerye
929ed4454c ufoLib: drop READ_MODE and WRITE_MODE 2015-11-06 15:06:52 +00:00
Denis Jacquerye
92bf29bd70 ufoLib.glifLib: add anchors to list of attributes in description of readGlyph() and writeGlyph() 2015-11-06 15:06:51 +00:00
Denis Jacquerye
31d358af40 test_UFOConversion, test_UFO{1,2,3}: use plistlib load and dump 2015-11-06 15:06:51 +00:00
Denis Jacquerye
3df210b68f ufoLib.test.test_glifLib: testRoundTrip() anchors don't come in the same order anymore 2015-11-06 15:06:51 +00:00
Denis Jacquerye
c643b67f08 ufoLib.glifLib: glyph.drawPoints(None) should set attr anchors 2015-11-06 15:06:51 +00:00
Denis Jacquerye
e1dd985741 ufoLib.glifLib: undo some 2to3 2015-11-06 15:06:51 +00:00
Denis Jacquerye
7deef57dd0 ufoLib.__init__: add basestring in Python3 and undo 2to3 2015-11-06 15:06:51 +00:00
Denis Jacquerye
07c10687c4 test_gliflib: new file name scheme 2015-11-06 15:06:51 +00:00
Denis Jacquerye
d70348e8a7 test_gliflib: use io.open 2015-11-06 15:06:50 +00:00
Denis Jacquerye
ab842f1e01 ufoLib.test.test_UFOConversion: absolute import 2015-11-06 15:06:50 +00:00
Denis Jacquerye
9c0c7e5177 ufoLib.test.test_UFO1, test_UFO2, test_UFO3: absolute import, unicode_literals, explicit bytes, use io.open 2015-11-06 15:06:50 +00:00
Denis Jacquerye
b6cb3738c8 ufoLib.test.testSupport, test_GLIF1 and test_GLIF2: unicode_literals, use basestring 2015-11-06 15:06:50 +00:00
Denis Jacquerye
72df478a91 ufoLib.plistlib: use basestring 2015-11-06 15:06:50 +00:00
Denis Jacquerye
c74ced8246 ufoLib.plistFromTree: utf-8 is good 2015-11-06 15:06:49 +00:00
Denis Jacquerye
ba7259a99c ufoLib.plistFromTree: absolute import 2015-11-06 15:06:49 +00:00
Denis Jacquerye
3dabb84be5 ufoLib.xmlTreeBuilder: use io.open and basestring 2015-11-06 15:06:49 +00:00
Denis Jacquerye
77f2e022c7 ufoLib.validators: use io.open, use basestring instead of str 2015-11-06 15:06:49 +00:00
Denis Jacquerye
c6f84bdd9a ufoLib.glifLib: use basestring instead of str 2015-11-06 15:06:49 +00:00
Denis Jacquerye
dc94aa17a7 ufoLib.glibLib: use io.StringIO, ioBytesIO, io.open 2015-11-06 15:06:49 +00:00
Denis Jacquerye
66e5ae0242 ufoLib __init__.py: use io.StringIO, io.BytesIO, and standard plistlib load and dump 2015-11-06 15:06:49 +00:00
Denis Jacquerye
41cb5a8d4c validators: use basestring 2015-11-06 15:06:49 +00:00
Denis Jacquerye
f9ff5e5cfe filenames: use basestring 2015-11-06 14:10:43 +00:00
Denis Jacquerye
90a5af640b glifLib: add READ_BYTES_MODE and WRITE_BYTES_MODE 2015-11-06 14:10:42 +00:00
Denis Jacquerye
edfee17e5f glifLib: use basestring and glyphSet maybe None in glyphNameToFileName() 2015-11-06 14:10:42 +00:00
Denis Jacquerye
607cdf9a39 ufoLib __init__: typo 'maetainfo' -> 'metainfo' 2015-11-06 14:10:42 +00:00
Denis Jacquerye
fd8440a223 validators: png signature as bytes 2015-11-06 14:10:42 +00:00
Adrien Tétar
7cd33cdca7 glifLib: cleanup returns_unicode 2015-11-06 14:10:42 +00:00
Adrien Tétar
3fd0c69d65 ufoLib meta: post-2to3 fixes 2015-11-06 14:10:42 +00:00
Adrien Tétar
1602f21e58 plistlib: remove HACK that does not pass python 3 2015-11-06 14:10:41 +00:00
Adrien Tétar
337ef3202b ufoLib meta: automated 2to3 conversion 2015-11-05 09:30:43 +00:00
Erik
3c73b66e4c Store pairs as tuples. 2015-11-02 15:28:06 +01:00
Erik
41b9d73f6e In some cases it is useful to have access to the exact pairs that trip the kerningValidator (for fixing, editing, warning). So kerningValidator keeps track of the pairs, then returns them with the other results. In order not to break existing calls to kerningValidator, rename it to kerningValidatorReportPairs and add a small wrapper that filters only returns the first two items. 2015-11-01 22:09:58 +01:00
Adrien Tétar
ff8bd252d4 ufoLib: previousFormatVersion None-check 2015-09-27 16:39:30 +02:00
Tal Leming
1498573218 Merge pull request #41 from anthrotype/fix_undefined_name
[filenames] fix NameError
2015-06-24 10:57:27 -04:00
Cosimo Lupo
9eeafb5462 [filenames] fix NameError 2015-06-24 14:01:37 +01:00
Lasse Fister
e875cfe3ec Add default layerOrder to writeLayerContents 2014-12-08 23:11:55 +01:00
Lasse Fister
24676b3ebb Repair and refactor UFOWriter._writePlist to be more DRY
`UFOWriter._writePlist` constructs the full path to the file to be written;
but the calling code did so, too.

This reliefs the calling code of `UFOWriter._writePlist` from knowing
how to construct the full path and thus makes the code more DRY.
Also, this fixes the faulty behavior that was caused by the double
path construction.
A further new helper `UFOWriter._deleteFile` was added to fully enable the
removal of path construction in the callers.
2014-12-08 23:10:46 +01:00
Lasse Fister
b498155890 use shared _getPlist implementation in UFOWriter 2014-12-08 21:33:39 +01:00
Lasse Fister
d8788cc8d5 prepare sharing of UFOReader._getPlist implementation 2014-12-08 21:33:33 +01:00
Lasse Fister
39af9f6495 Refactor and fix wrong usage of UFOReader._readPlist
All cases where UFOReader._readPlist was used suffered
from calling it with the fully constructed path where
it expected just the relative path/fileName of the plist.

Also, all cases had the similiar pattern of checking if
the file exists before trying to read it.

This replaces that pattern by `_getPlist`. The method has
a `default` argument that acts similar to the `default`
argument of the builtin function `getattr` i.e. when
`default is None` the requested plist is mandatory.
2014-12-08 21:31:46 +01:00
Lasse Fister
d8dccbfe9b Add additional location for xmlWriter
Analogous to 42b7d1239e
by @benkiel
2014-12-08 21:27:50 +01:00
Lasse Fister
418b6859c8 Define UFOReader._checkForFile as an alias of os.path.exists
Maybe we should rather replace it with os.path.exists, as this
would make the code easier to read. Also os.path.exists is already
used very often in ufoLib.__init__
2014-12-08 21:27:24 +01:00
Erik
479759844c Add validator test to converters doctest.
Make sure the kerning validator is ok with both old and converted
groups. It seems to be.
2014-02-25 14:23:35 +01:00