exdev / ex2d-dev

2D framework and pipeline for Unity3D
ex-dev.com/ex2d
GNU General Public License v3.0
6 stars 3 forks source link

BitmapFont在计算anchor位置时出现偏差 #72

Closed nantas closed 9 years ago

nantas commented 10 years ago

表现:设定了anchor位置为MidCenter,但实际表现的anchor在Y轴上偏离了中心点。

经过调查,BitmapFont的asset属性里包括line height和size两个,计算anchor位置时应该使用line height才能准确得到最后显示中心点的位置。

jareguo commented 10 years ago

我发现bitmapfont的高度是将字符放在baseline进行计算的,已经在获取字符那边把baseline的偏移计算进去。

jareguo commented 9 years ago

不知道还有没有这个bug,先不管了