Skip to content
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

Merged
merged 2 commits into from
Sep 7, 2012
Merged

Supported display Unicode chars. #1280

merged 2 commits into from
Sep 7, 2012

Conversation

Yodesoft
Copy link
Contributor

@Yodesoft Yodesoft commented Sep 3, 2012

No description provided.

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

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?

Copy link
Contributor Author

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/";
Copy link
Contributor

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?

@Yodesoft
Copy link
Contributor Author

Yodesoft commented Sep 4, 2012

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.

lamerman pushed a commit to Game-Insight/cocos2d-x that referenced this pull request Sep 6, 2012
…ectly.

We should invoke 'this->setString(m_sString_initial.c_str(), true);' in the 'CCLabelBMFont::updateLabel'.
lamerman pushed a commit to Game-Insight/cocos2d-x that referenced this pull request Sep 6, 2012
lamerman pushed a commit to Game-Insight/cocos2d-x that referenced this pull request Sep 6, 2012
fixed cocos2d#1280: BitmapFontMultiLineAlignment test can't work correctly.
minggo added a commit that referenced this pull request Sep 7, 2012
Supported display Unicode chars.
@minggo minggo merged commit e0fc966 into cocos2d:gles20 Sep 7, 2012
angeltown pushed a commit to angeltown/cocos2d-x that referenced this pull request Apr 28, 2014
…ectly.

We should invoke 'this->setString(m_sString_initial.c_str(), true);' in the 'CCLabelBMFont::updateLabel'.
angeltown pushed a commit to angeltown/cocos2d-x that referenced this pull request Apr 28, 2014
angeltown pushed a commit to angeltown/cocos2d-x that referenced this pull request Apr 28, 2014
fixed cocos2d#1280: BitmapFontMultiLineAlignment test can't work correctly.
angeltown pushed a commit to angeltown/cocos2d-x that referenced this pull request Apr 28, 2014
Supported display Unicode chars.
angeltown pushed a commit to angeltown/cocos2d-x that referenced this pull request Apr 29, 2014
…ectly.

We should invoke 'this->setString(m_sString_initial.c_str(), true);' in the 'CCLabelBMFont::updateLabel'.
angeltown pushed a commit to angeltown/cocos2d-x that referenced this pull request Apr 29, 2014
angeltown pushed a commit to angeltown/cocos2d-x that referenced this pull request Apr 29, 2014
fixed cocos2d#1280: BitmapFontMultiLineAlignment test can't work correctly.
angeltown pushed a commit to angeltown/cocos2d-x that referenced this pull request Apr 29, 2014
Supported display Unicode chars.
dumganhar pushed a commit that referenced this pull request May 4, 2014
We should invoke 'this->setString(m_sString_initial.c_str(), true);' in the 'CCLabelBMFont::updateLabel'.
dumganhar pushed a commit that referenced this pull request May 4, 2014
dumganhar pushed a commit that referenced this pull request May 4, 2014
fixed #1280: BitmapFontMultiLineAlignment test can't work correctly.
minggo added a commit that referenced this pull request May 4, 2014
Supported display Unicode chars.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants