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
Adrien Tétar
52ca505cb9
objectsDefcon: typo
2015-09-27 15:14:28 +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
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
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
Tal Leming
ab41436934
Redundant test. Caught by Lasse Fister.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@576 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2012-05-11 18:00:18 +00:00
Tal Leming
da3a12b104
Redundant test. Caught by Lasse Fister.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@575 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2012-05-11 17:57:39 +00:00
Tal Leming
4158e6aea2
Handle the default layer test a bit more efficiently. Caught by Lasse Fister.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@574 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2012-05-11 17:53:17 +00:00
Tal Leming
89daa72612
Checks needed for the dir attribute. Caught by Lasse Fister.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@573 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2012-05-11 17:42:58 +00:00
Tal Leming
a6ae274211
Wrong value being pushed to a function. Caught by Lasse Fister.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@572 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2012-05-11 17:40:33 +00:00
Tal Leming
d001b43ea7
validKeys was not referenced. Caught by Lasse Fister.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@571 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2012-05-11 17:38:27 +00:00
Erik van Blokland
8c864d3171
This adds a simple test of the MarginPen object. Basically to make sure the update to new style object doesn't cause any problems. Can't tell because AngledMarginPen seems to have other internal problems.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@569 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2012-03-07 15:01:12 +00:00
Erik van Blokland
ab3c6bca2f
This adds a simple test of the MarginPen object. Basically to make sure the update to new style object doesn't cause any problems.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@568 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2012-03-07 14:21:38 +00:00
Erik van Blokland
445e45d755
This adds a simple test of the ControlBoundsPen object. Basically to make sure the update to new style object doesn't cause any problems.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@567 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2012-03-07 11:28:46 +00:00
Just van Rossum
a12cd22201
removed oboloete adapter pen
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@566 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2012-03-07 10:34:45 +00:00
Tal Leming
c96d464472
Bug fix patch from Lasse Fister.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@563 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2012-02-21 12:59:23 +00:00