Java measures font in Pixels, iText measures them in Points (pixel * .75) will give you the proper Point size. Ie:
34 * .75 = 25.5 points. Conversely, Point / .75 will give you proper Pixel size. These measurements are based on 96ppi which is not always the case, but it is very common. -Bill Ensley www.bearprinting.com > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of david allen > Sent: Sunday, July 15, 2007 8:07 PM > To: itext-questions@lists.sourceforge.net > Subject: [iText-questions] Itext font size vs Java swing font size > > > Hi all, > I have a java swing applet that allows the user to enter some > text into a JTextArea object. This text is eventually used to > create a pdf file. > However, in the JTextArea I have set the font size to > something quite large like 34 otherwise it is too small to > see in the JTextArea. If I use the same value for the font > size in IText I get a very , very large font. > > Does anyone know if the JTextArea uses a different system to > render the fonts to what Itext uses? > > Thank you > David > -- > View this message in context: > http://www.nabble.com/Itext-font-size-vs-Java-swing-font-size- > tf4084297.html#a11608569 > Sent from the iText - General mailing list archive at Nabble.com. > > > -------------------------------------------------------------- > ----------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > iText-questions mailing list > iText-questions@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/itext-questions > Buy the iText book: http://itext.ugent.be/itext-in-action/ ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/