xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Austin <dausti...@gmail.com>
Subject Re: Rasterizer Only Displays the Default Java Font
Date Sun, 16 Jan 2005 20:22:18 GMT
<style type="text/css" >


        <![CDATA[

	@font-face {
 	font-family: "Times Roman";
	 src: url("C:\batik\times.ttf");
	}

	text {
	 font-family: "Times Roman";
 	
	}


	
	]]>

Ok, here is what i changed it to, and it is still not getting the
default font.  Is there something wrong with my url reference?  Is it
the right syntax?


On Sun, 16 Jan 2005 21:11:08 +0100, Måns Rullgård <mru@inprovide.com> wrote:
> Dave Austin <daustin78@gmail.com> writes:
> 
> > On Sun, 16 Jan 2005 01:00:09 +0100, Måns Rullgård <mru@inprovide.com> wrote:
> >> Dave <daustin78@gmail.com> 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
> mru@inprovide.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
> 
>

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


Mime
View raw message