hi
I create GDR file with EASY GDR CREATER.
I can see text with my font when I run application but I can't change font size in my application.
I want to change my font size by code because I use scalable user interface.
and my another question is:
what means TFontSpec myFontSpec(KMyFontName,1)?
when change 1 to 100 there isn't no changing in my font size;
Well, aren't GDR fonts bitmap fonts that have at most a few fixed point sizes? (Nothing "scalable" about them, regardless of which Symbian API call you use.)
I did not yet work with that "Easy GDR Creator", but from what I saw during a quick Google search was that this tools renders a TTF font to a GDR-format bitmap font with *exactly one* point size. If my understanding is correct, it's clear why the font does not want to scale.
How to create custom font for my application?
i want to use farsi font in my application that it was defined by myself
my application is scalable uI.
Is there anyway that my problem solved?
thankyou again and waiting for your guidance..............
yes, i design a font in ttf format for farsi language. My ttf file is 256 byte and english alphabet was replaced by farsi alphabet
I want in application , Titles and their contents are showen by farsi.
if you want to use a font for your application and want to change size your font, how do this work?
I'm very sorry for my bad english.
Thanks rbrunner.
Maybe we have a big misunderstanding here somewhere. Finding it will maybe bring the solution of the problem.
"ttf" is no font format. ".ttf" is the usual extension for font files in the TrueType font format. If you have a TrueType font, you already have a font that is scalable. You did design a TrueType font, i.e. define your Farsi characters not as pixels, but with the help of lines, arcs, ellipses and so on? If yes, and if you work with a modern Symbian phone (i.e. OS 9/S60 3rd edition or UIQ3), just transfer your scalable TrueType font to your phone, select it in your program, and it's ok. Modern Symbian phones can directly work with TrueType fonts, no need to use a tool like Easy Font Creator then.
But anyway, as far as I know, Farsi is written in Arabic letters plus some additional special letters, and I would think that there must be already a number of TrueType fonts around that support Farsi, and still you design your own font?
Furthermore, your statement "english alphabet replaced by farsi" does not sound too good. In any case that would not be the right way to do it. Symbian is fully Unicode capable, and in Unicode the Farsi alphabet has its own codepoints. If you just replace English letters, e.g. the codepoint 65, you get a *very* non-standard Farsi font that will lead to trouble, I think.
I use ttf file that exist in font folder in windows.i.e Arial. When i run application, I see only under Line, plz see this code and say me what is
wrong?
Forum posts: 1241
Well, aren't GDR fonts bitmap fonts that have at most a few fixed point sizes? (Nothing "scalable" about them, regardless of which Symbian API call you use.)
I did not yet work with that "Easy GDR Creator", but from what I saw during a quick Google search was that this tools renders a TTF font to a GDR-format bitmap font with *exactly one* point size. If my understanding is correct, it's clear why the font does not want to scale.
René Brunner
Forum posts: 52
hi rbrunner
thanks for your guidence
How to create custom font for my application?
i want to use farsi font in my application that it was defined by myself
my application is scalable uI.
Is there anyway that my problem solved?
thankyou again and waiting for your guidance..............
Forum posts: 1241
What do mean with "defined by myself"? Did you design a font yourself? If yes, in which format is the font file right now?
René Brunner
Forum posts: 52
yes, i design a font in ttf format for farsi language. My ttf file is 256 byte and english alphabet was replaced by farsi alphabet
I want in application , Titles and their contents are showen by farsi.
if you want to use a font for your application and want to change size your font, how do this work?
I'm very sorry for my bad english.
Thanks rbrunner.
Forum posts: 1241
Maybe we have a big misunderstanding here somewhere. Finding it will maybe bring the solution of the problem.
"ttf" is no font format. ".ttf" is the usual extension for font files in the TrueType font format. If you have a TrueType font, you already have a font that is scalable. You did design a TrueType font, i.e. define your Farsi characters not as pixels, but with the help of lines, arcs, ellipses and so on? If yes, and if you work with a modern Symbian phone (i.e. OS 9/S60 3rd edition or UIQ3), just transfer your scalable TrueType font to your phone, select it in your program, and it's ok. Modern Symbian phones can directly work with TrueType fonts, no need to use a tool like Easy Font Creator then.
But anyway, as far as I know, Farsi is written in Arabic letters plus some additional special letters, and I would think that there must be already a number of TrueType fonts around that support Farsi, and still you design your own font?
Furthermore, your statement "english alphabet replaced by farsi" does not sound too good. In any case that would not be the right way to do it. Symbian is fully Unicode capable, and in Unicode the Farsi alphabet has its own codepoints. If you just replace English letters, e.g. the codepoint 65, you get a *very* non-standard Farsi font that will lead to trouble, I think.
René Brunner
Forum posts: 52
I use ttf file that exist in font folder in windows.i.e Arial. When i run application, I see only under Line, plz see this code and say me what is
wrong?
_LIT(KMyFontName,"arial");
CFont* myFont;
TFontSpec myFontSpec(KMyFontName,1);
CGraphicsDevice* screenDevice = iCoeEnv->ScreenDevice();
screenDevice->GetNearestFontInTwips(myFont,myFontSpec);
gc.SetPenSize(TSize(5,5));
gc.UseFont(myFont);
gc.SetPenColor(TRgb(0x000000));
_LIT(mt,"a b c d e f g h i j");//generate
gc.DrawText(mt, TPoint(100,100 ) );
gc.DiscardFont();
screenDevice->ReleaseFont(myFont);
thank you very much for your useful information about ttf .I don't know any thing about ttf, that file was gived me.
Forum posts: 52
I understand that what was wrong. i chang my code to this:
TInt fontSize;
TFontSpec myFontSpec(KMyFontName,fintSize);
and also i can show farsi by using unicode and i.e arial font.
Thanls alot .