Jump to content

Problem with text (pixi)


Recommended Posts

I created a text, I used a custom font with font-face

        @font-face {
            font-family: "blopF";
            src: url('assets/font/blop.ttf') format("truetype"),
                url('assets/font/blop.woff') format('woff'),
                url('assets/font/blop.eot') format('embedded-opentype');

this.tempo = game.add.text(game.world.centerX,game.world.centerY,game.global.tempo,{fill:'#000',font:'150px blopF'});
this.tempo.alpha = 0.2;
this.tempo.anchor.x = 0.5;
this.tempo.anchor.y = 0.5;



this.tempo.text = game.global.tempo;





The problem is that the text is cut (show image)

I would like to solve this problem, I tried to do:
this.tempo.text = "" + game.global.tempo + ""; But the font does not work




Link to comment
Share on other sites

i3D, more info is needed for anyone to try and help:


- version of phaser, which file variant you use

- version of browser/OS

- post the font file


I've had problems with font shadows getting chopped in the same way, to get around it I used wordWrap = true and set a suitable value for wordWrapWidth.

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...