~ubuntu-branches/debian/sid/pyx/sid

« back to all changes in this revision

Viewing changes to pyx/dvi/texfont.py

  • Committer: Package Import Robot
  • Author(s): Stuart Prescott
  • Date: 2012-12-17 13:45:12 UTC
  • mfrom: (1.1.4)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: package-import@ubuntu.com-20121217134512-u0w6lrgdowsc1sfu
Tags: 0.12.1-1
* New upstream release
* Update maintainer address.
* Update copyright format URL.
* Bump standards version to 3.9.4 (no changes required).
* Drop postinst that was needed for lenny->squeeze upgrades.

Show diffs side-by-side

added added

removed removed

Lines of Context:
173
173
    def bbox(self):
174
174
        return self._bbox
175
175
 
176
 
    def processPS(self, file, writer, context, registry, bbox):
177
 
        bbox += self.bbox()
 
176
    def _text(self, writer):
178
177
        if self.fontmap is not None:
179
178
            mapline = self.font.getMAPline(self.fontmap)
180
179
        else:
181
180
            mapline = self.font.getMAPline(writer.getfontmap())
182
181
        font = mapline.getfont()
183
 
        text = font.text_pt(self.x_pt, self.y_pt, self.charcodes, self.size_pt, decoding=mapline.getencoding(), slant=mapline.slant, ignorebbox=True)
184
 
        text.processPS(file, writer, context, registry, bbox)
 
182
        return font.text_pt(self.x_pt, self.y_pt, self.charcodes, self.size_pt, decoding=mapline.getencoding(), slant=mapline.slant, ignorebbox=True)
 
183
 
 
184
    def textpath(self):
 
185
        from pyx import pswriter
 
186
        return self._text(pswriter._PSwriter()).textpath()
 
187
 
 
188
    def processPS(self, file, writer, context, registry, bbox):
 
189
        bbox += self.bbox()
 
190
        self._text(writer).processPS(file, writer, context, registry, bbox)
185
191
 
186
192
    def processPDF(self, file, writer, context, registry, bbox):
187
193
        bbox += self.bbox()
188
 
 
189
 
        mapline = self.font.getMAPline(writer.getfontmap())
190
 
        font = mapline.getfont()
191
 
        text = font.text_pt(self.x_pt, self.y_pt, self.charcodes, self.size_pt, decoding=mapline.getencoding(), slant=mapline.slant, ignorebbox=True)
192
 
        text.processPDF(file, writer, context, registry, bbox)
 
194
        self._text(writer).processPDF(file, writer, context, registry, bbox)
193
195