732 Commits

Author SHA1 Message Date
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
Tal Leming
a3d4e90146 Merge pull request #25 from graphicore/fix-writing-plist
UFOReader/UFOWriter fixes and updates
2014-12-31 10:46:34 -06:00
Tal Leming
a25b4537df Merge pull request #27 from robofab-developers/revert-24-fix-reading-plist
Revert "Fix reading plist"
2014-12-31 10:42:52 -06:00
Tal Leming
e45ab4755b Revert "Fix reading plist" 2014-12-31 10:42:02 -06:00
Tal Leming
eeb594b66d Merge pull request #24 from graphicore/fix-reading-plist
Fix reading plist
2014-12-31 10:41:47 -06:00
Lasse Fister
0cd65fb5e0 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 23:20:16 +01:00
Lasse Fister
b7dca42398 Add additional location for xmlWriter
Analogous to 42b7d1239e
by @benkiel
2014-12-08 23:14:41 +01:00
Lasse Fister
5a2a814d92 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 23:14:31 +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
Erik van Blokland
c5f91a02b5 Merge pull request #11 from robofab-developers/ufo3k-kerning-upconversion-additions
Incorporate additions to the kerning group conversion process.
2014-02-19 14:55:00 +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
Erik
819dc77353 Add gitignore for ufo3k branch. 2013-07-19 21:29:03 +02: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
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
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
41cc594e40 Merge changes from trunk.
git-svn-id: http://svn.robofab.com/branches/ufo3k@557 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2012-02-14 12:32:32 +00:00
Erik van Blokland
4875fc675f Tweaks in the documentation.
git-svn-id: http://svn.robofab.com/branches/ufo3k@553 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2012-02-14 11:59:11 +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
c09c53485c The UFO 3 spec requires ints for many format specific fields now.
git-svn-id: http://svn.robofab.com/branches/ufo3k@549 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2012-02-14 03:25:21 +00:00
Tal Leming
3fb94d2b65 Make the automatic group rename mapping available.
git-svn-id: http://svn.robofab.com/branches/ufo3k@548 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2012-01-30 15:19:05 +00:00
Tal Leming
4e71814629 Further implementation of these objects by Frederik.
git-svn-id: http://svn.robofab.com/branches/ufo3k@547 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2012-01-27 14:15:48 +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
96dd66b6da Merge Erik's trunk changes.
git-svn-id: http://svn.robofab.com/branches/ufo3k@545 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2012-01-06 12:34:37 +00:00
Tal Leming
b1b40b80fa Going to try this again.
git-svn-id: http://svn.robofab.com/branches/ufo3k@544 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2012-01-05 23:23:44 +00:00
Tal Leming
6fca833045 The winds have changed.
git-svn-id: http://svn.robofab.com/branches/ufo3k@541 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-12-30 20:14:46 +00:00