Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

10 years ago by Donzo

Hi.

Dom, you mention in your latest blog post the following:

"Among other Canvas2D fixes, the Canvas2D font rendering has been overhauled and now allows you to smoothly scale fonts without pixelating."


I am trying to put some larger fonts into Ejecta
and am running into image size issues.

What are the current best practices for using
fonts of ImpactJS games in Ejecta?

How can I smoothly scale fonts without pixelating?

10 years ago by dominic

Impact's ig.Font is meant for unscaled fonts. Scaling images up will always results in blur or pixelation.

If you want to scale your text up, it's probably easier to use the canvas font drawing functions directly. These functions draw vector fonts that can be scaled without pixelation. These canvas font functions are also what's been overhauled in Ejecta.

So, try this:
ig.system.fillStyle = '#f0f';
ig.system.context.fillText( 'some text', x, y );

10 years ago by Donzo

Thanks Dom,
that is very helpful.
Page 1 of 1
« first « previous next › last »