Dave Austin <[EMAIL PROTECTED]> writes:

> On Sun, 16 Jan 2005 01:00:09 +0100, Måns Rullgård <[EMAIL PROTECTED]> wrote:
>> Dave <[EMAIL PROTECTED]> writes:
>> 
>> > Good Evening,
>> >      I posted on this board a couple of days ago with a problem with
>> > fonts on linux.  I didn't realize till today but when I use Batik to
>> > convert svg to a jpg, it seems like it only uses one font. I tried a
>> > couple of fonts in the text tags, but it always uses the java default
>> > font. Has anyone ever seen this behavior before, or does anyone know
>> > how to fix this?
>> 
>> Try some CSS:
>> 
>> @font-face {
>>  font-family: "Baekmuk Dotum";
>>  src: url("dotum.ttf");
>> }
>> 
>> text {
>>  font-family: "Baekmuk Dotum";
>>  font-size: 14px;
>>  font-weight: bold;
>> }
>
> ok, i couldn't get the style to import the ttf file manually.  is
> there some other trick i should know about? Here is a part of the svg
> document:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <svg contentScriptType="text/ecmascript" width="612.0"
>      xmlns:xlink="http://www.w3.org/1999/xlink"; zoomAndPan="magnify"
>      contentStyleType="text/css" height="2376.0"
>      preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg";
>      version="1.0">
> <defs>
> <style>

Shouldn't there be a type="text/css" attribute here?

>
>         <![CDATA[
>
>       @font-face {
>       font-family: "Times Roman";
>        src: url("C:\batik\times.ttf");
>       }       
>       ]]>
>
> </style>
>
> </defs>
>
>     <g enable-background="new" id="Page-1"
> style="font-family:sanserif;font-size:12"
>        transform="translate(0,0.0)">
>         <rect width="612.0" x="0.0" height="792.0" y="0.0"
>               style="fill:none;stroke:black"/>
>         <text x="264.662" y="67.849976"
>              style="font-family:Times Roman;font-size:11.0;font-weight:bold">
>             Test
>         </text>
>         <text x="314.947" y="67.849976"
>              style="font-family:Times Roman;font-size:11.0;font-weight:bold">
>             test 1
>         </text>

I'd suspect the two-word font name could cause trouble.  I'm not sure
of the quoting rules within attribute values, so I'd use CSS to set
the font family.

-- 
Måns Rullgård
[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to