Hallo,

I am using iText to determine how many words fit to a line with a certain width. For that I am using the method getWidthPoint() of the class BaseFont to calculate the width of a word in a defined Font.
This is working fine, until I wrote a junit Test to test if the width is ok for the word. I calculate the a char width manually with a tool called FontForge (http://fontforge.sourceforge.net/) where I get information about the width of a char in a certain Font.


For example, I am using Arial Bold Italic 30pt and checking the char i:
The Em size of this Font is corresponding to FontForge: 2048
The Em width of the char i corresponding to FontForge: 569
=> calculating the width in point: 569 * 30 / 2048 = 8,3350 (roundig to 4th decimal <http://dict.leo.org/?p=2Ib6..&search=decimal> place <http://dict.leo.org/?p=2Ib6..&search=place>)


The getWidthPoint() has as result 8,3100 (roundig to 4th decimal <http://dict.leo.org/?p=2Ib6..&search=decimal> place <http://dict.leo.org/?p=2Ib6..&search=place>)

Is this is a bug in iText or FontForge ? Or are there only different roundings in both applications ? Can you give me any advice, solution ?
Thanks in advance


--
Best Regards
Stefan Duffner




------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to