atom feed16 messages in org.oasis-open.lists.docbook-appsRE: [docbook-apps] RE: XSL-FO and uni...
FromSent OnAttachments
Fabien TillierJul 6, 2010 6:57 am 
Richard HamiltonJul 6, 2010 2:16 pm 
Mauritz JeansonJul 6, 2010 2:59 pm 
rob....@emc.comJul 7, 2010 9:56 am 
Fabien TillierJul 8, 2010 4:45 am 
Fabien TillierJul 8, 2010 7:30 am 
rob....@emc.comJul 8, 2010 7:56 am 
Fabien TillierJul 8, 2010 8:41 am 
rob....@emc.comJul 8, 2010 9:22 am 
deannelsonJul 8, 2010 9:43 am 
Bob StaytonJul 8, 2010 10:43 am 
Fabien TillierJul 8, 2010 11:46 pm 
Fabien TillierJul 8, 2010 11:47 pm 
Fabien TillierJul 8, 2010 11:54 pm 
Fabien TillierJul 9, 2010 12:53 am 
rob....@emc.comJul 9, 2010 9:03 am 
Subject:RE: [docbook-apps] RE: XSL-FO and unicode
From:Fabien Tillier (f.ti@cerep.fr)
Date:Jul 8, 2010 4:45:32 am
List:org.oasis-open.lists.docbook-apps

Thanks rob. I still do have some troubles.... I am using the same docbook xml to generate either HTML or PDF. Some characters
(µ, °) are visible in PDF but not in HTML while others (alpha, beta) are visible
in HTML but not in PDF.... I am getting mad, as both are encoded the same way in the original XML... Maybe it is because I am using ISO-8859-1 ? If I try with UTF-8, I get correct display in HTML but the problem is still
there in FOP(huh, PDF). When I look in the properties, only Helvetica font is
used, not Symbol, which I indicate in the XSL-FO stylesheet with <xsl:param name="symbol.font.family" select="'Symbol'"/> <xsl:param name="body.font.family" select="'Helvetica,Arial,Serif'"/> I have that strange feeling I am running in circles... As of inserting Arial Unicode in FOP, I hesitate, as the ttf file is 22Mb in
size...

Regards, Fabien

-----Message d'origine----- De : rob.@emc.com [mailto:rob.@emc.com] Envoyé : mercredi 7 juillet 2010 18:57 À : docb@lists.oasis-open.org Objet : [docbook-apps] RE: XSL-FO and unicode

Fabien Tillier [mailto:f.ti@cerep.fr] wrote:

In the xsl-fo, I get <fo:block>&#945;</fo:block>

And in PDF, a wonderful "#" So, after some further readings, I found that I had to add some fonts, so in the XSL Customization, I added

<xsl:param name="symbol.font.family" select="'Arial Sans Unicode,Symbol,ZapfDingbats'"/>

But that does not change a thing.... though in the fo, I have <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="serif,Arial Sans Unicode,Symbol,ZapfDingbats" font-size="10pt" text-align="justify" line-height="normal" font-selection-strategy="character-by-character" line-height-shift-adjustment="disregard-shifts" writing-mode="lr-tb" language="en">

I don't know what OS you're working in, but I don't recognize the font name
"Arial Sans Unicode". Do you mean "Arial Unicode MS"? The most current version
of that font is available on Windows systems that have Office 2003 or later
installed, and it does contain the character you specified, which is U+03B1
("Greek Small Letter Alpha").

The "Symbol" font also contains this character, and I recommend using that
instead because it is one of the Base 14 fonts that will always be available in
PDF. I think you'll find that if you put "Symbol" first in your font list, it
will work. As Mauritz pointed out, FOP does not handle alternate font
selections, so it will only use the first font you specify ("Arial Sans Unicode"
in your list). If the glyph doesn't exist in that font or in the default
fallback font (which I think is always "Times"), you'll get a "missing glyph"
symbol.

If you do want to load OS fonts such as "Arial Unicode MS", in addition to
specifying the font name in the FO, you need to create a FOP configuration file
and add the <auto-detect /> instruction, as documented here:
http://xmlgraphics.apache.org/fop/0.95/fonts.html#basics

************************* Rob Cavicchio Principal Technical Writer & Information Architect EMC Captiva Information Intelligence Group EMC Corporation 3721 Valley Centre Drive, Ste 200 San Diego, CA 92130

The opinions expressed here are my personal opinions. Content published here is
not read or approved in advance by EMC and does not necessarily reflect the
views and opinions of EMC.