Hi Jeremias,
        I finally got time to check on this and here's what I found.
Our web designer said she looked at the Lucida Sans Typewriter font in
the Adobe professional font editor and it appeared to have the unicode
characters 25A1 and 25AB in it.  I just opened the Lucida Sans
Typewriter Regular font LUCON.TTF in that Windows Character Map program
and those characters are missing.  There is another font Lucida Sans
Unicode L_10646.TTF which is a much larger file, which does show those
characters.  If I just add that file to my list of embedded fonts for
the renderer, and specify font=Lucida Sans Unicode for the square
characters, FOP 1.0 prints a square.  Apparently it's just an odd
coincidence that FOP 0.95 prints the unicode character 0x25A1 for
missing glyph which happened to be the glyph I was trying to print.
Using FOP 1.0 which is apparently doing what 0.95 was supposed to be
doing just makes the 56KB 2-page PDF file into a 59KB file.
 

-----Original Message-----
From: Jeremias Maerki [mailto:[email protected]] 
Sent: Friday, November 19, 2010 3:29 AM
To: [email protected]
Subject: Re: wrong glyph shown for box (was: TrueType Font Embedding)

Hi Eric

Sorry for the delay. I've looked at your example you've sent me
off-list.

On 12.11.2010 09:32:13 Jeremias Maerki wrote:
<snip/>
> > The problem I'm currently having with output is rendering special 
> > unicode glyphs.  I sent one unicode as a 25AB with the font file 
> > LTYPE.TTF which came installed with Windows XP.  In FOP 0.95 it 
> > produced a square which is what I want.  That character is supposed 
> > to be a square.  If I'm wrong and that character is not in the font 
> > then the square was the default print for character not found.  I'd 
> > like to be able to run a routine through FOP to get out a list of 
> > all unicodes and what characters they go with for a particular font.

> > When I tried FOP 1.0, that same code produced a pound #.
> 
> Hmm, sounds like a regression. I guess we'll have to look into that
then.
> And such a glyph dump utility is definitely something FOP could profit

> from. Has anybody already written something like that? We could 
> integrate it into org.apache.fop.tools.fontlist maybe.

It's not really a regression although the change is curious. Anyway, the
box you got with FOP 0.95 was not the 0x25AB character (WHITE SMALL
SQUARE) but actually the .notdef glyph which often is a big square (not
a small square). In later versions, FOP seems to catch the missing
character and replace it by "#". The "#" character is not really the
right one to display for a glyph that was not found, but FOP has been
doing that for 10 years. Maybe that gets looked at at some point. But I
don't know (and won't investigate) why FOP didn't produce a "#".

Anyway, the 0x25AB glyph is not in the font you're using. If you want a
little square glyph, you need to use a different font. You can use
Windows' "Character Map" tool to find a suitable one.

<snip/>

Jeremias Maerki

Reply via email to