I'm trying to create my own font on Symbian and provide my own character string. My code is as follows:
- Code: Select all
1
2
3
4
5
6
7
8
9
10
11
12
13
14menuFont->CreateSurface( GDSURFACE_SYSTEMMEMORY, mbmName, EMbmMenufont );
GDFONTFX fontfx;
fontfx.lTracking = 0;
HRESULT result=0;
_TCHAR fontChars[] = {_T("0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZÁ|£ÉÍ%Ó&:(Ú_Ý>=!?.,'-*abcdefghijklmnopqrstuvwxyzá~[é{í@ó;^<ú`ý+")};
//_TCHAR fontChars[] = {_T(" !\"#$%&'()*+,-./0123456789:;<=>?@ ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~_")};
if ( result = menuFont->CreateFont(fontChars, RGB(255, 0, 255), GDCREATEFONT_TRACKING, &fontfx) != GD_OK ) {
_ASSERT(false);
}14 lines; 2 keywds; 5 nums; 43 ops; 1 strs; 1 coms Syntactic Coloring v0.4 - Dan East
and everytime, the call to CreateFont() fails (for reasons other than those in the docs). if, however, i use the default string (commented out above) it works.
And whats more, it doesn't seem to use the font bmp i provided, it shows characters i haven't defined in the bmp font file. As if it is by passing my font surface and using some default font
This only happens with symbian, when i run it on Win32, everything works wonderfully. Anyone got any hints/ideas?
Thanks in advance!
