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 "Jun, Edward" <Ed...@ctb.com> on 2003/04/02 20:29:02 UTC

Support for Unicode and special fonts

Hi,
 
I am trying to create pdf's from xml that has Unicode symbols and math
glyphs...
>From the list of characters that I would like to have published, only a
small subset is possible in FOP without any config changes. I wanted to know
if
 
1) Is Unicode is fully supported, or what is supported with FOP 0.20.4 and
2) If supported, how can I get it to work with special Unicode symbols for
math?

I am attaching  the fo and pdf for your reference.

Thanks!
 
EJ
 
 

Re: Support for Unicode and special fonts

Posted by Jeremias Maerki <de...@greenmail.ch>.
The steps required to register your special mathematical font within FOP
is described in: http://xml.apache.org/fop/fonts.html
There's nothing more we can tell you. Many people use that successfully
even for Russian, Asiatic etc. fonts.

But there are a few other comments:

You use "any" in the font family. FOP isn't very intelligent WRT font
selection strategies. "any" for the PDF renderer defaults to the Base14
font Helvetica which doesn't contain most of your characters. FOP
doesn't automagically switch to another font that contains these
characters, yet. You have to explicitly state the font to use.

I've got the Windows standard font "Arial" run through TTFReader on my
machine. It is registered in the userconfig.xml and the userconfig.xml
is active (-c userconfig.xml). Now, when I change the font-family to
"Arial" in your unicode.fo I get the correct characters for all
mathematical symbols that exist in the Arial font. That's not all, but
at least a fair number. Which proves that it works. Characters that
don't exist in the font get substituted. So as long as you correctly
specify a font that contains the characters in question FOP will display
them.

I've also quickly tested fo:inline. Works fine.

I also suggest upgrading to FOP version 0.20.5rc (maybe not 0.20.5rc2
because there could be a showstopper). Since 0.20.4 there have been
several bugfixes in TrueType/OpenType handling.

Do you get any error messages during TTFReader?

On 03.04.2003 05:18:34 Jun, Edward wrote:
> Thanks for your input.
> I've also tried generating the font metrics file, register the fonts, etc..
> But no to no success to make it work for pdf. :(
> 
> Has anyone been able to register fonts with FOP? (esp. mathematical)
> Can you walk me through the steps to make it work?
> I pretty much run the TTFReader, added the fonts in userconfig.xml,
> Recompiled FOP, and even ran it with the -c option to the userconfig.xml.
> Then I specified the font in <fo:inline> 
> 
> Am I missing anything?


Jeremias Maerki

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


Re: Support for Unicode and special fonts

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Jun, Edward wrote:
> I am trying to create pdf's from xml that has Unicode symbols and math
> glyphs...
>>>From the list of characters that I would like to have published, only a
> small subset is possible in FOP without any config changes. I wanted to know
> if
>  
> 1) Is Unicode is fully supported, or what is supported with FOP 0.20.4 and
> 2) If supported, how can I get it to work with special Unicode symbols for
> math?

Have you read
  http://xml.apache.org/fop/faq.html#pdf_characters

There is a file in the examples section which prints all
characters available in the default PDF fonts.

J.Pietschmann


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


Re: Support for Unicode and special fonts

Posted by Clay Leeds <cl...@medata.com>.
EJ,

DISCLAIMER: I probably don't have the answer to your troubles...

When I run the FO document to AWT, I see every character except 2: "Line
Hex 20E1..." and "Ray Hex 20D7...".

BTW, you might want to take a look at your error logs, as the path(s) to
your .eps files might pose a problem (there's a ":" in there and I don't
know if that'll have adverse effects). Here's the output from my system:

C:\Program Files\Java\fop-0.20.4>fop -fo "C:\Documents and
Settings\cleeds\Deskt
op\unicode.fo" -awt

C:\Program Files\Java\fop-0.20.4>java -cp
build\fop.jar;lib\batik.jar;lib\xalan-2.3.1.jar;lib\xercesImpl-2.0.1.jar;lib\xml-apis.jar;lib\avalon-framework-cvs-200
20315.jar;lib\logkit-1.0.jar;lib\jimi-1.0.jar org.apache.fop.apps.Fop
-fo "C:\Documents and Settings\cleeds\Desktop\unicode.fo" -awt
[ERROR] Logger not set
[INFO] building formatting object tree
[INFO] [1]
[INFO] [2]
[INFO] [3]
[INFO] [4]
[INFO] [5]
[ERROR] Error while creating area : Error while recovering Image
Informations (file:/C:/Documents and
Settings/cleeds/Desktop/iwts:/images/grade_3/Raccoons_Busy
_Day03rSB.eps) : C:\Documents and
Settings\cleeds\Desktop\iwts:\images\grade_3\Raccoons_Busy_Day03rSB.eps
(The filename, directory name, or volume label syntax is incorrect)
[INFO] Parsing of document complete, stopping renderer

Also, I don't know if this'll help, but I tried processing the font.fo
doc, just to see what symbols are "built-in":

C:\Program Files\Java\fop-0.20.4>fop -fo
C:\java\fop-0.20.5rc2\examples\fo\basic\fonts.fo -awt

Good luck!

-- 
Clay Leeds - cleeds@medata.com
Web Developer - Medata, Inc. - http://www.medata.com
PGP Public Key: https://mail.medata.com/pgp/cleeds.asc


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