mirror of https://github.com/axmolengine/axmol.git
fix UIText's fontSize
if set fontsize before setting font family, fontsize was wrong
This commit is contained in:
parent
0443018181
commit
11dcf1e1dd
|
@ -147,6 +147,7 @@ void Text::setFontName(const std::string& name)
|
||||||
{
|
{
|
||||||
TTFConfig config = _labelRenderer->getTTFConfig();
|
TTFConfig config = _labelRenderer->getTTFConfig();
|
||||||
config.fontFilePath = name;
|
config.fontFilePath = name;
|
||||||
|
config.fontSize = _fontSize;
|
||||||
_labelRenderer->setTTFConfig(config);
|
_labelRenderer->setTTFConfig(config);
|
||||||
_type = Type::TTF;
|
_type = Type::TTF;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue