101 Commits

Author SHA1 Message Date
Cosimo Lupo
055e52f932 Merge branch 'master' into ufo4 2017-07-21 10:07:37 +01: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
f320554077 ufoLib.__init__: use os.path instead of slash to fix doctest failing on Windows 2016-09-11 17:44:12 +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
Tal Leming
89d8cfa7eb Removing metainfo.plist is no longer expressly prohibited (it shouldn't be done though). Raise an error when removing a missing file. 2016-06-13 13:36:30 -04:00
Tal Leming
a0a942bc7d Make copying a directory from a source to a dest work. 2016-06-08 14:26:01 -04:00
Tal Leming
4162429c53 Flipped args. 2016-06-08 13:39:14 -04:00
Tal Leming
cea3ba9b43 Fix some minor issues to resolve some failing tests. 2016-06-08 11:09:37 -04:00
Tal Leming
21f36611f0 Found something hardwired to the package structure. 2016-06-08 10:31:39 -04:00
Tal Leming
1ed9fb14f5 Remove some unneeded functions. 2016-06-08 09:36:57 -04:00
Tal Leming
3fa83a1924 Remove a deprecated function. 2016-06-08 09:05:43 -04:00
Tal Leming
5014279665 Don't subclass FileSystem. 2016-06-08 09:04:29 -04:00
Ben Kiel
317214dfb1 If structure is zip, make sure saved file is ufos 2016-05-24 11:21:00 -05:00
Ben Kiel
26863a2b79 Update __init__.py
Add in ufoz for testing.
2016-05-24 11:07:53 -05:00
Tal Leming
29db50cd01 Remove plistlib shim. 2016-05-16 15:02:19 -04:00
Masaya Nakamura
a8c7788d66 Fix _getGlyphSetFormatVersion3() 2016-05-11 17:50:14 +09:00
Tal Leming
08f8f114cb Implement writing to package or ZIP.
This has only been lightly tested. It slightly breaks defcon, but I'll
deal with that later.
2016-05-04 10:53:43 -04:00
Tal Leming
45910b6131 Initial work on reading single file UFO.
This is a work in progress update of UFOReader and UFOWriter that
supports UFO in its package and zipped forms. Reading works. Writing is
not yet implemented.

I'm building a base file system (that lives on top of fs for now and
maybe in the long term) that the reader and writer then subclass. This
base class implements the file system interaction so that the reader
and writer can be blissfully ignorant about file systems.

Additionally, I ran into a problem with the local plistlib.py creating
an import error, so I've temporarily renamed it plistlibShim.py so that
I can continue working.

Did I mention that this is a work in progress? It's a work in progress.
2016-05-02 23:06:25 -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
Adrien Tétar
fab99c30e5 plistlib: reimplement as shim 2016-03-01 12:43:04 +01:00
Denis Jacquerye
d05df7eb7e Python 2/3: replace str by basestring 2015-11-18 13:22:14 +00:00
Adrien Tétar
e345fec96f meta: remove robofab files 2015-11-08 11:11:11 +01:00
Denis Jacquerye
929ed4454c ufoLib: drop READ_MODE and WRITE_MODE 2015-11-06 15:06:52 +00:00
Denis Jacquerye
7deef57dd0 ufoLib.__init__: add basestring in Python3 and undo 2to3 2015-11-06 15:06:51 +00:00
Denis Jacquerye
66e5ae0242 ufoLib __init__.py: use io.StringIO, io.BytesIO, and standard plistlib load and dump 2015-11-06 15:06:49 +00:00
Denis Jacquerye
607cdf9a39 ufoLib __init__: typo 'maetainfo' -> 'metainfo' 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
Adrien Tétar
ff8bd252d4 ufoLib: previousFormatVersion None-check 2015-09-27 16:39:30 +02: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
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
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
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
d3bce60a6a Added a method for setting the modification time of the UFO. This addresses ticket #20.
git-svn-id: http://svn.robofab.com/branches/ufo3k@515 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-12-07 15:45:06 +00:00
Tal Leming
87eee9dc29 Added font info conversion functions. These should resolve tickets #10 and #11.
git-svn-id: http://svn.robofab.com/branches/ufo3k@511 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-12-06 20:25:49 +00:00
Tal Leming
429fc95ae6 Deprecate conversion function. It wasn't possible to make a safe in place conversion for FO 3, so I think these should go away.
git-svn-id: http://svn.robofab.com/branches/ufo3k@510 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-12-06 19:17:35 +00:00
Tal Leming
5312ac46d1 Updating the documentation.
git-svn-id: http://svn.robofab.com/branches/ufo3k@509 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-12-06 19:13:57 +00:00
Tal Leming
6f7a70d13f Found an error in a test and a couple of typos in the code.
git-svn-id: http://svn.robofab.com/branches/ufo3k@508 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-12-06 18:47:56 +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
5571ca07de Typo.
git-svn-id: http://svn.robofab.com/branches/ufo3k@505 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-12-01 14:11:37 +00:00
Tal Leming
8def59e71a More verbose method name.
git-svn-id: http://svn.robofab.com/branches/ufo3k@482 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-28 16:54:11 +00:00
Tal Leming
5d3c381e97 Added a path property to the writer.
git-svn-id: http://svn.robofab.com/branches/ufo3k@480 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-27 14:59:01 +00:00
Tal Leming
1cc8ddbe43 Add a mod time request method to the reader.
git-svn-id: http://svn.robofab.com/branches/ufo3k@479 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
2011-10-27 14:53:54 +00:00