I need to use custom fonts for an application which displays nice graphics and merging it with arbitrary content. This content should be produced with a custom (non-system) font.
Has anyone tried that before or is there already any solution available?
This is a complex process, and require UID from symbian to register font in theOS. However then I asked Symbian for UID for font they havn't answered my mail. So I've just loaded bitmaps for my font and blit them into screen from TLex
ok. i got that tool. it works after switching back to an older version of ftntrans. but now the question is how to use the resulting gdr file. I copied it to epoc32\release\winsb\urel\z}system\fonts but my app does not get the font.
Quote
This is a complex process, and require UID from symbian to register font in theOS. However then I asked Symbian for UID for font they havn't answered my mail. So I've just loaded bitmaps for my font and blit them into screen from TLex
the next question would be, what folder to use on the real device. using bitmap fonts is no real choice for. should be international ...
// Set font to GlobalTextEditor iRtEd->SelectAllL(); iRtEd->ApplyCharFormatL(charFormat,charFormatMask); iRtEd->SetCursorPosL(0,0); iRtEd->SetBackgroundColorL(KRgbSymbianOrange); iCoeEnv->ReleaseScreenFont(editorFont); CleanupStack::Pop(); // editorFont
// Change label text.
CleanupStack::Pop(); // fontSpec delete fontSpec; // Delete Font }
- In the function above i set font for a richtext control and it work well.
 
Tue, 2005-02-15 11:13
Anonymous (not verified)
Forum posts: 2018
Anyone using custom fonts?
Does your code work with .TTf font file, or GDR font file. i have arabic font file in ttf format, my application needs to display arabic characters.
Including the TTF font, am i need any other setting to display arabic characters in UIQ emulator. like LAngauge tag in mmp file. or any other unicode setings.
i have stored my arabic unicode values in database, i am able to load it in to variable but not able to display it on the screen.
if u have any code plz send it to me, otherwise give me ur email i will send u the ttf file
Forum posts: 114
http://www.geocities.com/zavorine/epoc/fontutils.htm
(or google for "Symbian font utility bdf")
This is a complex process, and require UID from symbian to register font in theOS. However then I asked Symbian for UID for font they havn't answered my mail. So I've just loaded bitmaps for my font and blit them into screen from TLex
CellaGameS.com
http://www.geocities.com/zavorine/epoc/fontutils.htm
(or google for "Symbian font utility bdf")
ok. i got that tool. it works after switching back to an older version of ftntrans.
but now the question is how to use the resulting gdr file. I copied it to
epoc32\release\winsb\urel\z}system\fonts but my app does not
get the font.
the next question would be, what folder to use on the real device.
using bitmap fonts is no real choice for. should be international ...
any hint?
Forum posts: 114
http://www.mypsion.ru/library.php?aid=253
(in russian)
written that fonts should be copied to C:\System\Fonts\
for emulator it should be epoc32\wins\c\system\Fonts\
CellaGameS.com
Forum posts: 44
But you can try this way:
1- Copy custom font to system folder( for example : arial.ttf)
2-Using this function :
void CRTxContainer::SetFontL(TInt aResourceID)
{
// Create font
TInt FontSize=150;
_LIT(FontName,"arial");
TFontSpec* fontSpec=new TFontSpec(FontName,FontSize);
CleanupStack::PushL(fontSpec);
TCharFormat charFormat;
TCharFormatMask charFormatMask;
CFont* editorFont = iCoeEnv->CreateScreenFontL(*fontSpec);
CleanupStack::PushL(editorFont);
charFormat.iFontSpec = editorFont->FontSpecInTwips();
charFormatMask.SetAttrib(EAttFontTypeface);
charFormatMask.SetAttrib(EAttFontHeight);
// Set font to GlobalTextEditor
iRtEd->SelectAllL();
iRtEd->ApplyCharFormatL(charFormat,charFormatMask);
iRtEd->SetCursorPosL(0,0);
iRtEd->SetBackgroundColorL(KRgbSymbianOrange);
iCoeEnv->ReleaseScreenFont(editorFont);
CleanupStack::Pop(); // editorFont
// Change label text.
CleanupStack::Pop(); // fontSpec
delete fontSpec; // Delete Font
}
- In the function above i set font for a richtext control and it work well.
i have arabic font file in ttf format, my application needs to display arabic characters.
with best regards
khair m soomro
Forum posts: 44
Forum posts: 85
Including the TTF font, am i need any other setting to display arabic characters in UIQ emulator.
like LAngauge tag in mmp file. or any other unicode setings.
i have stored my arabic unicode values in database, i am able to load it in to variable but not able to display it on the screen.
if u have any code plz send it to me, otherwise give me ur email i will send u the ttf file
with best regards
khair m soomro
Forum posts: 44
It need not any configuration at all.
You don't have to set language in mmp file or anything.
Just copy your font into system directory ( for example system\apps\font\ ) then load it from your program using my code.
To display it on the screen you need an unicode edwin ( in my case i used
richtext editor ). Then all you have to do is for example
aRichtex->InsertL(Unicodechar,position);
If you do not have a rich text control, give me your email.
Forum posts: 85
kmsoomro@yahoo.com
if u have sample code plz send it to me, i shall be verythankful to u
with best regards
khair m soomro
Forum posts: 4
companymen@163.com
if u have sample code plz send it to me, i shall be verythankful to u
Forum posts: 9
Plz send me the code too
Lilesh.patel@gmail.com
Thanks ,
Lilesh.