Example #1
0
 def fontDescent(self, font=None):
   if not font:
     font = self.defaultFont
   fontname = Fontmapping.getPdfName(font)
   return -pdfmetrics.ascent_descent[fontname][1] * 0.001 * font.size
Example #2
0
 def fontDescent(self, font=None):
     if not font:
         font = self.defaultFont
     fontname = Fontmapping.getPdfName(font)
     return -pdfmetrics.ascent_descent[fontname][1] * 0.001 * font.size
Example #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
Example #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