Hi Daniel,

> 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.

I doubt you will find any free font with both large Unicode support and
several variants. You might want to give a try to FreeFont
(http://www.nongnu.org/freefont/), which have a fairly reasonable
support of Unicode, although not identical among the variants. I guess
you can find commercial fonts, too.

Otherwise it should be rather easy to build a large Unicode support from
several different fonts, each one supporting some given subset (say, a
latin one, a cyrillic, a japanese, etc.). If you stick to Times-like
shapes you should end up with a not too non-uniform set.


> 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.

Actually both the PDF renderer and the Java2D one do the same thing,
that is fall back to default fonts. It's just that for PDF those default
fonts are the well-known base 14 fonts, which support only a limited
subset of Unicode (the latin range, basically). For Java2D those are the
 Lucida fonts with a larger range of glyphs.


> 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.

Exactly. AWT doesn't give access to the TTF file, which prevents
embedding the font in the PDF 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... :-/

Well that's an idea. Anyway the whole font stuff would benefit from some
(major) improvements. But that's a complex area which involves a number
of standards (Type1, TrueType, Unicode...) and requires quite an amount
of knowledge... but wait, that's also very interesting! ;-)

Vincent

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

Reply via email to