Petar wrote:


The first text element renders properly in normal font.
The second text element also renders properly in bold font.
The third and fourth text elements do not render properly.  I would expect them
to use Rockwell Extra Bold (which is an installed font).  Instead bold font
gets used.  Why?

The "problem" is in bridge.TextUtilities. This class maps 600 and above to WEIGHT_BOLD. The reason is that the JDK (1.3 & 1.4) will render WEIGHT_HEAVY/EXTRABOLD/ULTRABOLD as 'regular' if there is not a matching font, instead of dropping back to 'BOLD'.

   It might be possible to do even more of the font matching ourselves
but this is actually quite tricky (we would have to try instantiating
each weight of font and see what the weight attribute actually was -
if that would even work).  If you can put together a patch that
fixes this without breaking anything it would probably be accepted.

I looked through the code a bit and I noticed that TextNode element contains
weight text attribute but it is always set to either 1.0 (NORMAL) or 2.0
(BOLD).  My guess is that this is why I cannot get the "bolder of bold" and
"900" to work.

Am I doing something wrong? Is there a way to use extra bold font in Batik?

Thanks,
Petar


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





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



Reply via email to