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
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
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
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
Adrien Tétar
46879af112
validators: export pngSignature
...
To remove duplicate in defcon.
2016-02-21 12:11:41 +01:00
Denis Jacquerye
77f2e022c7
ufoLib.validators: use io.open, use basestring instead of str
2015-11-06 15:06:49 +00:00
Denis Jacquerye
41cb5a8d4c
validators: use basestring
2015-11-06 15:06:49 +00:00
Denis Jacquerye
fd8440a223
validators: png signature as bytes
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
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
Tal Leming
837c17c323
Return a report detailing why the kerning is invalid.
2014-02-04 10:05:58 -05: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
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
Tal Leming
e2710f2b7c
Extension elements may have an id attribute.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@562 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2012-02-21 12:55:19 +00:00
Tal Leming
e05354fe33
Duplicate records are now allowed.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@551 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2012-02-14 03:38:32 +00:00
Tal Leming
1dcbf6c73e
The last table is no longer required to be 0xFFFF.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@550 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2012-02-14 03:34:28 +00:00
Tal Leming
ff01e27763
Added a kerning validator. This must be run by the caller since groups are required. This should resolve ticket #8 .
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@507 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-12-06 18:46:31 +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
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
3bc6561e49
Allow an empty list for the gasp records.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@402 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-13 18:19:04 +00:00
Tal Leming
3721472a50
If a value is None and it is required, don't flag it as invalid.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@398 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-11 19:29:16 +00:00
Tal Leming
3e5c4689f5
Stray print.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@393 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-11 16:00:06 +00:00
Tal Leming
2cddcd6e3e
Be a bit more lenient with dict-like objects at the top level.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@387 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-06 19:23:48 +00:00
Tal Leming
85d719a3e8
Default name check.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@373 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-04 17:37:37 +00:00
Tal Leming
bed4f7e109
Simple PNG validator.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@369 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-03 19:17:39 +00:00
Tal Leming
0c40dfacc2
Layer contents validation tweaks.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@366 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-03 16:20:45 +00:00
Tal Leming
c8cad30c69
Lightly validate the lib.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@364 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-03 15:56:08 +00:00
Tal Leming
6c9707f49d
Only strictly test known public.* names.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@363 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-03 15:46:19 +00:00
Tal Leming
a829b0dc72
Validate the groups.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@362 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-03 15:17:31 +00:00
Tal Leming
1ef1e295c9
Kerning prefixes are no longer part of fontnfo.plist.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@361 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-03 14:43:17 +00:00
Tal Leming
e0e56d0318
Layer name checks.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@359 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-03 14:09:47 +00:00
Tal Leming
2bcdd6b4ba
Missed a guideline requirement.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@352 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-09-30 19:12:05 +00:00
Tal Leming
3001616877
Starting to test GLIF 1...and I found and fixed some bugs.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@345 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-09-30 15:25:47 +00:00
Tal Leming
fe3a14c853
Image validator.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@330 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-09-29 00:40:33 +00:00
Tal Leming
b504d01a34
Tests and fixes.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@314 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-09-28 15:29:10 +00:00
Tal Leming
710ad51bf6
More renaming.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@311 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-09-28 13:51:52 +00:00
Tal Leming
ef436e8ddf
Renamed some of the validators that aren't font info specific.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@310 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-09-28 13:42:09 +00:00
Tal Leming
8ccc875640
Tests and fixes.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@296 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-09-27 15:28:42 +00:00
Tal Leming
91a707b433
Airplane stuff. Lots of work. Very tired. It can write a partial UFO 3 now. Very tired.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@290 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-09-19 01:40:21 +00:00
Tal Leming
b68dfc260d
Moved the validators to a more accessible location.
...
git-svn-id: http://svn.robofab.com/branches/ufo3k@289 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-09-18 12:24:29 +00:00