Behdad Esfahbod
0de65295f6
Remove script to build otData.py
...
The was was originally generated, but is static now and this
allows cleaning it up and modifying it.
2013-11-23 19:12:11 -05:00
Behdad Esfahbod
3879cf9439
Use slots for OTTableReader
...
Slight performance gain even.
2013-11-22 19:34:57 -05:00
Behdad Esfahbod
6e556aafc3
Make ValueRecordFactory() immutable
...
Gives another 3% speedup.
2013-11-22 19:34:46 -05:00
Behdad Esfahbod
41caf2dea1
Remove tableStack in favor of countVars
...
We only needed tableStack to look back for counts. So, just store
counts. Gives ~8 speedup for large fonts I tested. We are not
faster than not loading fonts lazily without this patch, so the
laziness patch combined with this doesn't have a net negative
performance impact anymore.
2013-11-22 19:13:14 -05:00
Behdad Esfahbod
0585b64f70
Minor
2013-11-22 16:46:03 -05:00
Behdad Esfahbod
d01c44a59b
When lazy-loading tables, copy ValueFormat
...
Otherwise it may be overwritten before we use it.
2013-11-22 15:21:41 -05:00
Behdad Esfahbod
fc10b20c25
Minor
2013-11-20 21:50:16 -05:00
Behdad Esfahbod
f50d0dff86
Load all OpenType sub-structures lazily
...
Huge win for subsetter and anyone else who doesn't need the entire
tables. Subsetting a huge font (eg. NotoSans-Regular.ttf) to a
small set (say, main Cyrillic characters) is something like six
times faster now. Bulk of time was being spent in blowing up the
GPOS kerning pairs and attach points. Now we don't load those if
they won't be in the final subset.
Slight slowdown for usecases that need the entire table.
2013-11-20 19:07:08 -05:00
Behdad Esfahbod
5988cc32cb
Make BaseTable a new-style object
2013-11-19 17:40:46 -05:00
Behdad Esfahbod
98769437cd
[subset] Fix against missing AttachList entries
2013-11-19 14:40:57 -05:00
Behdad Esfahbod
1117445fab
[subset] Protect against missing rulesets
...
Fixes subsetting Molengo-Regular.ttf.
2013-11-18 20:20:49 -05:00
Behdad Esfahbod
fc4f438496
Fix parsing of hinting instructions that end in a PUSHB
...
Sounds useless, but MReifutaiM-Regular.ttf seems to have that, and the
parsing back from XML was failing because we expected a token whereas
after dropping whitespace there wasn't any left.
2013-11-18 16:06:01 -05:00
Behdad Esfahbod
17700bf926
Handle and warn about out-of-order Coverage table entries
...
Apparently the SIL Gentium fonts have wrong sorting in Coverage
tables. That's broken by the spec, but shapers still work with
such fonts. So, we warn when reading, and when writing, such
out-of-order coverage tables.
2013-11-18 16:05:00 -05:00
Behdad Esfahbod
846d09e380
Allow None for globalSubrs in T2CharString
2013-11-18 14:11:30 -05:00
Behdad Esfahbod
7e97247925
[subset] Handle inexistent feature / lookup lists
2013-11-15 17:57:15 -05:00
Behdad Esfahbod
6e70667659
Support loading broken Coverage tables
...
Hit by Google Fonts's font "Cabin" for example and a handful
of others.
2013-11-15 17:00:38 -05:00
Behdad Esfahbod
db0b1b8a34
Update to AGLFN version 1.7
...
Patch from Miguel Sousa.
Fixes https://github.com/behdad/fonttools/pull/18
2013-11-14 22:35:26 -05:00
Behdad Esfahbod
271f25feed
More fixup
2013-11-14 21:57:25 -05:00
Behdad Esfahbod
2ee85985e4
Merge pull request #24 from samyakbhuta/master
...
Moving README.txt to README.md
2013-11-14 17:31:15 -08:00
Behdad Esfahbod
d1072ddcc9
Further fixup to cf75a7c5d05b96df6c6cacde3fdc53e8e6cb200d
2013-11-14 20:28:12 -05:00
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
Samyak Bhuta
77219e595c
Removed README.txt.
2013-11-13 19:24:21 +05:30
Samyak Bhuta
dc9b87e342
Updated README.md
...
- Add project discription from original fontforge repository as citation.
2013-11-13 19:22:33 +05:30
Samyak Bhuta
bbcb1d5a49
Updated README. Added 'community' section.
2013-11-13 19:04:15 +05:30
Samyak Bhuta
380360814b
README in markdown format.
...
- Reformatted the text
- Added sections and links
- Original greetings and author details kept intact.
2013-11-13 19:00:12 +05:30
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
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
Behdad Esfahbod
f98efdfc1f
Merge pull request #14 from moyogo/master
...
remove non utf-8 character in unmaintainted code
2013-10-13 07:51:02 -07:00