Page 1 of 1

flying-text: ability to change font

Posted: Mon Oct 03, 2016 1:49 am
by aubergine18
It seems there's no way to change font of flying-text - could this ability be added? (either in prototype or, preferably, when creating the entity)

Also, it seems that flying-text doesn't support `a` alpha channel in the `.color` property.

Re: flying-text: ability to change font

Posted: Sun Oct 16, 2016 8:43 pm
by aubergine18
bump

Re: flying-text: ability to change font

Posted: Sun Oct 16, 2016 10:38 pm
by Rseding91
The flying-text entity its self doesn't support setting a custom font. It uses the font that the main game uses.

Re: flying-text: ability to change font

Posted: Sun Oct 16, 2016 11:01 pm
by aubergine18
Would there be any possibility to extend it to allow setting the font? It would be extremely useful as then sprite fonts could be used, facilitating easy runtime coloration, etc.

The only other viable alternatives I'm aware of are either `stickers` (not investigated those yet) or simple entities, both of which I'd have to update on-tick = slooow and crufty. I want to avoid having lots of entity definitions just for different sprites to manually float from the player. A glyph font applied to flying-text would be a very clean solution, at least from a modder perspective.

I appreciate that fonts are defined in locale files, and so we're back in to that whole nightmare again, but then again, the default font is also defined in locale files, so...

Re: flying-text: ability to change font

Posted: Fri Jan 04, 2019 6:16 pm
by Bilka
If you render text using the script rendered which I implemented for 0.17: https://lua-api.factorio.com/0.17.0-pre ... ering.html, you can dynamically change the font of the text. Since fonts are simply defined as prototypes (https://wiki.factorio.com/Prototype/Font) you can easily use your own custom font for the text. So I consider this implemented :)