Jump to content

Can Pixi create pixel perfect text in a scaled container?


Recommended Posts

Hi all


I was wondering if Pixi has a method for creating the appropriate sized text when within a scaled container.

In my case, I scale the main container so that its height is 1080.

In this container, I would create a Pixi.Text object with height 20px.

From what I understand, this creates a 20px text object, which is then scaled down when placed in the container.

This results in text which is slightly blurry.

I'm planning on creating a method which would calculate the true pixel height required, which would then be scaled to the size needed.

Is this something which Pixi itself supports, or would I need to build this myself?

Link to comment
Share on other sites

Yeah it shouldn't be something difficult to do. I did search through the js file to see if Pixi can already do this, but it doesn't seem to be the case. Wanted to make sure I wasn't missing anything.

I did do a search for text scaling, but it seemed to be people wondering about linear or bicubic scaling.

Couldn't find questions about building text in the perfect resolution in the first place.

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