416 Commits

Author SHA1 Message Date
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
Cosimo Lupo
3d891631d9 Bump version: 2.1.1 → 2.1.2.dev0 2017-10-25 12:01:13 +01:00
Cosimo Lupo
55c2be52bd Release 2.1.1 2017-10-25 12:00:47 +01:00
Erik van Blokland
f726d88bcb Remove TTVendorCode. Not sure if "NONE" is a valid one, but here it is. 2017-10-25 11:36:23 +02:00
Erik van Blokland
5408815f09 This removes 4 glyphs borrowed from Adobe Sans. These glyphs are not used in any tests.
All licenses, copyright strings, notices, trademarks, removed and pointing to the license of the package.
2017-10-25 11:34:06 +02:00
Cosimo Lupo
9c72e09e18 [validators] fix fontLibValidator doctests; make errors more verbose 2017-10-19 18:29:05 +02:00
Cosimo Lupo
25c84dcb84 Test fontLibValidator with either bytes or unicode
This passes on my local machine with both 2.7 and 3.6.
I can't seem to reproduce this error:

https://github.com/unified-font-object/ufoLib/issues/98
2017-10-19 17:34:34 +02:00
Frederik Berlaen
627f997ddb remove raise errors when the formatVersion < 3
see https://github.com/unified-font-object/ufoLib/issues/91

Im going to ahead on this as no one replied...
2017-09-26 21:58:26 +02:00
Cosimo Lupo
fb1eef601f minor 2017-08-07 18:40:36 +01:00
Chris Simpkins
659299a318 detect incorrect metainfo.plist formatVersion type before version testing (#83) 2017-07-27 22:18:42 -04:00
Cosimo Lupo
ab9985ee3a
Bump version: 2.1.0 → 2.1.1.dev0 2017-05-24 18:39:50 +01:00
Cosimo Lupo
1c5f70c873
Release 2.1.0 2017-05-24 18:38:10 +01:00
Cosimo Lupo
16abd8130c
Add bump_version and release commands to setup.py 2017-05-24 18:37:52 +01:00
Cosimo Lupo
e883885c3a
[pointPen] add ReverseContourPointPen from defcon
https://github.com/typesupply/defcon/issues/106
2017-04-25 10:50:21 +01:00
Cosimo Lupo
d952f9a74f
[pointPen] make PointToSegmentPen.addComponent accept/ignore **kwargs
The beginPath and addPoint methods of PointToSegmentPen already take
extra **kwargs (via BasePointToSegmentPen); only the addComponent method
does not.
This makes it raise TypeError when an unknown keyword argument is passed
(e.g. 'identifier' for UFO3 objects).
For the PointToSegmentPen, which translates between the PointPen and
the SegmentPen API, it is ok if we only use the arguments that have
an equivalent in the SegmentPen API, and silently discard the **kwargs.
2017-04-25 10:23:38 +01:00
Denis Moyogo Jacquerye
6ca25ce193 Merge pull request #64 from benkiel/master
Remove duplicate variable assignment
2017-03-06 13:39:29 +00:00
Ben Kiel
0bc4ab9497 Remove duplicate variable assignment 2017-02-27 10:18:02 -06:00
Cosimo Lupo
869a8f6a45
[pointPen] add **kwargs to AbstractPointPen's beginPath and addCompoment too 2017-02-27 16:04:47 +00:00
Cosimo Lupo
6739bc8b9d
[pointPen] add identifier=None argument in AbstractPointPen.beginPath, addPoint and addComponent methods 2017-02-27 12:46:06 +00:00
Cosimo Lupo
3b9ced71e0 move all test data inside the inlined ufoLib/test modules, and install them
Since the test suite is inlined, it makes sense to also have the test data installed alongside the test modules.
So all the content of the two top-level folders Data and TestData is now placed inside Lib/ufoLib/test/testadata.
The MANIFEST.in has been adjusted accordingly.
The `install_package_data` in setup.py ensures the package data specified in the manifest is installed with the package.

This way anyone who installs ufoLib (even the wheel from PyPI) can run the test suite with `pytest --pyargs ufoLib`.
2016-10-17 19:41:13 +01: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
f320554077 ufoLib.__init__: use os.path instead of slash to fix doctest failing on Windows 2016-09-11 17:44:12 +01:00
Cosimo Lupo
8747da76a4 filenames.py: fix doctests for py2.py3; import unicode_literals 2016-09-11 17:00:13 +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
Cosimo Lupo
5fb9a13957 converters.py: fix up kerningValidator doctest 2016-09-11 17:00:13 +01:00
Denis Moyogo Jacquerye
4f83f4bbe1 tests: copy doctest as unittest in test_filenames 2016-07-11 13:49:59 +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
Adrien Tétar
ec0fe57545 filenames: only allow unicode in py2
i.e. restore the old behavior
2016-07-08 21:19:16 -07: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
Tal Leming
321ea7f766 Merge pull request #33 from anthrotype/isinstance-mapping
validators: check isinstance of collections.Mapping rather than dict
2016-06-24 09:47:59 -04: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
Cosimo Lupo
fed7cef3cf validators: check isinstance of collections.Mapping rather than dict
The `collections` module provides a set of abstract base classes that can be used to
test whether a class provides a particular interface (e.g. whether it is a mapping).

It's better if ufoLib uses that with `isinstance` rather than requiring instances of
`dict`, or subclasses of `dict`.
2016-06-05 16:16:02 +01:00
Cosimo Lupo
fc4f810f61 plistFromETree: use len(element) to check if there are subelements to avoid FutureWarning 2016-06-05 16:03:24 +01:00
Adrien Tétar
81e6c235af glifLib: fixup contour validation code 2016-05-31 09:59:02 -07:00
Denis Moyogo Jacquerye
04d96d7fe0 test: split tests in test_GLIF1 and test_GLIF2 2016-05-31 09:46:57 -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
49c9640f73 test: split GLIF1 and GLIF2 tests 2016-05-31 11:25:12 +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
Tal Leming
4d26482e9a Add an optimized implementation of the kerning value lookup algorithm from the spec.
The optimization is that the caller can provide glyph to group mappings.
2016-05-16 10:22:38 -04:00
Tal Leming
185c04220d The UFO spec has changed with regard to kerning conflicts. Reflect this in ufoLib. 2016-04-22 13:30:28 -04:00
Tal Leming
e193b72ff3 Work through the pairs in a reliable order. 2016-03-28 07:19:21 -04:00
Tal Leming
44474ee8e5 Slight tweak to the reporting of problematic pairs. 2016-03-27 23:14:25 -04:00
Adrien Tétar
338d97c076 Merge pull request #21 from behdad/allow-duplicate-non-conflicting-kerning
Allow duplicate non-conflicting kerning pairs
2016-03-27 23:24:03 +02:00
Behdad Esfahbod
f5ddac0e5d Allow duplicate non-conflicting kerning pairs
Fixes https://github.com/unified-font-object/ufoLib/pull/15#issuecomment-193552682
2016-03-27 13:47: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
Cosimo Lupo
6dbca7fa38 [testSupport] use repr() to stringify floats for py23 compat
Part of fixing #19
2016-03-17 16:04:11 +00:00
Adrien Tétar
fab99c30e5 plistlib: reimplement as shim 2016-03-01 12:43:04 +01:00