Skip to content

Commit

Permalink
Force the use of fontconfig fontmap backend on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
loonycyborg committed Jul 28, 2020
1 parent fa08ff2 commit ec67098
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 1 addition & 4 deletions src/font/font_config.cpp
Expand Up @@ -40,7 +40,6 @@

#ifdef CAIRO_HAS_WIN32_FONT
#include <windows.h>
#undef CAIRO_HAS_FT_FONT
#endif

#ifdef CAIRO_HAS_FT_FONT
Expand Down Expand Up @@ -239,9 +238,7 @@ manager::manager()
{
LOG_FT << "Local font configuration loaded\n";
}
#endif

#ifdef CAIRO_HAS_WIN32_FONT
#elif defined(CAIRO_HAS_WIN32_FONT)
for(const std::string& path : filesystem::get_binary_paths("fonts")) {
std::vector<std::string> files;
if(filesystem::is_directory(path)) {
Expand Down
3 changes: 3 additions & 0 deletions src/wesnoth.cpp
Expand Up @@ -1027,6 +1027,9 @@ int main(int argc, char** argv)
UNUSED(argc);
UNUSED(argv);

_putenv("PANGOCAIRO_BACKEND=fontconfig");
_putenv("FONTCONFIG_PATH=fonts");

// windows argv is ansi encoded by default
std::vector<std::string> args =
parse_commandline_arguments(unicode_cast<std::string>(std::wstring(GetCommandLineW())));
Expand Down

0 comments on commit ec67098

Please sign in to comment.