amethyst / bracket-lib

The Roguelike Toolkit (RLTK), implemented for Rust.
MIT License
1.52k stars 108 forks source link

Add Cyrillic support #266

Open Brtsiev-Kazbek opened 2 years ago

Brtsiev-Kazbek commented 2 years ago

I ran into a problem while developing the game. The library does not support Cyrillic.

thebracket commented 2 years ago

The root of the problem is that bracket-terminal started out as a codepage-437 emulator: the original IBM PC character set, with 256 characters. A few of the defaults are Cyrillic (mostly symbols commonly used in math), but most of the Cyrillic character set is missing. Because terminals work by blitting from a font file graphic (e.g. the default) - if the character isn't in there, it won't render.

The Unicode Example shows you one work-around: you can have enormous font files containing an enormous number of glyphs. The example includes some Cyrillic output. I'm not familiar with enough Cyrillic languages to know how useful that is; there are so many small variations between the various languages using that character set.

In the longer term, TrueType support would be the correct way to solve this. That significantly changes how the library as a whole works, so I'm not sure when/if that will happen.

Hope that helps!