Vincent Hennebert wrote:
So if I were you, I wouldn't try to derive a bold typeface from a normal
one ;-) Like Jeremias said I would rather find a naturally bold font.

Are there even any fonts which both support a large subset of unicode and have bold and italic variants? I went searching a while back and found nothing.

The underlying problem here is that FOP's PDF renderer can't substitute fonts when the specified font doesn't exist (the Java2D renderer does this automatically as a side-effect of Java.) As a result of this limitation, developers get forced to include some huge font like "Arial Unicode MS", even though there are enough fonts on their operating system that they don't need to use this font in any other application.

FOP could use bits of AWT to figure out how to substitute, the problem as I understand it is that there is no trivial way to map a Font object to a TTF file.

It's possible though... in a roundabout and non-portable way.

  sun.font.FontManager.getFontPath(false);  => "C:\\Windows\\Fonts"

From that we would then open every TTF file, which gives us the name and style for each TTF file. Reversing that map would give us a mapping from font family and style back to the TTF file which needs to be embedded.

It would cause a hell of a lot more than an extra 2 seconds startup time, however... :-/

I did consider doing this at the XSL-FO level somehow, running it through some Java code to automatically insert an <fo:inline> where fonts need substituting.

Daniel


--
Daniel Noll

Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, Australia    Ph: +61 2 9280 0699
Web: http://nuix.com/                               Fax: +61 2 9212 6902

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.

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

Reply via email to