mirror of https://github.com/axmolengine/axmol.git
Merge pull request #14656 from zilongshanren/v3.10
fix bmfont size initialize error
This commit is contained in:
commit
b87e638f26
|
@ -591,9 +591,7 @@ bool Label::setBMFontFilePath(const std::string& bmfontFilePath, const Vec2& ima
|
||||||
FontFNT *bmFont = (FontFNT*)newAtlas->getFont();
|
FontFNT *bmFont = (FontFNT*)newAtlas->getFont();
|
||||||
if (bmFont) {
|
if (bmFont) {
|
||||||
float originalFontSize = bmFont->getOriginalFontSize();
|
float originalFontSize = bmFont->getOriginalFontSize();
|
||||||
if(fabs(_bmFontSize+1) < FLT_EPSILON){
|
_bmFontSize = originalFontSize / CC_CONTENT_SCALE_FACTOR();
|
||||||
_bmFontSize = originalFontSize / CC_CONTENT_SCALE_FACTOR();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue