I am working on a project using FOP to produce PDF documents. The situation
now was, that our customer said a font size of 7pt would be too small, but
8pt turned out to be too big, because some contents did not fit into the
documents' table cells. Since the PDF specification allows fractional font
size so e.g. 7.5pt, I wondered why FOP could not produce such values.
Investigating FOP's source code I found the following line in class
PDFRenderer within method renderWordArea(..):

pdf = pdf.append("/" + name + " " + (size / 1000) + " Tf\n");

The integer operation size / 1000 causes fractional font sizes, that have been 
specified in the FO input and are now contained in variable size, to
become whole-numbered values.
If one simply replace the line by

pdf = pdf.append("/" + name + " " + (((float)size) / 1000f) + " Tf\n");

to perform a float calculation FOP is able to produce fractional font size!

Perhaps you are interested in this change, or do you see any problems? If you like, I 
could send you the whole PDFRenderer file (fop0.20.3).

Kind regards,
Björn Lütkemeier

Klingender Str. 5
D-33100 Paderborn
internet: http://www.s-und-n.de
phone:  05251 / 1581-35

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to