Help me please ! Font size doesn't change ! Thanks very much !

Login to reply to this topic.
Thu, 2005-09-15 03:53
Joined: 2005-06-21
Forum posts: 107
Hi all !
I have specified font size = 50 but the text on screen doesn't biger . Please help me ! Thanks very much !

------------------------------------- My code to output text ------------------------------------------           
           // Get smallest possible arial font
            _LIT(KMyFontName,"Roman");
            CFont* myFont;
            TFontSpec myFontSpec(KMyFontName,50);    // font size = 50
            CGraphicsDevice* screenDevice = iCoeEnv->ScreenDevice();
            screenDevice->GetNearestFontInTwips(myFont,myFontSpec);
            // Use new font
            gc.UseFont(myFont);
            gc.SetPenColor( 0xC8B834 );
            // Draw some text
            _LIT(KMyText,"My text");
            gc.DrawText(KMyText, TPoint(45, 115) );
            // Discard and release the font
            gc.DiscardFont();
            screenDevice->ReleaseFont(myFont);
-------------------------------------------------------- doctinh113114 ! Please help me ! Thanks very much ! ---------------------

Thu, 2005-09-15 09:04
Joined: 2004-02-09
Forum posts: 11
Re: Help me please ! Font size doesn't change ! Thanks very much
It's happen because there are no default fonts with this size. If function GetNearestFontInTwips not found specified font, it return first Smiley You can enumirate all fonts and its parameters and then select needed.
Thu, 2005-09-15 09:13
Joined: 2004-02-09
Forum posts: 11
Re: Help me please ! Font size doesn't change ! Thanks very much
There are some defaults fonts (name, height in twips):
Alpi12, 143
Albi12, 143
Alp13, 155
Alpi13, 155
Albi13, 155
alp17, 203
Alb17b, 203
albi17b, 203
alpi17, 203
Aco13, 107
Aco21, 250
Acalc21, 250
LatinBold12, 143
LatinBold13, 155
LatinBold17, 203
LatinBold19, 226
LatinPlain12, 143
Acb14, 167
Acb30, 357
Acp5, 60
Fri, 2005-09-16 08:49
Joined: 2005-06-21
Forum posts: 107
Re: Help me please ! Font size doesn't change ! Thanks very much
Thanks very much !
Tue, 2005-12-06 10:59
Joined: 2005-12-06
Forum posts: 2
Re: Help me please ! Font size doesn't change ! Thanks very much
some of the fonts are not working like Acb14, Acb30, Acp5. Will u plz tell me the solution, I am using series 60
Tue, 2005-12-06 11:04
NewLC AdministratorSymbian AccreditedForum Nokia Champion
Joined: 2003-01-14
Forum posts: 2006
Re: Help me please ! Font size doesn't change ! Thanks very much
Which solution ? What is your problem ? What is not working ?

Some fonts are very limited character set and may display nothing. Check our Fontviewer application if you need more info about each font

Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant

Tue, 2005-12-06 13:36
Joined: 2005-12-06
Forum posts: 2
Re: Help me please ! Font size doesn't change ! Thanks very much
When I set the following fonts
Acb14, Acb30, Acp5
It shows no text but many of the other fonts shows the text
  • Login to reply to this topic.