When I use cc.LabelTTF my text is aligned differently in Firefox and Chrome. I’m explicitly adding the cc.TEXT_ALIGN_CENTER and cc.VERTICAL_TEXT_ALIGNMENT_CENTER options in the code as well.
Can I add a css fix of some sort to ensure that the text is aligned the same way?
I found out that cocos2d-html5 uses a div to find out the height of a label. See cocos2d-html5/CCLabelTTF.js at develop · cocos2d/cocos2d-html5 · GitHub
But here the fontFamily is always set to Arial. To be honest, I don’t know if this is the right place.
There must be a solution… With the release of firefox quantum the usage of firefox will rise.
Chrome Screenshot:
Firefox Screenshot:
We used cocos studio (yeah, our game is some years old) to design the ui. But this shouldn’t matter. The Font also looks a bit bigger in chrome. Firefox looks kinda bad rendered.
I also used the font directly in firefox. When the line-height is set to 100% there is no extra space between the lines (like it should be). When the line-height is set to ‘normal’ there is space. Maybe this is the reason for the bigger space between the lines rendered in webgl?
I have created games using cocos JS. I have tried with Version 3.9, 3.12,3.13 version.
This issue is happening after updating chrome browser Version 71.
I have tested with Chrome Version 70, It’s working fine.