MichaelD Posted January 4, 2015 Share Posted January 4, 2015 Hello, I'm having trouble with a webfont, it appears to be cropped on the bottom mostly the "p"s. Also the Phaser example seems to have that problem: http://examples.phaser.io/_site/view_full.html?d=text&f=google+webfonts.js&t=google%20webfonts Is there a work around that? here's my codegame.add.text(0, 0, "test text with power", { font: '38px FontdinerSwanky', fill: '#f1f1f1', fontWeight: 'bold', align: 'center', stroke: '#1e1e1e', strokeThickness: 3 });Thanks for your help! Here is a screenshot Link to comment Share on other sites More sharing options...
MichaelD Posted January 5, 2015 Author Share Posted January 5, 2015 Any ideas from anyone, is this a common issue? I have also tried to place the text inside a group with fixed dimentions but that did not help either. Link to comment Share on other sites More sharing options...
Gregory Posted January 5, 2015 Share Posted January 5, 2015 I also experienced the same thing and I did not find a work around. Link to comment Share on other sites More sharing options...
MichaelD Posted January 5, 2015 Author Share Posted January 5, 2015 Finaly I had to convert all my fonts as bitmap fonts and use that. It really is a strange issue and a quite important one. I'll post an issue at github also. Edit The issue can be found here: https://github.com/photonstorm/phaser/issues/1518 Link to comment Share on other sites More sharing options...
hyude Posted January 17, 2015 Share Posted January 17, 2015 So, is there any solution for this which doesn't change the font into BitmapFonts? I also encounter this bug, and search for a quick fix. Link to comment Share on other sites More sharing options...
MichaelD Posted January 17, 2015 Author Share Posted January 17, 2015 I didn't find any solution yet. I believe this is a Pixi issue as well. I converted my fonts to bitmap using http://kvazars.com/littera/ Link to comment Share on other sites More sharing options...
Eraph Posted July 28, 2015 Share Posted July 28, 2015 I stumbled upon this post looking for a solution to another problem I'm having with webfonts, but if this is still relevant, have you tried setting padding? http://phaser.io/examples/v2/text/text-padding Link to comment Share on other sites More sharing options...
ZackNVISIA Posted May 16, 2018 Share Posted May 16, 2018 On 7/28/2015 at 12:16 AM, Eraph said: I stumbled upon this post looking for a solution to another problem I'm having with webfonts, but if this is still relevant, have you tried setting padding? http://phaser.io/examples/v2/text/text-padding The seemingly useful line 45 ``` text.padding.set(10, 16); ``` Doesn't actually do anything. Link to comment Share on other sites More sharing options...
Recommended Posts