xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Hennebert <vhenneb...@gmail.com>
Subject Re: Arial True Type becomes italic in AWT
Date Tue, 14 Jul 2009 11:12:34 GMT

Kuno sent me his FO file off-list for confidentiality reasons. The
interesting part is the fo:flow element:
    <fo:flow flow-name="xsl-region-body" font-style="normal"
      font-family="Arial,Helvetica" font-size="8pt">
font-family is overridden nowhere else.

On my Linux system the file renders fine, using the Helvetica font since
I don’t have Arial installed.

Do you have any warning about fonts not found? What do you get if you
specify Arial only as a font family? Maybe the Arial font could not be
found, so FOP falls back to Helvetica whose handling might be buggy
(Helvetica does often not exist per se, but is mapped to another
similar-looking font).

You can run the small attached program to get a list of all the fonts
available through Java AWT. Look at the first column (font family).
You might have to replace Arial with ArialMT.


Vincent Hennebert wrote:
> Hi Kuno,
> I can’t reproduce your problem on my Linux platform. Can you
> provide your FO file (if it’s not too big)?
> Thanks,
> Vincent
> qnob wrote:
>> Hi again,
>> same problem occurs with any other True Type fonts as well. 
>> I've found randomly a Font Demo
>> (http://leepoint.net/notes-java/GUI-appearance/fonts/22fontdemo.html). This
>> works well, however, it's based on JPanel (Swing). As far as I know this
>> should also use the AWT under the hood.
>> Any help?
>> Thanks in advance.
>> Kuno
>> qnob wrote:
>>> Hello,
>>> I'd like to generate a layout with Arial True Type fonts using different
>>> renderers. I've noticed a problem with all renderers that use AWT (PNG,
>>> TIF, AWT) under the hood. For some reason the font becomes italic. If I
>>> use Helvetica everthing is ok.
>>> I use Windows XP, SUN JDK 6, Apache FOP 0.95
>>> Does anybody have a clue what the problem is? I've checked the FOP
>>> documentation. Apparently, the JDK should use the system fonts for AWT, no
>>> configuration needed! 
>>> Thanks 
>>> Kuno

View raw message