Set the font size when drawing on Series 60 3rd

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.