Join GitHub today
Basic Cyrillic support #1647
This adds basic support for rendering cyrillic characters, if the underlying font provides them. This is a rudimentary patch which just updates the current TextureFont system to include cyrillic glyphs in the glyph atlas. It is not intended to be a long term solution, but rather to provide just enough support to allow Russian translation work to continue, and to hopefully avoid turning away potential Russian developers.
For a longer term approach, I expect us to need proper font fallback to cope with characters that aren't in the current font. I also expect us to switch to a shared glyph atlas, with dynamic updates to add glyphs as they are needed (possibly adding them in blocks, i.e., if you use one character from the basic Unicode Cyrillic range it could add all glyphs in that range in one update). We may also need to use a glyph shaping/layout library like HarfBuzz (I think ICU also includes glyph layout code) to properly cope with more complex language features (we would definitely need it if we want to support non-western scripts).
Limitations of this temporary patch:
(*) I'm not sure -- combining marks might "just work" by having an advance value of 0 in the glyph information (so the renderer ends up automatically overlaying the combining mark with the next character).
Edit: For testing purposes, this mod replaces all current fonts with DejaVu fonts which include cyrillic glyphs:
That might not be the best place long term, but for now I just don't want IniConfig to have to remember its filename.
It's mostly unused; it's much less important with separate FileSource objects for game data files and user files, since the FileSource objects deal with knowing the base path (and other things).
This avoids a problem where ModManager tries to print to stdout before it's been redirected. With a non-ASCII username on Windows XP this was causing a weird crash for me. I'm still not certain what exactly the problem was.