You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All non-latin alphabet characters fail to be displayed in build #10316. Likely caused by erroneous code in PR#37668.
I believe that the problem is caused by std::unique_ptr<Font> Font::load_font( const std::string &typeface, int fontsize in src/sdltiles.cpp, where fonts in data/font are not loaded unless an error is thrown during loading of user's font.
if( ends_with( typeface, ".bmp" ) || ends_with( typeface, ".png" ) ) {
// Seems to be an image file, not a font.
// Try to load as bitmap font from user font dir, then from font dir.
try {
return std::unique_ptr<Font>( std::make_unique<BitmapFont>( fontwidth, fontheight,
PATH_INFO::fontdir() + typeface ) );
PATH_INFO::user_font() + typeface ) );
} catch( std::exception &err ) {
try {
return std::unique_ptr<Font>( std::make_unique<BitmapFont>( fontwidth, fontheight,
PATH_INFO::fontdir() + typeface ) );
} catch( std::exception &err ) {
dbg( D_ERROR ) << "Failed to load " << typeface << ": " << err.what();
// Continue to load as truetype font
}
}
Steps To Reproduce
Download build #10316 and switch to other languages like Russian or Chinese.
Expected behavior
The characters are displayed correctly.
Screenshots
Versions and configuration
OS: Windows
Game Version: 0.D-Windows_x64-Tiles-10317
Graphics version: Tiles
Mods loaded: dda
Additional context
I dont know how to create a PR to fix it.
The text was updated successfully, but these errors were encountered:
The bug is not observed in build 10316, but present in build 10317, so I am pretty sure that PR No. 37668 Added support for user font directory causes this bug.
Describe the bug
All non-latin alphabet characters fail to be displayed in build #10316. Likely caused by erroneous code in PR#37668.
I believe that the problem is caused by
std::unique_ptr<Font> Font::load_font( const std::string &typeface, int fontsize
insrc/sdltiles.cpp
, where fonts in data/font are not loaded unless an error is thrown during loading of user's font.Steps To Reproduce
Download build #10316 and switch to other languages like Russian or Chinese.
Expected behavior
The characters are displayed correctly.
Screenshots
Versions and configuration
Additional context
I dont know how to create a PR to fix it.
The text was updated successfully, but these errors were encountered: