Languages

Menu
Sites
Language
Label SetFont not working?

hello i want to add custom font on my label text. 

 

Label *pLbl1 = new Label();

pLbl1->Construct(Rectangle(300, 20, 120, 100), L"Text");

Font* pFont = new Font;

String path = App::GetInstance()->GetAppRootPath()

+ L"res/AxisStd-Light.otf";

pFont->Construct(path, FONT_STYLE_BOLD, 35);

pLbl1->SetFont(path);

 

 

Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

1 Replies
wil smith
You are passing wrong value to SetFont() method in pLbl1->SetFont(path); Refer the Cotrol::SetFont() API reference for details.