6805 Commits

Author SHA1 Message Date
Behdad Esfahbod
67fef70631 Support decode/encoding of unknown glyf hinting instructions
New instructions can be defined in the prep program.  We don't
check that the "unknown" instruction was actually defined.  Just
pass it through.

Fixes ttx with Skia.ttf on the Mac OS X.

Fixes https://github.com/behdad/fonttools/issues/21
2013-11-14 20:25:21 -05:00
Behdad Esfahbod
4ff7712131 Restructure code
In anticipation of upcoming change.
2013-11-14 20:16:41 -05:00
Behdad Esfahbod
4fab60ca5b Remove unused instruction name propagation
No functional change whatsoever.
2013-11-14 20:14:10 -05:00
Behdad Esfahbod
978b1ea877 Indent 2013-11-14 19:18:11 -05:00
Behdad Esfahbod
cf75a7c5d0 Fixup ttx file-name mangling after eac107f1 2013-11-14 18:59:41 -05:00
Behdad Esfahbod
246301acc9 Fixup hhea recalc after 9222b8ef93fd6b41f9c4dcf152593cd0c80f0ba4 2013-11-14 18:55:35 -05:00
Roozbeh Pournader
c360f04754 Separate out the logic of computing advanceWidthMax from minLeftSideBearing, minRightSideBearing, and xMaxExtent for minimal fonts. 2013-11-14 18:53:20 -05:00
Roozbeh Pournader
dec666aa05 Only modify the loca table is there is such a table. 2013-11-14 18:52:15 -05:00
Behdad Esfahbod
7bdf6d39fc Minor 2013-11-14 17:27:15 -05:00
Behdad Esfahbod
9222b8ef93 Consider composite glyphs when recalcing 'hhea' values
Fixes https://github.com/behdad/fonttools/issues/20
2013-11-14 17:22:47 -05:00
Behdad Esfahbod
335f182a58 Consider advance width of all glyphs when recalcing 'hhea'
Part of https://github.com/behdad/fonttools/issues/20
2013-11-14 17:18:56 -05:00
Behdad Esfahbod
cd4fac4f4a Avoid overflow when compiling glyf table
https://github.com/behdad/fonttools/pull/25
2013-11-14 17:07:35 -05:00
Behdad Esfahbod
c55d592661 Remove unreachable code 2013-11-14 17:07:16 -05:00
Behdad Esfahbod
fe6bc4c7de [subset] Don't drop hinting info by default
Most people expect hinting to be preserved, and the CFF hint-stripper
is slightly buggy right now.
2013-11-02 11:10:23 +00:00
Behdad Esfahbod
eac107f11f Fix regex module usage
Previously the opentypeheaderRE thing was never matching, making
ttx always use ttf extension instead of otf.
2013-11-01 00:43:06 +00:00
Behdad Esfahbod
2a70f4a45f [subset] Fix CFF hint-stripping
Was causing OTS failure when subsetting 'apple' glyph of
InformaPro-Light.otf for example.
2013-10-28 15:18:07 +01:00
Behdad Esfahbod
8c5c966471 Store CFF names in UTF-8
We switched XML encoding from Latin-1 to UTF-8.  Adjust CFF
code.
2013-10-28 13:20:00 +01:00
Behdad Esfahbod
4d99d14dec [subset] Don't produce empty BlueValues
OTS didn't like it.
2013-10-28 13:15:08 +01:00
Behdad Esfahbod
a6241e6205 [subset] Retain cmap table even if empty
Since it's a required table.
2013-10-28 13:09:25 +01:00
Behdad Esfahbod
94118dcea4 Fix cmap subtable sort order
https://github.com/behdad/fonttools/issues/22
2013-10-28 12:16:41 +01:00
Behdad Esfahbod
0ba7aa7ab5 Make __cmp__() functions stable 2013-10-28 12:07:15 +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
Behdad Esfahbod
d95db25720 Indent 2013-10-26 22:03:46 +02:00
Behdad Esfahbod
26560d238f [subset] Add TODO item 2013-10-26 22:03:35 +02:00
Behdad Esfahbod
98b60757ab [subset] Fix renumbering of (Chain)ContextFormat2
Jonathan says: "It was broken."
2013-10-14 17:50:06 +02:00
Behdad Esfahbod
3977d3e9e2 [subset] Typo 2013-10-14 17:50:06 +02:00
Denis Jacquerye
1e0ad3a9a8 remove non utf-8 character in unmaintainted code 2013-10-13 10:17:49 +01:00
Roozbeh Pournader
51a17826be Add support for cmap format 13. 2013-10-09 15:55:07 -07:00
Behdad Esfahbod
e1a010c261 [subset] Fix AttributeError: 'NoneType' object has no attribute 'prune_hints' 2013-10-09 15:57:22 +02:00
Denis Jacquerye
cff3740f14 * wrong indentation after else 2013-10-09 12:13:40 +02:00
Denis Jacquerye
bed5f61e13 * replace _dict() by dict() as in d73f22530ecadcbdfb2cbc5752df73367ae09a5a 2013-10-09 11:16:25 +02:00
Roozbeh Pournader
d7921e33d9 Improved support for minimal fonts (with no visible glyphs). 2013-10-08 21:29:22 -07:00
Behdad Esfahbod
1e4c89f83a Update SVG table implementation
New drop from Read Roberts.
2013-10-07 17:23:35 -04:00
Behdad Esfahbod
227a495ef0 [inspect] Handle more exceptions 2013-10-02 17:52:04 -04:00
Behdad Esfahbod
805caae0d5 Merge pull request #5 from davelab6/master
New -q for Quiet mode
2013-10-01 15:36:55 -07:00
Behdad Esfahbod
6942b22252 [merge] Use reduce more often 2013-09-30 15:10:43 -04:00
Behdad Esfahbod
60eb80455e [merge] Minor 2013-09-30 15:10:43 -04:00
Behdad Esfahbod
436503372a [merge] Expand glyf components before merging
Such that components are converted to glyph names before remapping.
2013-09-30 15:10:43 -04:00
Behdad Esfahbod
c2e27fd88f [merge] Drop glyf hints
Since we don't renumber functions or CVTs, we have to drop hinting
for now.
2013-09-30 15:10:43 -04:00
Behdad Esfahbod
c14ab48ae8 [merge] Implement GDEF
Only if GSUB/GPOS were so simple too!
2013-09-30 15:10:43 -04:00
Behdad Esfahbod
3235a04ea9 [merge] Minor 2013-09-30 15:10:43 -04:00
Behdad Esfahbod
be4ecc7c67 [merge] Clean up imports 2013-09-30 15:10:43 -04:00
Behdad Esfahbod
0bf4f561da [merge] Pass Merger down to merge() methods 2013-09-30 15:10:43 -04:00
Behdad Esfahbod
44cdce0bd8 [merge] Remove unused code 2013-09-30 15:10:42 -04:00
Behdad Esfahbod
b640f7435c [merge] Implement --verbose and --timing 2013-09-30 15:10:42 -04:00
Behdad Esfahbod
c855f3ab69 [merge] Whitespace 2013-09-30 15:10:42 -04:00
Behdad Esfahbod
71294def67 [merge] Implement OS/2 and cmap
Works for basic font mergin now.  Next: GSUB/GPOS/GDEF!
2013-09-30 15:10:42 -04:00
Behdad Esfahbod
f2d5982826 [merge] Implement a few more straightforward tables 2013-09-30 15:10:42 -04:00
Behdad Esfahbod
65f19d8440 [merge] Implement a coule more tables 2013-09-30 15:10:42 -04:00
Behdad Esfahbod
45d2f38aa5 Start adding pyftmerge tool to merge fonts 2013-09-30 15:10:42 -04:00