Properties when rendering html

We have noticed some behaviour changes between Java runtime 1.5.10 and 1.6; in 1.5.10 and all prior versions, our html rendering required slightly less vertical space. In 1.6, some of our graphics boxes now cannot quite contain the text they used to hold easily.

A second difference: One of our users uses a lot of extended html to encode Hebrew. In 1.5.10 they render flawlessly, the vowel points under or over the consonants as expected. In 1.6 the vowels render to the left of the consonant they are modifying and the whole text is stretched out as a result. What are we missing? or what changed in the release that we need now to program for?

thanks

BobMacD

[687 byte] By [BobMacDa] at [2007-11-26 17:09:41]
# 1
You don't say how you are using Java to render HTML, but it's pretty clear you are talking about the difference between fonts.
DrClapa at 2007-7-8 23:37:31 > top of Java-index,Java Essentials,Java Programming...
# 2

HTML is rendered using the JTextPane by calling

JTextPane.setText(myText) method where

myText = "<div style='font-family:Arial;font-size:12' font color='#000000' align='center'>Hello World</div>"

It appears that there are differences in html rendering between version 5 and 6.

speedoflighta at 2007-7-8 23:37:31 > top of Java-index,Java Essentials,Java Programming...
# 3

Further analysis indicates two different issues: 1 that at font size 12 there is a 1 pixel difference in line height. This is fine for a one liner but a real nuisance when you have 12 lines and the bottom line can no longer be read without expanding the box. Also the difference is more marked the larger the font size.

2 most of the Hebrew characters are rendering as if they were individual characters rather than composite - but the right to left appears not to have been affected. For instance

לָדַעַת בָּאָרֶץ דַּרְכֶּךָ

as text displays correctly in 5 (with the vowel points under the consonants) but wrongly in 6 (the vowels get pushed to the left and take up a whole character position)

This may not show correctly since the preview transforms these letters twice - here's hoping

BobMacDa at 2007-7-8 23:37:31 > top of Java-index,Java Essentials,Java Programming...