×
Namespaces

Variants
Actions
Revision as of 09:34, 26 July 2012 by hamishwillee (Talk | contribs)

Using fonts with Symbian and Maemo Platform

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: ebra (04 Dec 2007)
Last edited: hamishwillee (26 Jul 2012)

Comparison

Comparing S60 and Maemo Platforms

S60 Platform

// Abstract font interface
const CFont* iFont;
 
// EAknLogicalFontPrimaryFont
// EAknLogicalFontSecondaryFont
// EAknLogicalFontTitleFont
 
iFont = AknLayoutUtils::FontFromId(EAknLogicalFontPrimaryFont);
// A graphics device to which a bitmap managed by the font and bitmap server can be drawn
CFbsScreenDevice* iFbsScrDev;
 
// Abstract font interface
CFont* iFont;
 
// Create a font spec in order to retrieve a valid font
// TFontSpec(const TDesC &aTypefaceName, TInt aHeight);
 
_LIT(KFontFamily, "S60 Sans");
TFontSpec fs(KFontFamily, 100);
 
iFbsScrDev->GetNearestFontInTwips((CFont*&)iFont, fs);
CWindowGc& gc = SystemGc();
 
gc.UseFont(iFont);
...
gc.DiscardFont();

Maemo Platform

GdkFont* font = NULL;
 
font = gdk_font_from_description(
pango_font_description_from_string ("Monospace Regular 22"));
60 page views in the last 30 days.
×