You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Sascha Punzmann <sp...@web.de> on 2006/02/17 14:44:24 UTC

FOP Unicode problem

hi, 

I know it is an topic that has been discussed several times here, but I really canot find the solution for me! If I want to add a unicode character for a checkbox "&#9744; --> &#9744;" The PDF only contains a "#". So far I understand that I need to convert this symbol somehow into an XML Font Metric to use it in the PDF Creation. But I don't know how. I tried to convert "ZapfDingbats" to such a XML file, but it failed due to a missing Unicode cmap table. So my question is, how do I get this symbol into my PDF?

regards Sascha 

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP Unicode problem

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 17.02.2006 15:54:29 Sascha Punzmann wrote:
> ok I searched a bit in the mailing list, but couldn't find the right
> thing.

The following may help you:
http://www.nabble.com/RE%3A-when-apache-FOP-will-full-support-font-family-lists-and-font-selection-strategy--t809908.html#a2103632

> Isn't it possible to copy this specail character from the
> "ZapfDingbats" font directly into the font-metric I'm using (I'm using a
> custom one already)? If so, how can I do this?

No, that doesn't work. This is only about the font metrics. It doesn't
mean that the missing character is suddenly and magically available in
the font. The actual glyph will still be missing.

> Maybe there exists a
> documentation about the whole concept behind the font?

Sure: http://partners.adobe.com/public/developer/font/index.html
But I guess you will not want to go in the business of patching fonts,
although there are tools out there that could help you. But then,
licensing problems may crop up and things like that. It would be better
to help us implement the full extent of the font-family and
font-selection-strategy properties.

> 
> fop-users@xmlgraphics.apache.org schrieb am 17.02.06 15:23:59:
> > 
> > XSL-FO allows you to specify a list of font names in the font-family
> > property but this is not supported by FOP, yet (FOP uses the first font
> > in the list it supports regardless of the characters to be rendered).
> > You'll have to find a TrueType font that contains all the characters. In
> > that case you're back to creating a XML font metrics file using the
> > TTFReader. You may also want to look through the mailing list archives.
> > I think I remember certain suggestions for alternative work-arounds.
> > 
> > On 17.02.2006 15:13:21 Sascha Punzmann wrote:
> > > Yes a lot easier than I thought! But with this I encountered another problem! 
> > > 
> > > my XML looks like this: <para>&#9744; Test text</para>
> > > 
> > > if I apply the font-family="ZapfDingbats" then all the para text is
> > > displayed in this font-family. It it possible to set up an optional
> > > font-display it the character isn't available in the primary
> > > font-family?
> > > 
> > > 
> > > fop-users@xmlgraphics.apache.org schrieb am 17.02.06 15:01:15:
> > > > 
> > > > ZapfDingbats is one of the base 14 fonts which are available in FOP
> > > > without doing anything special (at least when you render to PDF and PS).
> > > > So, provided that the Unicode value is correct (I haven't checked), you
> > > > can simply specify font-family="ZapfDingbats" and your checkbox should
> > > > be shown. So, you see it's a lot simpler than you thought. :-)
> > > > 
> > > > On 17.02.2006 14:44:24 Sascha Punzmann wrote:
> > > > > I know it is an topic that has been discussed several times here, but I
> > > > > really canot find the solution for me! If I want to add a unicode
> > > > > character for a checkbox "&#9744; --> &#9744;" The PDF only contains a
> > > > > "#". So far I understand that I need to convert this symbol somehow into
> > > > > an XML Font Metric to use it in the PDF Creation. But I don't know how.
> > > > > I tried to convert "ZapfDingbats" to such a XML file, but it failed due
> > > > > to a missing Unicode cmap table. So my question is, how do I get this
> > > > > symbol into my PDF?


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP Unicode problem

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
XSL-FO allows you to specify a list of font names in the font-family
property but this is not supported by FOP, yet (FOP uses the first font
in the list it supports regardless of the characters to be rendered).
You'll have to find a TrueType font that contains all the characters. In
that case you're back to creating a XML font metrics file using the
TTFReader. You may also want to look through the mailing list archives.
I think I remember certain suggestions for alternative work-arounds.

On 17.02.2006 15:13:21 Sascha Punzmann wrote:
> Yes a lot easier than I thought! But with this I encountered another problem! 
> 
> my XML looks like this: <para>&#9744; Test text</para>
> 
> if I apply the font-family="ZapfDingbats" then all the para text is
> displayed in this font-family. It it possible to set up an optional
> font-display it the character isn't available in the primary
> font-family?
> 
> 
> fop-users@xmlgraphics.apache.org schrieb am 17.02.06 15:01:15:
> > 
> > ZapfDingbats is one of the base 14 fonts which are available in FOP
> > without doing anything special (at least when you render to PDF and PS).
> > So, provided that the Unicode value is correct (I haven't checked), you
> > can simply specify font-family="ZapfDingbats" and your checkbox should
> > be shown. So, you see it's a lot simpler than you thought. :-)
> > 
> > On 17.02.2006 14:44:24 Sascha Punzmann wrote:
> > > I know it is an topic that has been discussed several times here, but I
> > > really canot find the solution for me! If I want to add a unicode
> > > character for a checkbox "&#9744; --> &#9744;" The PDF only contains a
> > > "#". So far I understand that I need to convert this symbol somehow into
> > > an XML Font Metric to use it in the PDF Creation. But I don't know how.
> > > I tried to convert "ZapfDingbats" to such a XML file, but it failed due
> > > to a missing Unicode cmap table. So my question is, how do I get this
> > > symbol into my PDF?



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP Unicode problem

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
ZapfDingbats is one of the base 14 fonts which are available in FOP
without doing anything special (at least when you render to PDF and PS).
So, provided that the Unicode value is correct (I haven't checked), you
can simply specify font-family="ZapfDingbats" and your checkbox should
be shown. So, you see it's a lot simpler than you thought. :-)

On 17.02.2006 14:44:24 Sascha Punzmann wrote:
> I know it is an topic that has been discussed several times here, but I
> really canot find the solution for me! If I want to add a unicode
> character for a checkbox "&#9744; --> &#9744;" The PDF only contains a
> "#". So far I understand that I need to convert this symbol somehow into
> an XML Font Metric to use it in the PDF Creation. But I don't know how.
> I tried to convert "ZapfDingbats" to such a XML file, but it failed due
> to a missing Unicode cmap table. So my question is, how do I get this
> symbol into my PDF?


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org