语言

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);

 

 

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

响应

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