mirror of https://github.com/axmolengine/axmol.git
Merge pull request #490 from wzhengsen/dev
[fix]The problem of inaccurate maximum width limit when using system fonts.
This commit is contained in:
commit
96e83c9cf6
|
@ -2391,7 +2391,7 @@ FontDefinition Label::_getFontDefinition() const
|
||||||
systemFontDef._fontSize = _systemFontSize;
|
systemFontDef._fontSize = _systemFontSize;
|
||||||
systemFontDef._alignment = _hAlignment;
|
systemFontDef._alignment = _hAlignment;
|
||||||
systemFontDef._vertAlignment = _vAlignment;
|
systemFontDef._vertAlignment = _vAlignment;
|
||||||
systemFontDef._dimensions.width = _labelWidth;
|
systemFontDef._dimensions.width = _labelWidth == 0.f ? _maxLineWidth : _labelWidth;
|
||||||
systemFontDef._dimensions.height = _labelHeight;
|
systemFontDef._dimensions.height = _labelHeight;
|
||||||
systemFontDef._fontFillColor.r = _textColor.r;
|
systemFontDef._fontFillColor.r = _textColor.r;
|
||||||
systemFontDef._fontFillColor.g = _textColor.g;
|
systemFontDef._fontFillColor.g = _textColor.g;
|
||||||
|
|
Loading…
Reference in New Issue