Page 1 of 1

Font size at run time

Posted: Fri May 13, 2005 12:33
by ritz
Hello All,

I am facing the following issue in using the fonts.

I have loaded default font "arial" in my widget. by default size is 12.

I want to change it's size to 10 at run time.

I am not able to find any method for this.

The only way i could get is use createFont method again to create a different font.

But i need the ttf file name for using this method, which i will not get from my font object.

Can any body suggest me some other method for changing font sizes on run time.

Thanks and Regards,
Ritu

Re: Font size at run time

Posted: Sat May 14, 2005 23:59
by _mental_
The best thing to do is to create an arial-12.font file and have something in there like this:

<?xml version="1.0" ?>
<Font Name="Arial-12" Filename="arial.ttf" Type="Dynamic" Size="12" NativeHorzRes="800" NativeVertRes="600" AutoScaled="true"/>

You can then load the new XML font definition as normal.