It still wasn't right; I think the glyph order mess is now sufficiently cleaned up; at least compiling the result of ttdump -x glyf works again.
git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@265 4cde692c-a291-49d1-8350-778aa11640f8
This commit is contained in:
parent
22f068929c
commit
d57c4346e5
@ -42,7 +42,7 @@ Dumping 'prep' table...
|
||||
"""
|
||||
|
||||
#
|
||||
# $Id: __init__.py,v 1.33 2002-05-25 14:56:29 jvr Exp $
|
||||
# $Id: __init__.py,v 1.34 2002-05-25 15:28:48 jvr Exp $
|
||||
#
|
||||
|
||||
import os
|
||||
@ -258,10 +258,10 @@ class TTFont:
|
||||
a font object.
|
||||
"""
|
||||
if self.has_key("maxp") and self.has_key("post"):
|
||||
# Make sure the glyph order is loaded, as it otherwise may
|
||||
# get lost if the XML doesn't contain the glyph order, yet
|
||||
# does contain the CFF table, which then can't be used to
|
||||
# retrieve the glyph order.
|
||||
# Make sure the glyph order is loaded, as it otherwise gets
|
||||
# lost if the XML doesn't contain the glyph order, yet does
|
||||
# contain the table which was originally used to extract the
|
||||
# glyph names from (ie. 'post', 'cmap' or 'CFF ').
|
||||
self.getGlyphOrder()
|
||||
import xmlImport
|
||||
xmlImport.importXML(self, file, progress)
|
||||
@ -342,10 +342,6 @@ class TTFont:
|
||||
|
||||
def setGlyphOrder(self, glyphOrder):
|
||||
self.glyphOrder = glyphOrder
|
||||
if self.has_key('CFF '):
|
||||
self['CFF '].setGlyphOrder(glyphOrder)
|
||||
if self.has_key('glyf'):
|
||||
self['glyf'].setGlyphOrder(glyphOrder)
|
||||
|
||||
def getGlyphOrder(self):
|
||||
try:
|
||||
|
@ -52,7 +52,7 @@ class table__g_l_y_f(DefaultTable.DefaultTable):
|
||||
currentLocation = 0
|
||||
dataList = []
|
||||
recalcBBoxes = ttFont.recalcBBoxes
|
||||
for glyphName in ttFont.getGlyphOrder():
|
||||
for glyphName in self.glyphOrder:
|
||||
glyph = self.glyphs[glyphName]
|
||||
glyphData = glyph.compile(self, recalcBBoxes)
|
||||
locations.append(currentLocation)
|
||||
|
@ -78,14 +78,8 @@ class ExpatParser:
|
||||
tableClass = ttLib.getTableClass(tag)
|
||||
if tableClass is None:
|
||||
tableClass = DefaultTable
|
||||
if tag in ('post', 'loca') and self.ttFont.has_key(tag):
|
||||
# Special-case 'post' to prevent a bootstrap problem with
|
||||
# ttCompile.py -i:
|
||||
# - import post table from XML
|
||||
# - don't import glyf table from XML
|
||||
# - the glyphOrder is in the *original* binary post table
|
||||
# So: we can't throw away the original post table.
|
||||
# Also special-case the 'laca' table as we need the
|
||||
if tag == 'loca' and self.ttFont.has_key(tag):
|
||||
# Special-case the 'loca' table as we need the
|
||||
# original if the 'glyf' table isn't recompiled.
|
||||
self.currentTable = self.ttFont[tag]
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user