Beispiel #1
0
 def stringWidth(self, s, font=None):
   "Return the logical width of the string if it were drawn \
   in the current font (defaults to self.font)."
   if not font:
     font = self.defaultFont
   fontname = self._findExternalFontName(font)
   return pdfmetrics.stringwidth(s, fontname) * font.size * 0.001
Beispiel #2
0
 def stringWidth(self, s, font=None):
   "Return the logical width of the string if it were drawn \
   in the current font (defaults to self.font)."
   if not font:
     font = self.defaultFont
   fontName=self._findPostScriptFontName(font)
   return pdfmetrics.stringwidth(s, fontName) * font.size * 0.001
Beispiel #3
0
 def stringWidth(self, s, font=None):
   if not font:
     font = self.defaultFont
   fontname = Fontmapping.getPdfName(font)
   return pdfmetrics.stringwidth(s, fontname) * font.size * 0.001
Beispiel #4
0
 def stringWidth(self, s, font=None):
     if not font:
         font = self.defaultFont
     fontname = Fontmapping.getPdfName(font)
     return pdfmetrics.stringwidth(s, fontname) * font.size * 0.001