Proper font handling API for blocks and entities

Post Reply
gpcf
Member
Posts: 382
Joined: Fri May 27, 2016 10:48
GitHub: gpcf
In-game: gabriel

Proper font handling API for blocks and entities

by gpcf » Post

I'd like to have some proper way for text rendering onto blocks and entities, like the signs_lib does right now but less "hacky". Ideally, it should support internationalization (showing different texts to users speaking different languages) and a variety of non ASCII-Characters, like umlauts. Doing this the way signs_lib does it would require thousands of textures which would be very heavy on server and bandwidth load.

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Proper font handling API for blocks and entities

by sofar » Post

gpcf wrote:I'd like to have some proper way for text rendering onto blocks and entities, like the signs_lib does right now but less "hacky". Ideally, it should support internationalization (showing different texts to users speaking different languages) and a variety of non ASCII-Characters, like umlauts. Doing this the way signs_lib does it would require thousands of textures which would be very heavy on server and bandwidth load.
Several requests for this have been posted before, in github etc.

Signs_lib is a hack that can only make textures on entities, there is no way to render text on a block or a particle, other than compose a texture entirely before hand.

The short term solution is to hope that meta set nodedef will get merged with support for `tiles`. This would allow text to be placed on nodes through a mod.

Having the core render fonts would be problematic as font rendering is very locally dependent on i18n and locale, and some players may end up not seeing the text on nodes, and some would. This is a nightmare scenario that makes me want to suggest that it is best avoided entirely. Having non-ASCII characters is cool, but really complex. It would also mean that the server would have to disperse font assets to each client, for instance. Not a can you want to open if you ask me.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests