How to use font in Symbian

1. Forget about the stupid “Swiss”.

As you may have already read the section “How to select a font” in Symbian SDK documents, the follow example code snippet show us the way of selecting a font.

// Get an alternative font
CFont* myFont;
TFontSpec myFontSpec(KMyFontName,1); // to get smallest Swiss font
CGraphicsDevice* screenDevice=iCoeEnv->ScreenDevice();

Before getting closer to the font mechanism and typeface design of Symbian, some guys have tried the code in their application and things work well. That’s why I saw this typeface name “Swiss” appear even in many commercial applications. In fact, there is no typeface named “Swiss” built-in with S60 phones, so what you get from the code above is the most closely approximate font, but may not the font really suitable. For instance, “Swiss” will make your application not compatible with East-Asian phones. To grab a better view of “How to select a font”, just read on.
继续阅读How to use font in Symbian