856 Commits

Author SHA1 Message Date
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
595e2e1057 setup.py: print 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
Ben Kiel
2c2ffb97c0 Merge pull request #45 from khaledhosny/setup
Add setup.py file to ufo3k branch
2015-11-04 13:14:32 -06: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
Erik van Blokland
6f8a2d9b28 Merge pull request #48 from adrientetar/patch-1
ufoLib: fixes
2015-09-27 21:27:26 +02:00
Adrien Tétar
ff8bd252d4 ufoLib: previousFormatVersion None-check 2015-09-27 16:39:30 +02:00
Adrien Tétar
52ca505cb9 objectsDefcon: typo 2015-09-27 15:14:28 +02:00
Khaled Hosny
0879bdd88c Add setup.py file
Based on the file from master branch with slight modifications.
2015-09-08 01:45:05 +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
Erik
eb1c0f7fba identifier keyword to beginPath
mathGlyph -> PointToSegmentPen -> drawPoints -> pointPen -> beginPath
gets an ‘identifier’ argument from the ufo3 drawPoints. Which trips an
error. This alleviates the problem but does not address anything that
beginPath should be doing with the identifier.
2015-02-22 09:45:07 +01:00
Tal Leming
a3d4e90146 Merge pull request #25 from graphicore/fix-writing-plist
UFOReader/UFOWriter fixes and updates
2014-12-31 10:46:34 -06:00
Tal Leming
a25b4537df Merge pull request #27 from robofab-developers/revert-24-fix-reading-plist
Revert "Fix reading plist"
2014-12-31 10:42:52 -06:00
Tal Leming
e45ab4755b Revert "Fix reading plist" 2014-12-31 10:42:02 -06:00
Tal Leming
eeb594b66d Merge pull request #24 from graphicore/fix-reading-plist
Fix reading plist
2014-12-31 10:41:47 -06:00
Lasse Fister
0cd65fb5e0 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 23:20:16 +01:00
Lasse Fister
b7dca42398 Add additional location for xmlWriter
Analogous to 42b7d1239e
by @benkiel
2014-12-08 23:14:41 +01:00
Lasse Fister
5a2a814d92 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 23:14:31 +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
Erik van Blokland
c5f91a02b5 Merge pull request #11 from robofab-developers/ufo3k-kerning-upconversion-additions
Incorporate additions to the kerning group conversion process.
2014-02-19 14:55:00 +01:00
Tal Leming
8dc8742959 Add write time kerning group down conversion to UFOWriter.
This allows the UFO 3 up converted kerning group names to be reset to
their original names at the time of writing in UFO <= 2.
2014-02-18 11:49:26 -05:00
Tal Leming
0f6b6d741a Fix some failing tests.
I’m not sure why these were still broken.
2014-02-18 10:29:30 -05:00
Tal Leming
2a026d368f Tie the new prefixed group locating function into the converter. 2014-02-18 10:01:24 -05:00
Tal Leming
96757fc6a1 Added function that scans for known kerning group prefixes. 2014-02-18 09:48:23 -05:00
Tal Leming
837c17c323 Return a report detailing why the kerning is invalid. 2014-02-04 10:05:58 -05:00
Erik
de4e678430 SelectFont returns the wrong value on cancel, or with no fonts to choose from.
This makes sure the dialog will return None on Cancel.
2014-01-13 12:00:01 +01:00
Erik
bce5e1bc0d In order to be able to save a note with non-ascii characters to .glif, it seems necessary to change this line. We have to assume this setting has something to do with the limitations of FontLab and Python 2.3. 2013-10-27 09:35:44 +01:00
Erik
819dc77353 Add gitignore for ufo3k branch. 2013-07-19 21:29:03 +02:00