224 Commits

Author SHA1 Message Date
Behdad Esfahbod
2b06aaa2a6 2to3 --fix=import 2013-11-27 02:34:11 -05:00
Behdad Esfahbod
bc5e1cb195 2to3 --fix=has_key 2013-11-27 02:33:03 -05:00
Behdad Esfahbod
9e1bd2d0b4 Implement FeatureParams
All types of FeatureParams are correctly handled now.

The only thing not handled is broken fonts generated with the
old AFDKO that have their FeatureParams offset computed wrong.
I don't currently plan on handling those.

Fixes https://github.com/behdad/fonttools/issues/38
2013-11-26 19:23:08 -05:00
Behdad Esfahbod
58acba2d02 Remove "optimization" re Extension lookups
Historically, Extension lookups were only decompiled upon access,
and decompiled Extension lookups were possibly copied verbatim to
output when compiling.  This discrepancy with all other table types
is confusing and undeed.  The possible time saving is not worth the
loss in possible optimization of table data.  Remove.
2013-11-24 20:08:05 -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
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
183afe6408 Optimize Coverage.postRead() 2013-08-19 14:16:07 -04:00
jvr
e5b245fd07 added refactoring note
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@548 4cde692c-a291-49d1-8350-778aa11640f8
2008-03-09 21:43:19 +00:00
jvr
823f8cd15f Misc patches from rroberts:
fontTools/ttx.py
  # support virtual GIDs, support handling some GSUB offset overflows.

fontTools/ttlib/__init__.py
# 1) make getReverseGlyphMap  a public function; I find a reverse map
to often be useful
# 2) support virtual glyphs, e.g. references to GID's that are not in the font.
# Added the TTFont argument allowVID (default 0) to turn this off and on;
# added the arg requireReal ( default 0) so as to get the obvious
default behaviour when
# allowVID is 0 or 1, but to allow requiring a true GID when allowVID is 1.

fontTools/ttlib/tables/otBase.py
fontTools/ttlib/tables/otConverters.py
fontTools/ttlib/tables/otData.py
fontTools/ttlib/tables/otTables.py
# 1) speed optimization
# - collapse for loops
# - do not decompile extension lookups until a record is requested
from within the lookup.
# 2) handling offset overflows
# 3) support of extension lookups
# 4) Fixed FetauresParam converter class def so as to survive a font
that has this offset non-NULL.
# This fixes a stack dump.
# The data will now just get ignored


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@511 4cde692c-a291-49d1-8350-778aa11640f8
2006-10-21 14:12:38 +00:00
jvr
31ae380735 fixed problem with empty ClassDef, as well as added some more defenses for possible empty tables
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@484 4cde692c-a291-49d1-8350-778aa11640f8
2005-02-11 19:36:38 +00:00
jvr
1fae9b48d3 [ 637398 ] Failure while parsing OpenType file
Deal with empty Coverage table: it will be None so won't have a .glyphs
attribute.


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@471 4cde692c-a291-49d1-8350-778aa11640f8
2004-09-25 10:31:29 +00:00
jvr
8e1d75b1a3 ReverseChainSingleSubst support from Yannis H. (must get that generate-otdata-from-the-docs working again)
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@459 4cde692c-a291-49d1-8350-778aa11640f8
2003-09-22 13:12:55 +00:00
jvr
27f108844e this should have been part of the previous path by some fixes from klchxbec
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@450 4cde692c-a291-49d1-8350-778aa11640f8
2003-09-11 07:11:35 +00:00
jvr
257fba7172 make sure Coverage instances have a 'glyphs' attribute
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@379 4cde692c-a291-49d1-8350-778aa11640f8
2003-01-03 20:54:31 +00:00
jvr
a138467da3 deal gracefully with empty coverage tables; fixes bug 611509
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@370 4cde692c-a291-49d1-8350-778aa11640f8
2002-09-24 20:50:57 +00:00
jvr
4845ba5fa5 whoops, reversed key and value
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@363 4cde692c-a291-49d1-8350-778aa11640f8
2002-09-13 12:04:13 +00:00
jvr
f2164abef3 added manual implementation of LigatureSubst to get nicer XML output
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@355 4cde692c-a291-49d1-8350-778aa11640f8
2002-09-12 21:48:03 +00:00
jvr
b2486125e9 added manual implementation of AlternateSubst to get nicer XML output
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@354 4cde692c-a291-49d1-8350-778aa11640f8
2002-09-12 21:21:58 +00:00
jvr
a1dfa2b77a added manual implementation of ClassDef to get nicer XML output as well as to get rid of GlyphID dependencies
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@353 4cde692c-a291-49d1-8350-778aa11640f8
2002-09-12 20:51:09 +00:00
jvr
1d6360af4c added manual implementation of SingleSubst to get nicer XML output as well as to get rid of GlyphID dependencies
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@351 4cde692c-a291-49d1-8350-778aa11640f8
2002-09-12 19:54:02 +00:00
jvr
1a53beb7b4 renamed table to rawTable
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@344 4cde692c-a291-49d1-8350-778aa11640f8
2002-09-12 17:09:13 +00:00
jvr
d41386e7f7 added manual implementation for the Coverage subtable to get rid of GlyphID dependencies
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@341 4cde692c-a291-49d1-8350-778aa11640f8
2002-09-12 16:47:02 +00:00
jvr
64b5c80e80 results of morning-after code review, added some doc strings, etc.
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@210 4cde692c-a291-49d1-8350-778aa11640f8
2002-05-11 10:21:36 +00:00
jvr
d4d151390d Completely revamped OT support; this time it works and is complete. XML output is not yet as pretty as can be.
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@208 4cde692c-a291-49d1-8350-778aa11640f8
2002-05-11 00:59:27 +00:00