Jump to content

PixiJS Text Custom Font


jamiemcl001
 Share

Recommended Posts

Hi all,

 

I was wondering if it was possible to use custom fonts in the PixiJS Text Constructor? I know that it is possible to use BitmapText but when scaling these Bitmap Fonts down I'm getting issues where the text looks quite jagged. This may not be possible but I wanted to check I wasn't doing something stupid before going down the BitmapText route.

 

I've created a Fiddle of this issue (link) - please let me know if you spot anything obvious.

 

Thanks,

Jamie.

 

Quick update: 

 

After looking online - I've noticed that it's predominantly because the fonts haven't successfully loaded before trying to create a Text Element in Pixi. The only way that seems to consistently load the font in time is by using a Font Loader (link to TypeKit). I was wondering if anyone knows of any other workaround that doesn't require another library to be used? As I say, using BitmapText becomes jagged when I need to change the scale.

Edited by jamiemcl001
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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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