Cosimo Lupo
f92dcf36c1
don't write layerinfo.plist if 'lib' element is empty
2016-06-28 13:52:23 +01:00
Cosimo Lupo
f6689faf5b
glifLib: don't raise AttributeError if element.text attribute is None
...
When an element tree is built from code, or it is parsed from a string that was not pretty-printed (i.e. without indentation), the 'text' attribute of an Element instance can be None. So we must ensure it's not None before calling `strip()` method.
2016-06-25 19:04:24 +01:00
Cosimo Lupo
971a92bfe8
glifLib: use len() to check if ElementTree.Element is empty or contains children
2016-06-05 19:07:45 +01:00
Adrien Tétar
81e6c235af
glifLib: fixup contour validation code
2016-05-31 09:59:02 -07:00
Denis Moyogo Jacquerye
b8f4145d76
glifLib: raise error when text is in <glyph> and in <outline>
2016-05-31 14:33:58 +01:00
Denis Moyogo Jacquerye
16e2c0f308
use unicode_literals
2016-05-31 11:23:05 +01:00
Adrien Tétar
8044d2fb88
Use ElementTree in glifLib and drop embedded XML parsing infrastructure
2016-05-20 11:11:15 -07:00
Cosimo Lupo
ace2a4a6bc
[glifLib] use use repr() to stringify floats for py23 compat
...
Closes #19
2016-03-17 16:06:03 +00:00
Adrien Tétar
fab99c30e5
plistlib: reimplement as shim
2016-03-01 12:43:04 +01:00
Adrien Tétar
ded0d09cd1
plistlib API dispatch
2016-02-27 17:04:58 +01:00
Adrien Tétar
cb104104b0
glifLib: remove legacy workaround
2016-02-27 14:53:04 +01:00
Adrien Tétar
9e5dbff662
gliflib: use stdlib plistlib
2016-02-27 14:52:35 +01:00
Adrien Tétar
67414f21ff
pointPen: add adapter pens
...
and annihilate remaining robofab dependency
2015-12-13 20:48:01 +01: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
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
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
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
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
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
337ef3202b
ufoLib meta: automated 2to3 conversion
2015-11-05 09:30:43 +00:00
Lasse Fister
d8dccbfe9b
Add additional location for xmlWriter
...
Analogous to 42b7d1239e
by @benkiel
2014-12-08 21:27:50 +01:00
Tal Leming
f08ef513ee
Don't assume that the glyph name is ASCII.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@561 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2012-02-21 01:42:52 +00:00
Tal Leming
4cf0d74b48
Clarified a requirement in the spec: smooth is allowed in any point type except offcurve.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@546 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2012-01-17 15:13:52 +00:00
Tal Leming
b836b3287a
Made _validateAndMassagePointStructures run about 0.00003985 seconds faster. This should resolve ticket #22 .
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@506 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-12-06 15:35:44 +00:00
Tal Leming
98318feb3c
Validate the lib when writing a glyph.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@504 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-11-21 17:48:55 +00:00
Tal Leming
f7db746770
Added a modification time method.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@483 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-28 16:59:16 +00:00
Erik van Blokland
9eb79f866c
Fix the imports to reflect the move of robofab.pens.pointPen to ufoLib.pointPen.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@454 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-20 20:50:46 +00:00
Tal Leming
182a199c2c
Allow a subset of the glyphs to be searched.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@417 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-18 19:13:09 +00:00
Tal Leming
69a04a7d7a
Remove the filtering of loose offcurves in open contours when writing.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@414 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-18 13:03:59 +00:00
Tal Leming
994b7e0ff3
Only let off curves precede a move in GLIF 1.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@413 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-18 12:53:29 +00:00
Tal Leming
62bd9d2774
Validate public.markColor.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@412 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-17 20:32:20 +00:00
Tal Leming
7f6b0a7d69
Nicer warnings.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@411 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-17 20:18:30 +00:00
Tal Leming
64ebada787
Don't let any loose offcurves into slip into an open path.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@410 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-17 20:03:14 +00:00
Tal Leming
ba3c6d4f53
THings were getting hard to follow in the bi-format reader. I split it. It results in more code but it should be easier to maintain.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@409 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-17 19:31:38 +00:00
Tal Leming
cde4ada2f7
Old anchor format fixes.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@408 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-17 16:39:25 +00:00
Tal Leming
105f895277
Set the collected anchors.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@407 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-17 16:27:33 +00:00
Tal Leming
08732962b4
Special handling of anchors in GLIF 1. This was never part of the spec, but all glifLib uses that I know of did things this way.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@406 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-17 13:29:07 +00:00
Tal Leming
a2895df22f
Break the read function into smaller chunks.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@405 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-16 13:32:03 +00:00
Tal Leming
9042825ed5
Remove old print.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@404 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-15 17:45:06 +00:00
Tal Leming
d16091c27e
Support new anchor element.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@403 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-15 17:43:57 +00:00
Tal Leming
dcd97ba1ea
Fallback to the image transformation defaults if an attribute is not provided.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@397 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-11 17:31:27 +00:00
Tal Leming
cac9911f3e
Reworked the Unicode value fetching and added new component and image fetching options.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@392 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-11 14:08:24 +00:00
Tal Leming
427241c82d
Name fetching is no longer needed.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@391 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-11 11:39:44 +00:00
Tal Leming
b6bed08dfa
Don't read GLIF 2 in UFO 1 or UFO 2.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@390 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-07 13:54:14 +00:00