Tal Leming
5867e9bc8b
Don't rebuild the list of existing file names each time a glyph is written. That's expensive.
2018-06-13 12:37:49 -04:00
Tal Leming
efd2575a6a
Remove some validation escaping.
2018-06-12 20:40:32 -04:00
Ben Kiel
f81e9b8c6f
Fix tests, needed named arg.
2018-06-12 09:15:36 -05:00
Ben Kiel
83303d56a7
Add in more valiator switches
2018-06-11 23:13:00 -05:00
Tal Leming
4c75212ee6
Relax the point data validation.
2018-06-11 21:44:50 -04:00
Ben Kiel
a7aa115fd8
Update glyphLib.
...
Update tests.
Fix errors.
Add documenation.
2018-06-11 15:03:54 -05:00
Ben Kiel
5f8b600221
Catch additonal calls to GlyphSet that need validation. Inital start of adding validation on/off to GlyphSet
2018-06-11 12:05:36 -05:00
Frederik Berlaen
4549c6a2d4
an anchor is a move point with a name
...
check if the point has a name
if no name is given its a single move point in a contour
2018-01-26 23:18:25 +01:00
Adrien Tétar
8946a5f753
More
2017-11-17 13:18:44 +01:00
Adrien Tétar
a2ffce8596
typo
2017-11-04 22:59:01 +01:00
Adrien Tétar
99c5c4fff5
Use dedicated Error
2017-11-04 22:56:12 +01:00
Adrien Tétar
f0d67574ab
Some optimizations to glifLib
2017-11-04 22:18:20 +01:00
Ben Kiel
0bc4ab9497
Remove duplicate variable assignment
2017-02-27 10:18:02 -06:00
Denis Moyogo Jacquerye
e6a1a658f0
glifLib: try importing from fontTools.misc.xmlWriter first
...
fixes #41
2016-10-13 21:42:51 +01:00
Cosimo Lupo
ee38446982
glifLib.py: use +IGNORE_EXCEPTION_DETAIL to make doctest work on both Python2 and 3
...
http://python3porting.com/problems.html#handling-expected-exceptions
2016-09-11 17:00:13 +01:00
Denis Moyogo Jacquerye
bb21cb7c3a
userNameToFileName expects userName to be unicode strings, let it raise
...
if not
2016-07-11 13:49:59 +01:00
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