Denis Jacquerye
dc94aa17a7
ufoLib.glibLib: use io.StringIO, ioBytesIO, io.open
2015-11-06 15:06:49 +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
41cb5a8d4c
validators: use basestring
2015-11-06 15:06:49 +00:00
Denis Jacquerye
f9ff5e5cfe
filenames: use basestring
2015-11-06 14:10:43 +00:00
Denis Jacquerye
90a5af640b
glifLib: add READ_BYTES_MODE and WRITE_BYTES_MODE
2015-11-06 14:10:42 +00:00
Denis Jacquerye
edfee17e5f
glifLib: use basestring and glyphSet maybe None in glyphNameToFileName()
2015-11-06 14:10:42 +00:00
Denis Jacquerye
607cdf9a39
ufoLib __init__: typo 'maetainfo' -> 'metainfo'
2015-11-06 14:10:42 +00:00
Denis Jacquerye
fd8440a223
validators: png signature as bytes
2015-11-06 14:10:42 +00:00
Adrien Tétar
7cd33cdca7
glifLib: cleanup returns_unicode
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
1602f21e58
plistlib: remove HACK that does not pass python 3
2015-11-06 14:10:41 +00:00
James Godfrey-Kittle
9ff7d62454
[TTGlyphPen] Do special case ignoring anchors
...
This fixes the ignoring anchors test, which led me to believe we
didn't need to special case them (which we do, and now are).
2015-11-05 15:28:19 -08:00
James Godfrey-Kittle
6dc5092e2b
[TTGlyphPen] Move some code around
...
No effective differences, just lingering un-committed local changes.
2015-11-05 15:19:53 -08:00
James Godfrey-Kittle
ec2daf00e4
[TTGlyphPen] Add unit tests
...
These test some pen methods which can't be tested via TTFont objects.
The other option seemed to be using UFOs, but this is simpler.
2015-11-05 15:18:32 -08:00
James Godfrey-Kittle
1bff12f311
[TTGlyphPen] Don't explicitly relcalc glyph bounds
...
There's no need to do this explicitly; it happens during the calls to
compile().
2015-11-05 15:13:43 -08:00
James Godfrey-Kittle
0b3b83f765
[TTGlyphPen] Don't special case ignoring anchors
...
There's no need to special case this, it happens anyways.
2015-11-05 15:12:18 -08:00
Behdad Esfahbod
db9b537635
[subset] Add 'stch' feature, used in Syriac spec
2015-11-05 14:32:18 -08:00
James Godfrey-Kittle
f5b9ec0186
[TTGlyphPen] Add a new e2e test
2015-11-05 14:11:51 -08:00
James Godfrey-Kittle
b511b2b0d8
[TTGlyphPen] Go back to using AbstractPen
...
Using BasePen breaks on quadratic splines, since there's no way to
know if a on-curve point was added by the pen or in the original
glyph. Should have considered this before....
2015-11-05 13:57:53 -08:00
James Godfrey-Kittle
7767683ea4
[TTGlyphPen] Abstract out a _popPoint method
2015-11-05 13:57:06 -08:00
James Godfrey-Kittle
9f5c51897c
[TTGlyphPen] Move checks for closed contours
...
We probably don't want to raise errors in init, which allows a drawer
to reset the pen state.
2015-11-05 13:54:51 -08:00
Adrien Tétar
337ef3202b
ufoLib meta: automated 2to3 conversion
2015-11-05 09:30:43 +00:00
James Godfrey-Kittle
943d258bdb
[TTGlyphPen] Add a test using existing test data
2015-11-04 18:01:34 -08:00
James Godfrey-Kittle
fa82fcd213
[TTGlyphPen] Make components with correct defaults
...
This seems consistent with what one sees opening up an existing TTF.
2015-11-04 17:59:57 -08:00
James Godfrey-Kittle
8c61d08d94
[TTGlyphPen] Remove last point in closed contours
...
When a pen adds the first point to a contour at the end to close it,
we should remove it for the TrueType outline.
2015-11-04 17:58:27 -08:00
James Godfrey-Kittle
1c73a1942a
Don't use lineTo in moveTo
...
It shouldn't make a difference, but semantically this is now correct.
2015-11-04 17:21:17 -08:00
James Godfrey-Kittle
b83ed7ab2b
Allow a TTGlyph pen to be used more than once
2015-11-04 17:19:58 -08:00
James Godfrey-Kittle
58dd55c0ae
Use BasePen instead of AbstractPen in TTGlyphPen
2015-11-04 17:18:03 -08: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
Cosimo Lupo
d2e3505708
Merge pull request #396 from jamesgk/new-pen
...
Add pen which draws to Type 2 charstrings
2015-10-30 19:08:47 +00:00
James Godfrey-Kittle
5d7f3a9a1f
Fix author name typo
2015-10-30 10:32:04 -07:00
Sascha Brawer
37a79a330c
[feaLib] Fix generated LigatureSubst lookups
2015-10-27 22:53:50 +01:00
Behdad Esfahbod
d6e186d40f
Simplify AlternateSubst slightly
2015-10-27 14:11:04 -07:00
Sascha Brawer
3f5e2ae820
[feaLib] Add expected output for chain substitution rules
...
Generated by running example 1 from the Feature File specification
section 5.f.i (Specifying a Chain Sub rule and marking sub-runs)
through AFDKO's makeotf tool, and then decompiling the resulting
GSUB table with ttx.
The actual test is commented out because the current version of feaLib
is not able to produce this output yet; marked with a TODO comment.
2015-10-27 20:36:56 +01:00
Sascha Brawer
dbefc71d23
[feaLib] Minor: Rename a test file, for consistency with other test caes
...
It is example 1 in section 5.f.i of the specification, and there
more examples in the same section. For consistency, use the same convention
as the other test cases.
2015-10-27 19:59:25 +01:00
Cosimo Lupo
f8e8ea6e7f
[macRes] use tostr(s, encoding='mac-roman') for resource types and names
2015-10-26 14:38:20 +00:00
Cosimo Lupo
c4e05b48b3
[t1Lib_test] forgot to add unittest.main()
...
I use py.test ;)
2015-10-26 05:23:59 +00:00
Cosimo Lupo
2f212ac59a
[macRes] add default value [] to self.get(resType)
...
ops!
2015-10-26 05:16:22 +00:00
Cosimo Lupo
620db1f9a3
[t1Lib_test] also test parsing LWFN (dumped to data fork)
2015-10-26 04:40:04 +00:00
Cosimo Lupo
4b9087c000
[t1Lib] add TestT1-Regular.lwfn to testdata
2015-10-26 04:40:04 +00:00
Cosimo Lupo
fb6efd0f23
[t1Lib] use macRes.ResourceReader to read 'POST' resources from LWFN;
...
add comment about Res.FSpCreateResFile being deprecated since OS X 10.5
(a resource file writer would be nice, by low priority)
2015-10-26 04:40:04 +00:00
Cosimo Lupo
f41838edfe
[macUtils] use macRes.ResourceReader to read 'sfnt' resources
2015-10-26 04:40:04 +00:00
Cosimo Lupo
17e757300c
[macRes_test] add tests for ResourceReader
2015-10-26 04:40:00 +00:00
Cosimo Lupo
db70dee031
[macRes] new module and ResourceReader to read Mac resource/data forks
...
inspired by Sascha Brawer's GNU Classpath Java implementation
https://gcc.gnu.org/viewvc/gcc/trunk/libjava/classpath/gnu/java/awt/font/opentype/MacResourceFork.java?view=co&content-type=text%2Fplain
2015-10-26 04:40:00 +00:00
Cosimo Lupo
363893d1fc
[macCreatorType] try to use xattr module if installed
...
xattr is a Python wrapper for extended filesystem attributes, which works
with both Python 2 and 3: https://pypi.python.org/pypi/xattr
2015-10-26 03:49:31 +00:00
Cosimo Lupo
d7f6e1df00
[ttLib] remove 'haveMacSupport' flag, allow other platforms to read sfnt resources (from data fork)
...
On non-Mac filesystems the resource fork is absent.
2015-10-26 03:34:03 +00:00
Cosimo Lupo
8891e98920
remove MacOS-only misc/homeResFile.py module (no longer used)
2015-10-26 03:34:03 +00:00
Cosimo Lupo
e1e2178a52
[ttLib] drop support for pre-OSX "mac" platform
...
- only check for 'darwin' for 'haveMacSupport'
- remove 'makeSuitcase' arg from TTFont.save();
- don't setMacCreatorAndType
2015-10-25 14:42:43 +00:00
James Godfrey-Kittle
e85b975f3a
Fix imports in t2CharStringPen
...
We don't need the array module here, and it looks like py23.* should
be imported everywhere.
2015-10-23 11:36:46 -07:00