W3C home > Mailing lists > Public > www-xsl-fo@w3.org > November 2007

Re: Unicode characters and PDF fonts

From: Jeremias Maerki <dev@jeremias-maerki.ch>
Date: Wed, 07 Nov 2007 22:01:02 +0100
To: www-xsl-fo@w3.org
Message-Id: <20071107214320.7383.DEV@jeremias-maerki.ch>

On 07.11.2007 20:52:29 Khaled Aly wrote:
> Hi
> 
> Thanks for the resource. I frankly got lost there. I can't figure how to 
> ensure if one of the Unicode character sets contain the desired symbol, 

It's not about "Unicode character sets". It's about the question if a
font has a glyph for a particular Unicode character.

> by mapping its hex or decimal code, and how to find out if the glyph is 
> supported by the font set used by (Adobe reader 8), or by a given font 
> name. And whether a missing or mis-rendered character is FOP related 
> (I'm using 0.93) or PDF font related.

It's not related to FOP. It's really just about the font. Not every font
has every possible glyph.

> For instance, the character &#x25B6; which is a black arrow head that 
> could be used for a bullet,

Ok, so far so good. This is a correct Unicode character and I can
confirm that 25B6 is a black arrow head pointing to the right ("BLACK
RIGHT-POINTING TRIANGLE").

> appears in the FO file as an empty square 
> (of same size), and is rendered by Adobe Reader as #. Does this bring 
> any conclusion?

It's rendered as a # because FOP maps any unavailable character to the
"#" glyph.

So, how to find a font that supports the glyph you want?

If you're on Windows XP you can use the "Character Map" application
which you find under "Start - All Programs - Accessoires - System Tools".
If I set the current font to "Arial" I can scroll through all available
glyphs. 25B6 is not there, but 25BA which looks similar. Looking further,
"Arial Unicode MS" does have the 25B6 glyph, so you could use this font.
"Lucida Sans Unicode" has it, too. And so forth....

You simply have to configure the font in FOP's configuration as
explained here:
http://xmlgraphics.apache.org/fop/0.93/fonts.html

Please note that with FOP 0.94 there's an font auto-dectection feature
so you don't have to manually register the fonts anymore. But the
feature is relatively new and still needs some fine-tuning.
http://xmlgraphics.apache.org/fop/0.94/fonts.html#register

<snip/>

Jeremias Maerki
Received on Wednesday, 7 November 2007 21:01:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 7 November 2007 21:01:14 GMT