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
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
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
Behdad Esfahbod
45c525f1ec
Compile LigatureSubst to new high-level fonttools API
2015-10-27 16:20:41 -07:00
Behdad Esfahbod
536a40ce26
Compile tables
2015-10-27 16:07:11 -07:00
Sascha Brawer
37a79a330c
[feaLib] Fix generated LigatureSubst lookups
2015-10-27 22:53:50 +01:00
Behdad Esfahbod
04e94b18ee
ALmost there with GSUB
2015-10-27 14:16:00 -07:00
Behdad Esfahbod
d6e186d40f
Simplify AlternateSubst slightly
2015-10-27 14:11:04 -07:00
Behdad Esfahbod
31333983d8
Clean up tokenizaiton a bit
2015-10-27 12:46:58 -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
Sascha Brawer
4374cf2be0
Merge pull request #400 from anthrotype/rsrc-fork
...
add mac resource fork reader (py23 compatible); drop mac classic support
2015-10-26 08:34:36 -07: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
Cosimo Lupo
687a0e7ee3
Merge pull request #394 from anthrotype/psLib-py23
...
make t1Lib and psLib compatible with python 3
2015-10-24 08:48:48 +01: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
James Godfrey-Kittle
82e53f020c
Use Python3-compatible arguments for roundIntPoint
2015-10-23 11:23:21 -07:00
James Godfrey-Kittle
7b3ac62db7
Add pen which draws to Type 2 charstrings
2015-10-23 11:15:16 -07:00
Cosimo Lupo
8279095b6f
[t1Lib_test] add test cases for parsing and writing PS Type1
2015-10-22 19:55:34 +01:00
Cosimo Lupo
dfce582196
add test PS Type1 fonts in .pfa and .pfb format
2015-10-22 19:55:34 +01:00
Cosimo Lupo
6c51e3de97
[t1Lib] fix TypeError in writeOther func
2015-10-22 19:55:34 +01:00
Cosimo Lupo
aa7753cebf
[t1Lib] add 'dohex' kwarg to saveAs (it only applies to 'OTHER' type (PFA))
2015-10-22 19:55:34 +01:00
Cosimo Lupo
07042e7c88
[t1Lib] fix longToString function
2015-10-22 19:55:33 +01:00
Cosimo Lupo
6523449cc8
[t1Lib] mv t1Lib.py t1Lib/__init__.py
2015-10-22 19:55:33 +01:00