语言

Menu
Sites
Language
Using Custom fonts

 

 

 

编辑者为: Brock Boland 17 3月, 2014 原因: Paragraph tags added automatically from tizen_format_fix module.

响应

3 回复
muditha murthy
If you want to use your own custom font while drawing some text in your application then you can store the ttf file in the resource folder and construct the custom font and use Canvas->DrawText() API
Arnaud Guyon
I didn't manage to use a custom font in my project. I tried to put the .ttf in res, res/fonts, or some screen density folders, the font->Construct always returns E_FILE_NOT_FOUND. Font * font = new Font(); result r = font->Construct(L"fonts/roboto.ttf", FONT_STYLE_PLAIN, 20); can someone help ? thank you.
put your fonts inside /data/fonts/ folder String path = App::GetInstance()->GetAppDataPath() +"/fonts/arial.tff";