tapouillo / BMGlyphLabel

BMGlyphLabel and BMGlyphFont class for iOS7 Sprite Kit
MIT License
31 stars 8 forks source link

Fixed vertical and horizontal misalignment on iPhone 6 Plus #11

Closed niknovak closed 8 years ago

niknovak commented 8 years ago

nativeScale property caused letters to be both vertical and horizontal misaligned on iPhone 6 Plus. I can see this is already fixed in BMGlyphFont class.

tapouillo commented 8 years ago

sorry for delay.

I'm not sure about that, the code you wish to remove is there to fix a bug for the iphone6 plus (It was acting differently in the simulator and on a real device).

is it possible for you to double check that if you have a real iphone6 plus please ?

niknovak commented 8 years ago

I tested on real iPhone 6 Plus and experienced different behaviour than on simulator. Label was perfectly aligned on simulator while on real iPhone 6 Plus was misaligned both vertically and horizontally. After testing I found out the following: [UIScreen mainScreen].scale returns 3.0 on both Simulator and real iPhone 6 Plus [UIScreen mainScreen].nativeScale returns 3.0 on Simulator and 2.6 on real device

iPhone 6 Plus resolution in points (logical) is 414 x 736 which multiplied by 3 is 1224 x 2208. Altogether is then downscaled to 1080 x 1920 (2.6 factor) to accommodate the screen but we should be working with factor 3 to get expected results, otherwise we are getting something downscaled twice, freely speaking.

If something is still unclear, please let me know.