Closed nantas closed 9 years ago
表现:设定了anchor位置为MidCenter,但实际表现的anchor在Y轴上偏离了中心点。
经过调查,BitmapFont的asset属性里包括line height和size两个,计算anchor位置时应该使用line height才能准确得到最后显示中心点的位置。
我发现bitmapfont的高度是将字符放在baseline进行计算的,已经在获取字符那边把baseline的偏移计算进去。
不知道还有没有这个bug,先不管了
表现:设定了anchor位置为MidCenter,但实际表现的anchor在Y轴上偏离了中心点。
经过调查,BitmapFont的asset属性里包括line height和size两个,计算anchor位置时应该使用line height才能准确得到最后显示中心点的位置。