We usually use normalfont (), annotationfont (), titlefont () and other fonts provided by ceikonenv when drawing text. In some cases, we need to adjust the font size.CodeDemonstrate how to set the font size:
Void ceditorlist3col: Draw (const trect & arect) const
{
Cwindowgc & GC = systemgc ();
GC. Clear (arect );
Cfont * font = NULL;
// Obtain the font information
Tfontspec fontspec = ieikonenv-> legendfont ()-> fontspecintwips ();
Fontspec. iheight-= fontspec. iheight/6; // change the font size
Icoeenv-> screendevice ()-> getnearestfontintwips (font, fontspec); // obtain the appropriate font Based on the set font information
GC. usefont (font );
// Draw text operation
..................................
GC. discardfont ();
Icoeenv-> screendevice ()-> releasefont (font); // remember to call releasefont () to release font resources.
}
Note:
Because the font formats used on series60 3rd and 2nd may be different, the above Code may have no effect on series60 2nd.