Sign in to follow this  
TheShookOne

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?

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.