-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Supported display Unicode chars. #1280
Conversation
iError = FT_New_Face( library, pFontName, 0, &face ); | ||
//iError = FT_New_Face( library, pFontName, 0, &face ); | ||
//TODO: Create font name array??? | ||
iError = FT_New_Face( library, "/usr/share/fonts/truetype/wqy/wqy-microhei.ttc", 0, &face ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why should use hard code of .ttc file path here ?
Will using 'pFontName' cause some issues?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In normal usage , pFontName is family name, but Freetype need a full path of font to pass to FT_New_Face. So we need a function to handle font info, e.g. get full path by family name or style stuff...
}; | ||
|
||
const int fontTableItems = 4; | ||
const char* fontPath = "/usr/share/fonts/truetype/"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will happen if "usr/share/fonts/truetype/" doesn't exist?
if not any font exists, getBitmap will return FALSE. /usr/share/fonts/truetype/ is a common path in Linux distribution for truetype font. If you want to add more special font, add to fontTable or improve it to support more path. |
…ectly. We should invoke 'this->setString(m_sString_initial.c_str(), true);' in the 'CCLabelBMFont::updateLabel'.
fixed cocos2d#1280: BitmapFontMultiLineAlignment test can't work correctly.
Supported display Unicode chars.
…ectly. We should invoke 'this->setString(m_sString_initial.c_str(), true);' in the 'CCLabelBMFont::updateLabel'.
fixed cocos2d#1280: BitmapFontMultiLineAlignment test can't work correctly.
Supported display Unicode chars.
…ectly. We should invoke 'this->setString(m_sString_initial.c_str(), true);' in the 'CCLabelBMFont::updateLabel'.
fixed cocos2d#1280: BitmapFontMultiLineAlignment test can't work correctly.
Supported display Unicode chars.
We should invoke 'this->setString(m_sString_initial.c_str(), true);' in the 'CCLabelBMFont::updateLabel'.
fixed #1280: BitmapFontMultiLineAlignment test can't work correctly.
Supported display Unicode chars.
No description provided.