private void updateTexture()
{
CCTexture2D tex;
// Dump the old one
if (Texture != null)
{
Texture.Dispose();
}
// let system compute label's width or height when its value is 0
// refer to cocos2d-x issue #1430
tex = new CCTexture2D();
var result = tex.InitWithString(m_pString,
m_tDimensions.PointsToPixels(),
m_hAlignment,
m_vAlignment,
m_pFontName,
m_fFontSize * CCMacros.CCContentScaleFactor());
(last one line)
If I have for example CCLabelTFF with font size 50 (and arial-50.spritefont (or xnb) for this label) and I have CCContentScaleFactor = 2.22f, then
m_fFontSize * CCMacros.CCContentScaleFactor() = 111,
then I need arial-111.spritefont. But this is not good. I think it should work by the other way.
I think there is a bug in the CCLabelTTF class:
https://github.com/Cocos2DXNA/cocos2d-xna/blob/master/cocos2d/label_nodes/CCLabelTTF.cs#L245
(last one line)
If I have for example CCLabelTFF with font size 50 (and arial-50.spritefont (or xnb) for this label) and I have CCContentScaleFactor = 2.22f, then m_fFontSize * CCMacros.CCContentScaleFactor() = 111, then I need arial-111.spritefont. But this is not good. I think it should work by the other way.