xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chopra, Manish" <Manish.Cho...@AirservicesAustralia.com>
Subject RE: 'Font-Family' problem
Date Thu, 15 Sep 2005 01:07:09 GMT
Thanks

I was creating the font wrongly.
I was using 
	HashMap map = new HashMap();  
      map.put(TextAttribute.FAMILY, "Times");
      Font font = new Font(map);

Instead of 

	HashMap map = new HashMap();  
      map.put(TextAttribute.FAMILY, "Times New Roman");
      Font font = new Font(map); 

Thanks for quick response :-)

Manish

-----Original Message-----
From: Thomas DeWeese [mailto:Thomas.DeWeese@Kodak.com] 
Sent: Thursday, 15 September 2005 10:47 AM
To: batik-users@xmlgraphics.apache.org
Subject: Re: 'Font-Family' problem

Hi Manish,

Chopra, Manish wrote:
> I am drawing text using following font.
> 
> Font:java.awt.Font[family=dialog,name=Times,style=bolditalic,size=12]
> 
> My font is gettign replaced with following
> 
> <g font-family="'dialog'">

    What do you mean 'replaced'?  The family name from above
is also 'dialog', so it looks right to me:

 > Font:java.awt.Font[family=dialog,name=Times,style=bolditalic,size=12]
                      ^^^^^^^^^^^^^

    IIRC 'dialog' is one of the allowed
psudo CSS font-families so there shouldn't be a problem
with this.

    If you really want something like 'Times' then you
should construct the font with that name.


>       <text stroke="none" x="2" xml:space="preserve"
> y="12.0645">Normal</text>
>     </g>
> 
> Do I need to set some font config etc.
> Please help
> 
> Manish
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail:
batik-users-help@xmlgraphics.apache.org
> 


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



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


Mime
View raw message