don't complain as loudly with fonts that don't completely adhere to the spec
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@127 4cde692c-a291-49d1-8350-778aa11640f8
This commit is contained in:
parent
6d925f5b9a
commit
731e4377e1
@ -36,7 +36,8 @@ class table__h_m_t_x(DefaultTable.DefaultTable):
|
|||||||
metrics = Numeric.concatenate((metrics,
|
metrics = Numeric.concatenate((metrics,
|
||||||
Numeric.transpose(additionalMetrics)))
|
Numeric.transpose(additionalMetrics)))
|
||||||
if data:
|
if data:
|
||||||
raise ttLib.TTLibError, "too much data for hmtx/vmtx table"
|
import sys
|
||||||
|
sys.stderr.write("too much data for hmtx/vmtx table\n")
|
||||||
metrics = metrics.tolist()
|
metrics = metrics.tolist()
|
||||||
self.metrics = {}
|
self.metrics = {}
|
||||||
for i in range(len(metrics)):
|
for i in range(len(metrics)):
|
||||||
|
@ -21,9 +21,9 @@ class table__l_o_c_a(DefaultTable.DefaultTable):
|
|||||||
locations = Numeric.array(locations, Numeric.Int32)
|
locations = Numeric.array(locations, Numeric.Int32)
|
||||||
if not longFormat:
|
if not longFormat:
|
||||||
locations = locations * 2
|
locations = locations * 2
|
||||||
if len(locations) <> (ttFont['maxp'].numGlyphs + 1):
|
if len(locations) < (ttFont['maxp'].numGlyphs + 1):
|
||||||
raise ttLib.TTLibError, "corrupt 'loca' table"
|
raise ttLib.TTLibError, "corrupt 'loca' table"
|
||||||
self.locations = locations
|
self.locations = locations[:ttFont['maxp'].numGlyphs + 1]
|
||||||
|
|
||||||
def compile(self, ttFont):
|
def compile(self, ttFont):
|
||||||
locations = self.locations
|
locations = self.locations
|
||||||
|
Loading…
x
Reference in New Issue
Block a user