CFont , TTypefaceSupport , font height question...

Login to reply to this topic.
Fri, 2005-12-23 23:26
Joined: 2003-11-28
Forum posts: 35
Hello,

I want to create a small example application to see all the fonts available on the phone and EMULATOR. I can display the number of heights and the font name but I'm not sure if I compute the font heights correctly. For example I have:

TTypefaceSupport myTypefaceSupport;
iCoeEnv->ScreenDevice()->TypefaceSupport (myTypefaceSupport,iCurrentFont);

and myTypefaceSupport.iNumHeights is 24

How do I know what are 24 heights of the current font ?

in the sdk I foud the following at the TTypefaceSupport:


Quote:
a typeface is scaleable if it supports heights at fixed intervals between the minimum and maximum heights. 



I also know the minimum and maximum height, so can I compute the fixed interval like this ?

TReal indent = (myTypefaceSupport.iMaxHeightInTwips - myTypefaceSupport.iMinHeightInTwips)/myTypefaceSupport.iNumHeights;
TReal result;

Math::Round(result,indent,0);


Or how to display all the sizes available ?

thanks.
  • Login to reply to this topic.