Hey guys! I'm making GUI using hierarchy:
1. 9patch background - parent;
2. Text with icon - child with transform X,Y;
Then I just position the parent according to the screen size. This works great everywhere (I mean web HTML5 export) except on God damn iOS... Look at that shift:
Any ideas on how to avoid this?
It's a known problem, and not only on iOS. All devices render texts differently.
Try another vertical alignment setting. Make sure the text is using the font that is included in the project. If it doesn't help, replace it with a sprite font.
Develop games in your browser. Powerful, performant & highly capable.
Try another vertical alignment setting
Hey dop2000, thanks for the idea, I'll try to change my center/center to something else, didn't think about that :)
sprite font.
Yeah... think I'll go with it at the end.
I had to switch to a sprite font for the same reason.
Apparently this comes down to a problem with the HTML specification. I reported it in 2021, and still waiting on a resolution...
Thank you, all guys, now it's clearer. Unfortunately, we'll have to use Sprite Font, despite the lack of some nice features.
I don't think this means you always need to use a Sprite Font - IIRC the issue only affected certain vertical alignments. If you use "top" alignment it should be consistent across browsers.
If you use "top" alignment
Thanks Ash, I'll definitely try 'top alignment' and will back here (hope to mark it as solved) :)