Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Is this even possible with the vanilla C2 SpriteFont object? If not, is there a plugin available?
Develop games in your browser. Powerful, performant & highly capable.
I don't believe so, you may need to use two different SpriteFont objects and switch between them.
Hmm, I wonder if this is something that could be modded relatively easily. We're planning on having a number of different pixel fonts and styles, and having so many SpriteFont objects would be less than ideal.
You could probably look inside the runtime.js of the sprite object and see how the "Load image from URL" is handled. Maybe it would be possible to replicate it inside a behavior to mod a SpriteFont object. It's important to inspect how the SpriteFont texture is managed too inside its own runtime.js, so you don't break anything with the behavior.
Silly question... where would I find the runtime.js for the Sprite and SpriteFont objects?
In the installation folder, you'll find the "plugins" runtime and edittime js files under "exporters\html5\plugins\".