~ubuntu-branches/ubuntu/maverick/fonttools/maverick

« back to all changes in this revision

Viewing changes to Lib/fontTools/ttLib/tables/_p_o_s_t.py

  • Committer: Bazaar Package Importer
  • Author(s): Paul Wise
  • Date: 2008-07-24 00:03:02 UTC
  • mfrom: (2.1.8 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080724000302-0tediu4ysxkn6dyy
Tags: 2.2-2
* Fix dependencies to use Numpy instead of Numeric (Closes: #492010)
* Drop unneeded quilt build-dependency
* Support noopt in DEB_BUILD_OPTIONS
* Complies with policy 3.8.0, update Standards-Version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import sys
1
2
from fontTools.ttLib.standardGlyphOrder import standardGlyphOrder
2
3
import DefaultTable
3
4
import struct, sstruct
77
78
                data = data[2:]
78
79
                indices = array.array("H")
79
80
                indices.fromstring(data[:2*numGlyphs])
80
 
                if ttLib.endian <> "big":
 
81
                if sys.byteorder <> "big":
81
82
                        indices.byteswap()
82
83
                data = data[2*numGlyphs:]
83
84
                self.extraNames = extraNames = unpackPStrings(data)
143
144
                                extraDict[psName] = len(extraNames)
144
145
                                extraNames.append(psName)
145
146
                        indices.append(index)
146
 
                if ttLib.endian <> "big":
 
147
                if sys.byteorder <> "big":
147
148
                        indices.byteswap()
148
149
                return struct.pack(">H", numGlyphs) + indices.tostring() + packPStrings(extraNames)
149
150