This happens only with Firefox : texts in all buttons of my game are not centered vertically, they are a little bit too high. The bigger the font is, the more they are not centered. This happens only if I set a custom font, whatever the font is.
I made a little code snippet to demonstrate :
var TestLayer = cc.Layer.extend({
ctor: function () {
this._super();
var button = new ccui.Button();
button.setTitleText("CLICK");
button.setTitleFontSize(36);
button.setTitleFontName("Cocogoose");
button.loadTextureNormal("res/images/button_green_normal.png");
button.x = cc.winSize.width / 2;
button.y = cc.winSize.height / 2;
this.addChild(button);
}
});
var TestScene = cc.Scene.extend({
ctor:function () {
this._super();
},
onEnter:function () {
this._super();
var test_layer = new TestLayer();
this.addChild(test_layer);
}
});
I tested with cocos-2d v3.10 and the upcoming v3.11. Same result.
And here what the button looks like in different browsers:
This looks like a bug, but I am not sure where should I fill an issue: on the cocos2d-x repo or on the cocos2d-html5 repo ?
Anyone else having this issue ?
