Hi Thomas,

"Thomas Pifre" <[EMAIL PROTECTED]> wrote on 05/27/2008 11:20:07 AM:

> On my local MS Windows XP it transforms nicely the SVG into JPG.
> However on my SUSE Linux 9 SP3 machine I'm getting squares instead 
> of chinese characters. So I guess it has something to do with the 
> fonts installed on this server.

   Correct, getting squares means Batik couldn't find a font
to provide the glyph for a particular code point.

> *transform my MS Windows TTF (SimSun) into SVG using batik-ttf2svg.
> jar then call it from my SVG using <font-face /> this didn't work

   This is not ideal as you lose some potentially nice things like
font hinting (although very few Chinese fonts are hinted).  Also it
is worth noting that I think you need to provide some command line 
args so that it generates the Chinese glyphs.

> *call my TTF from a <font-face> this didn't work
> <defs>
>     <style type="text/css">
>         <![CDATA[
>           @font-face {
>             font-family: 'SimSunLocal';
>             src: url("font/simsun.ttf") format(svg)
>           }
>         ]]>
>     </style>
> </defs>

    This looks fairly good, but I would drop the 
quotes from the url, and remember that the url is 
relative to the document (so if the document doesn't
have a base url because it's constructed in memory
you need to use an absolute url).  Also I would
drop the 'format(svg)' (especially since in this case 
the format is clearly True Type and not SVG).

> What could be wrong?

   My guess is that the font-face src url isn't
pointing to the font file.

Reply via email to