Jazcash Posted September 13, 2017 Share Posted September 13, 2017 I have a retro-style game with pixel art that I'm scaling up with game.scale.setUserScale(2, 2); And I'm adding some text: game.add.text(100, 100, "Hello world!", {font: "retrofont", fontSize:24}); But the scaling makes the font appear distorted, as you'd expect. Is there a way to render the text crisp or alternatively scale only certain elements of the game up? Currently I'm thinking of creating a second canvas overlaying the main canvas with default scale and rendering the text on that instead, but it feels hacky and could impact performance? Open to better suggestions. Link to comment Share on other sites More sharing options...
samme Posted September 13, 2017 Share Posted September 13, 2017 You can set, e.g., text.resolution = 2; Second canvas isn't a bad idea though. Link to comment Share on other sites More sharing options...
Jazcash Posted September 13, 2017 Author Share Posted September 13, 2017 1 hour ago, samme said: You can set, e.g., text.resolution = 2; Second canvas isn't a bad idea though. Better! But has some weird artifacting compared to the HTML version (left). Link to comment Share on other sites More sharing options...
Jazcash Posted September 13, 2017 Author Share Posted September 13, 2017 Fixed my issue by removing game.scale.setUserScale(2, 2); and just scaling all the elements up individually. Link to comment Share on other sites More sharing options...
Recommended Posts