You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Dave Austin <da...@gmail.com> on 2005/01/17 22:56:34 UTC

Bullets not showing up in SVG

I'm not sure if this is more of an FOP problem, or if it is Batik. 
I'm posting on this board because I read that FOP uses Batik for
conversion to SVG anyway. I have a FO doc that I convert to SVG with
FOP.  The doc contains a bulleted list of text.  The bullets can be
seen in the FO doc as Symbol character glyphs.  The font face is
"Symbol" and the text inside is: \342\200\242.   When I run FOP, it
always replaces these bullets with ?'s. This is only happens on my
linux machine, on windows it is fine.   Obviously what is happening
here is the FOP cannot determine the glyph associated with the
"Symbol" font and is substituting ?'s.

  The funny thing is that i have a bunch of windows fonts installed on
linux (including symbol.ttf), and i know that JVM can see the symbol
font because when i call getAvailableFontFamilyNames() on the Graphics
environment, it returns all the fonts.  The wierd thin is that the
Symbol font entry in the fonts.dir folder is as follows (only two
entries):

symbol.ttf -monotype-Symbol-medium-r-normal--0-0-0-0-p-0-iso10646-1
symbol.ttf -monotype-Symbol-medium-r-normal--0-0-0-0-p-0-microsoft-symbol

but the rest of the windows fonts list way more:

arial.ttf -monotype-Arial-medium-r-normal--0-0-0-0-p-0-iso8859-1
arial.ttf -monotype-Arial-medium-r-normal--0-0-0-0-p-0-iso8859-10
arial.ttf -monotype-Arial-medium-r-normal--0-0-0-0-p-0-iso8859-13
arial.ttf -monotype-Arial-medium-r-normal--0-0-0-0-p-0-iso8859-15
arial.ttf -monotype-Arial-medium-r-normal--0-0-0-0-p-0-iso8859-16
arial.ttf -monotype-Arial-medium-r-normal--0-0-0-0-p-0-iso8859-2
arial.ttf -monotype-Arial-medium-r-normal--0-0-0-0-p-0-iso8859-3
arial.ttf -monotype-Arial-medium-r-normal--0-0-0-0-p-0-iso8859-4
arial.ttf -monotype-Arial-medium-r-normal--0-0-0-0-p-0-iso8859-5


...and so on.  

My question is:  does anyone know of a font that i can use on linux
that will work in place of the windows symbol fonts?  I think FOP
needs a iso8859 entry to work. Also, is there some setting in FOP that
i can use that will change the default unknown character from ?'s to
something else?

Thanks for looking at this.

-dave

Re: Bullets not showing up in SVG

Posted by Dave Austin <da...@gmail.com>.
Thanks Tom for all your help with this.  I am generating FO files from
RTF files with a handy utility called RTF2FO.  Fontunately, one of the
options i can use with this is to set the encoding output.  So, what i
tried to do in the mean time was to change this to ISO-8859-1.

I did do this, and it did output the FO file in that format.  Now, in
the FO file i get the familiar character references that we would
normally see in svg.

For instance, &#8226; is now embedded instead of the previous
character references. However, the resultant SVG from the FO Processor
still does not include those references, just ?'s.


I have a work-around in place for now.  I think i might post this on
the FOP user group, too.  I can also try the your reader suggestion.


On Tue, 18 Jan 2005 08:06:00 -0500, Thomas DeWeese
<Th...@kodak.com> wrote:
> Dave Austin wrote:
> 
> > I'm not sure if this is more of an FOP problem, or if it is Batik.
> 
>    I suspect it's a character encoding problem.
> 
> > I'm posting on this board because I read that FOP uses Batik for
> > conversion to SVG anyway.  The font face is "Symbol" and the text
> > inside is: \342\200\242.   When I run FOP, it always replaces these
> > bullets with ?'s.
> 
>    Looking at the attached document that fails then encoding is:
> 
> <?xml version="1.0" encoding="ISO-8859-1"?>
> 
>    I suspect that the character you are referencing in the fo file
> (which is encoded using UTF-8) doesn't have a mapping to this
> encoding.  I would suspect the windows<->linux difference is
> due to a different default encoding.
> 
>    I would suggest providing a Reader explicitly to the stream call
> and construct the reader with a UTF-8 encoding specification.
> 
> 
> > Obviously what is happening here is the FOP cannot determine the
> > glyph associated with the "Symbol" font and is substituting ?'s.
> 
>    I don't think this is the problem, if this were the problem
> you would probably get bad text layout.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
> 
>

Re: Bullets not showing up in SVG

Posted by Thomas DeWeese <Th...@Kodak.com>.
Dave Austin wrote:

> I'm not sure if this is more of an FOP problem, or if it is Batik.

    I suspect it's a character encoding problem.

> I'm posting on this board because I read that FOP uses Batik for
> conversion to SVG anyway.  The font face is "Symbol" and the text 
> inside is: \342\200\242.   When I run FOP, it always replaces these 
> bullets with ?'s. 

    Looking at the attached document that fails then encoding is:

<?xml version="1.0" encoding="ISO-8859-1"?>

    I suspect that the character you are referencing in the fo file
(which is encoded using UTF-8) doesn't have a mapping to this
encoding.  I would suspect the windows<->linux difference is
due to a different default encoding.

    I would suggest providing a Reader explicitly to the stream call
and construct the reader with a UTF-8 encoding specification.


> Obviously what is happening here is the FOP cannot determine the 
> glyph associated with the "Symbol" font and is substituting ?'s.

    I don't think this is the problem, if this were the problem
you would probably get bad text layout.


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