Jump to content

Dynamic Text Size


cruseyd
 Share

Recommended Posts

I'm trying to implement rules text on a CCG style card object. Creating the text is fine, but I'm noticing some really bad pixelation when scaling the text up and down (I have a zoom on mouse over effect on each card to make the rules text easier to read). Is there a clean way to get the effect of a zoom while preventing (too much of) this pixelation?

On a related note, I am wondering if there is a way to define a "text region" that text can be added to (loaded from a json file) and then scale the font size up or down depending on how well it fits in said region. Is there anything like this in Phaser, or would I need to code this myself from scratch?

Link to comment
Share on other sites

For me, I choosed a higher Text size and just scaled it down (0.1)

so you can use values below scale = 1
01. - 1.0

I think this is because the rendered text (scale 1.0) is threatened like a sprite. When scaling it up, it gets blurry too.
By making the text just bigger by default and working with lower scale values, I did not see any pixelation.

Hope that helped :)

Link to comment
Share on other sites

11 hours ago, s4m_ur4i said:

For me, I choosed a higher Text size and just scaled it down (0.1)

so you can use values below scale = 1
01. - 1.0

I think this is because the rendered text (scale 1.0) is threatened like a sprite. When scaling it up, it gets blurry too.
By making the text just bigger by default and working with lower scale values, I did not see any pixelation.

Hope that helped :)

Seems like a reasonable thing to try. I'll give this a shot. Thanks mate!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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