kmikzjh / pyfpdf

Automatically exported from code.google.com/p/pyfpdf
GNU Lesser General Public License v3.0
0 stars 0 forks source link

fix in get_string_width #63

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

s = u'Texto largo que no cabe en esta celda pero que será ajustado'
w = self.get_string_width(s)
print w # 29.9931666667
/usr/lib/python2.7/site-packages/fpdf/fpdf.py:363: UnicodeWarning: Unicode 
equal comparison failed to convert both arguments to Unicode - interpreting 
them as being unequal
  w += cw.get(s[i],0)

but, is correct if switch 'á' for 'a'

s = u'Texto largo que no cabe en esta celda pero que sera ajustado'
w = self.get_string_width(s)
print w # 103.321555556

Original issue reported on code.google.com by only.web.list on 1 Aug 2013 at 12:21

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 21d717f6cbcb.

Original comment by reingart@gmail.com on 5 Feb 2014 at 3:14