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:[EMAIL PROTECTED]
Sent: Thursday, 15 September 2005 10:47 AM
To: [email protected]
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: [EMAIL PROTECTED]
> For additional commands, e-mail:
[EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]