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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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