4344 Commits

Author SHA1 Message Date
Cosimo Lupo
fe4381df56
ufoLib: add readData, writeData and removeData methods 2018-10-21 15:42:02 +01:00
Ben Kiel
8bb9d0ed6c Change UFOLib creator 2018-10-19 11:25:52 -05:00
Cosimo Lupo
13cf8ef1ab
Merge pull request #1335 from anthrotype/fonttools-ufolib
merge ufoLib into fontTools.ufoLib
2018-10-19 14:28:20 +01:00
Cosimo Lupo
6a7493adbb
designspaceLib: port to using lxml via fontTools.misc.etree
indentation is now two spaces like lxml (unchangeable) default
https://github.com/fonttools/fonttools/pull/1335#issuecomment-431112494
2018-10-18 20:03:54 +01:00
Cosimo Lupo
9e85f3bcc3
svgLib: use fontTools.misc.etree 2018-10-18 19:50:26 +01:00
Cosimo Lupo
8081bf57fa
etree/plistlib/glifLib: using (default) single quotes in XML_DECLARATION
https://github.com/fonttools/fonttools/pull/1335#issuecomment-431118568
2018-10-18 19:49:52 +01:00
Cosimo Lupo
6db88d7cb7
remove deprecated fontTools.varLib.designspace 2018-10-18 18:40:54 +01:00
Cosimo Lupo
9557c6a229
fix deprecation warnings when using ABC from collections module 2018-10-18 18:12:43 +01:00
Cosimo Lupo
e871b2f41d
pointPen: add missing classes to __all__ 2018-10-18 16:12:58 +01:00
Cosimo Lupo
6b1bf4247b
move pointPen to fontTools.pens subpackage; keep ufoLib.pointPen alias 2018-10-18 16:03:09 +01:00
Cosimo Lupo
b23a208805
ufoLib: fix doctests failing on py27 for unicode_literals
I hate doctests.
2018-10-18 15:40:32 +01:00
Cosimo Lupo
8ba98afb92
etree: remove 'XMLTreeBuilder' from __all__
only present in py27 elementtree:
6e57382464/Lib/xml/etree/ElementTree.py (L1676-L1677)
2018-10-18 15:40:32 +01:00
Cosimo Lupo
3e19f6d985
keep fontTools.ufoLib.etree as a shim module for fontTools.misc.etree 2018-10-18 11:12:08 +01:00
Cosimo Lupo
081b0fc090
keep fontTools.ufoLib.plistlib compatibility shim
the old readPlist, writePlist are only kept in fontTools.ufoLib.plistlib,
not in fontTools.misc.plistlib
2018-10-18 11:11:34 +01:00
Jens Kutilek
76e7b7a786
Add PointPen support to TT Glyph objects (#1334)
* Add drawPoints method to _g_l_y_f.Glyph
* Add drawPoints method to ttFont._TTGlyph
2018-10-18 11:52:38 +02:00
Cosimo Lupo
176b5f763d
change 'import ufoLib' to 'import fontTools.ufoLib' 2018-10-17 17:43:28 +01:00
Cosimo Lupo
7ee7ccd568
move ufoLib.etree to fontTools.misc.etree
we can use this ElementTree-like XML API for ttx or designspaceLib, not
just ufoLib
2018-10-17 17:30:39 +01:00
Cosimo Lupo
e42bfd65f4
move ufoLib.plistlib to fontTools.misc.plistlib
As PLIST are not only UFOs (e.g. DesignSpace documents)
2018-10-17 17:29:34 +01:00
Cosimo Lupo
1f7155c432
Merge branch 'fold-into-fontTools' into fonttools-ufolib 2018-10-17 17:21:44 +01:00
Cosimo Lupo
7cd80a37dd
move Lib/ufoLib to Lib/fontTools/ufoLib 2018-10-17 17:05:17 +01:00
Cosimo Lupo
935aad1a25
DefaultTable: pass extra **kwargs in toXML (for glyf table class)
when ttx fails to decompile a buggy glyf table, the DefaultTable implementation is used,
but TTFont._tableToXML passes 'splitGlyphs' keyword argument to table.toXML when
the tag is 'glyf'.
Let's simply ignore it here.
2018-10-16 17:21:50 +01:00
Behdad Esfahbod
c4b475852d [varLib.merger] Implement FeatureVariations instantiation
Fixes https://github.com/fonttools/fonttools/issues/1244
2018-10-14 23:25:56 -07:00
Cosimo Lupo
49c7bd1e1d
Release 3.0.0 2018-10-11 11:31:35 +01:00
Cosimo Lupo
59cb035cdf
minor: ensure self._path is a unicode string 2018-10-10 18:26:14 +01:00
Cosimo Lupo
58455d9c9b
setModificationTime should not warn if path does not exist
the self._path argument of UFOWriter is not always an existing local filesystem
path. It may be a fallback string repr like '<memfs>' when the filesystem
being used does not map to the local OS filesystem (like MemoryFS)
2018-10-10 15:30:31 +01:00
Cosimo Lupo
1c05b67e1c
warn if passed an explicit 'structure' argument with dest being an FS object
it doesn't make sense to say structure='zip' if we are saving to an already instantiated
FS object. The 'structure' keyword argument only makes sense when the destination is
a path string, where we have a choice whether to create either a UFOZ (zipfile) or a
normal UFO package.
For an already instantiated FS object, we always write it out as a flat package,
without the root contents subfolder.
2018-10-10 15:28:15 +01:00
Cosimo Lupo
b84eb25a50
glifLib: do not cache the output of getGLIF
Fixes https://github.com/unified-font-object/ufoLib/issues/80
2018-10-10 12:37:32 +01:00
Cosimo Lupo
f2018e2a26
skip (and warn) if could not set modified time
Fixes https://github.com/unified-font-object/ufoLib/issues/48
2018-10-10 10:54:57 +01:00
Cosimo Lupo
9b88135931
accept both int or long as valid integer types on py27
Fixes https://github.com/unified-font-object/ufoLib/issues/52
2018-10-10 10:54:57 +01:00
Cosimo Lupo
a09abd7feb
add UFOFileStructure enum to __all__ 2018-10-10 10:54:57 +01:00
Cosimo Lupo
14dd3347f1
make _sniffFileStructure private 2018-10-10 10:54:57 +01:00
Cosimo Lupo
7101e62863
Bump version: 2.4.0.dev0 → 3.0.0.dev0 2018-10-09 18:33:14 +01:00
Cosimo Lupo
81e0855cc7
must decode incoming user paths on py2, pyfilesystem2 requires unicode paths
with this the defcon test suite passes on both py2 and py3. I think i'm done for now.
2018-10-09 18:20:10 +01:00
Cosimo Lupo
57bc0264f5
don't attempt to remove empty optional files if writing new UFO from scratch
and don't strip trailing '/', keep input path as is. It should not be
used by anybody, anyway.
2018-10-09 17:17:40 +01:00
Cosimo Lupo
032aa7b6ac
minor: diff noise, docstrings, etc. [skip ci] 2018-10-09 15:18:33 +01:00
Cosimo Lupo
7ef045c88f
minor [skip ci] 2018-10-09 14:20:52 +01:00
Cosimo Lupo
6ec8b72b6a
remove _common module, put shared methods in ufoLib.__init__
and moved the import ufoLib.glifLib outside from global module scope to
avoid circular import issues
2018-10-09 14:13:28 +01:00
Cosimo Lupo
20c3c1b227
move datetimeAsTimestamp func to utils.py module 2018-10-09 14:03:49 +01:00
Cosimo Lupo
66ce3d50b5
move test suite outside of Lib/ufoLib
Fixes https://github.com/unified-font-object/ufoLib/issues/165
2018-10-09 13:15:54 +01:00
Cosimo Lupo
5131c1a0e6
Bump version: 2.3.2 → 2.4.0.dev0 2018-10-09 12:40:08 +01:00
Cosimo Lupo
56b4505913
various cleanups: use pyfilesystem2 API directly, remove ufoLib.filesystem
Among other things, this allows clients to inject an already
instantiated FS object in both the UFOReader/UFOWriter 'path'
argument.
2018-10-08 18:06:07 +01:00
Cosimo Lupo
52ec18be96
Merge remote-tracking branch 'origin/master' into ufoz-rebased 2018-10-03 15:52:45 +01:00
Cosimo Lupo
1692d237e7 Release 2.3.2 2018-10-02 13:53:16 +01:00
Cosimo Lupo
b19e868cd6 test note with non-ASCII characters 2018-10-02 13:31:11 +01:00
Cosimo Lupo
e658d674e0 glifLib: Element.text must be unicode, not UTF-8 bytes
Fixes https://github.com/googlei18n/fontmake/issues/467
2018-10-02 13:24:12 +01:00
Cosimo Lupo
0245f2c55a
loggingTools: add msg=None argument to CapturingLogHandler.assertRegex
like all the rest of unittest.TestCase assertSomething
2018-09-28 19:10:50 +01:00
Behdad Esfahbod
d258333007 [iup] Fix comment 2018-09-27 17:41:09 -04:00
Rob McKaughan
7d59b729ab Include nameIDs referenced by STAT table 2018-09-26 14:50:22 -04:00
Sascha Brawer
2011ccf6ec [morx] Clean up compilation of AAT action tables; add more tests 2018-09-24 20:15:54 +02:00
Sascha Brawer
4a1871ff62 [morx] Support AAT action type to insert glyphs 2018-09-24 18:14:01 +02:00