mirror of
https://github.com/glest/glest-source.git
synced 2025-08-25 09:10:49 +02:00
Fixed font string on Windows
This commit is contained in:
@@ -92,13 +92,13 @@ namespace Shared {
|
||||
Font::langHeightText = "yW";
|
||||
|
||||
#if defined(WIN32)
|
||||
string newEnvValue = "ZETAGLEST_FONT=";
|
||||
string newEnvValue = "GAME_FONT=";
|
||||
_putenv(newEnvValue.c_str());
|
||||
newEnvValue = "ZETAGLEST_FONT_FAMILY=";
|
||||
newEnvValue = "GAME_FONT_FAMILY=";
|
||||
_putenv(newEnvValue.c_str());
|
||||
#else
|
||||
unsetenv("ZETAGLEST_FONT");
|
||||
unsetenv("ZETAGLEST_FONT_FAMILY");
|
||||
unsetenv("GAME_FONT");
|
||||
unsetenv("GAME_FONT_FAMILY");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -609,8 +609,8 @@ namespace Shared {
|
||||
}
|
||||
|
||||
// Get user-specified font path
|
||||
string zetaglest_font = safeCharPtrCopy(getenv("ZETAGLEST_FONT"), 8095);
|
||||
string zetaglest_font_family = safeCharPtrCopy(getenv("ZETAGLEST_FONT_FAMILY"), 8095);
|
||||
string zetaglest_font = safeCharPtrCopy(getenv("GAME_FONT"), 8095);
|
||||
string zetaglest_font_family = safeCharPtrCopy(getenv("GAME_FONT_FAMILY"), 8095);
|
||||
if (zetaglest_font != "" || zetaglest_font_family != "") {
|
||||
if (zetaglest_font != "") {
|
||||
tryFont = zetaglest_font;
|
||||
|
@@ -47,17 +47,17 @@ namespace Shared {
|
||||
TextFTGL::TextFTGL(FontTextHandlerType type) : Text(type) {
|
||||
|
||||
//throw game_runtime_error("FTGL!");
|
||||
//setenv("ZETAGLEST_FONT","/usr/share/fonts/truetype/wqy/wqy-zenhei.ttc",0);
|
||||
//setenv("ZETAGLEST_FONT","/usr/share/fonts/truetype/arphic/uming.ttc",0); // Chinese
|
||||
//setenv("ZETAGLEST_FONT","/usr/share/fonts/truetype/arphic/ukai.ttc",0); // Chinese
|
||||
//setenv("ZETAGLEST_FONT","/usr/share/fonts/truetype/ttf-sil-doulos/DoulosSILR.ttf",0); // Russian / Cyrillic
|
||||
//setenv("ZETAGLEST_FONT","/usr/share/fonts/truetype/ttf-sil-charis/CharisSILR.ttf",0); // Russian / Cyrillic
|
||||
//setenv("ZETAGLEST_FONT","/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf",0); // Russian / Cyrillic
|
||||
//setenv("ZETAGLEST_FONT","/usr/share/fonts/truetype/takao/TakaoPGothic.ttf",0); // Japanese
|
||||
//setenv("ZETAGLEST_FONT","/usr/share/fonts/truetype/ttf-sil-scheherazade/ScheherazadeRegOT.ttf",0); // Arabic
|
||||
//setenv("ZETAGLEST_FONT","/usr/share/fonts/truetype/linux-libertine/LinLibertine_Re.ttf",0); // Hebrew
|
||||
//setenv("ZETAGLEST_FONT","/usr/share/fonts/truetype/unifont/unifont.ttf",0); // Czech?
|
||||
//setenv("ZETAGLEST_FONT","/usr/share/fonts/truetype/ttf-liberation/LiberationSans-Regular.ttf",0); // Czech?
|
||||
//setenv("GAME_FONT","/usr/share/fonts/truetype/wqy/wqy-zenhei.ttc",0);
|
||||
//setenv("GAME_FONT","/usr/share/fonts/truetype/arphic/uming.ttc",0); // Chinese
|
||||
//setenv("GAME_FONT","/usr/share/fonts/truetype/arphic/ukai.ttc",0); // Chinese
|
||||
//setenv("GAME_FONT","/usr/share/fonts/truetype/ttf-sil-doulos/DoulosSILR.ttf",0); // Russian / Cyrillic
|
||||
//setenv("GAME_FONT","/usr/share/fonts/truetype/ttf-sil-charis/CharisSILR.ttf",0); // Russian / Cyrillic
|
||||
//setenv("GAME_FONT","/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf",0); // Russian / Cyrillic
|
||||
//setenv("GAME_FONT","/usr/share/fonts/truetype/takao/TakaoPGothic.ttf",0); // Japanese
|
||||
//setenv("GAME_FONT","/usr/share/fonts/truetype/ttf-sil-scheherazade/ScheherazadeRegOT.ttf",0); // Arabic
|
||||
//setenv("GAME_FONT","/usr/share/fonts/truetype/linux-libertine/LinLibertine_Re.ttf",0); // Hebrew
|
||||
//setenv("GAME_FONT","/usr/share/fonts/truetype/unifont/unifont.ttf",0); // Czech?
|
||||
//setenv("GAME_FONT","/usr/share/fonts/truetype/ttf-liberation/LiberationSans-Regular.ttf",0); // Czech?
|
||||
|
||||
|
||||
fontFile = findFont();
|
||||
|
@@ -387,8 +387,8 @@ namespace Shared {
|
||||
}
|
||||
|
||||
// Allows platforms to specify which sound device to use
|
||||
// using the environment variable: ZETAGLEST_SOUND_DEVICE
|
||||
char *deviceName = getenv("ZETAGLEST_SOUND_DEVICE");
|
||||
// using the environment variable: GAME_SOUND_DEVICE
|
||||
char *deviceName = getenv("GAME_SOUND_DEVICE");
|
||||
device = alcOpenDevice(deviceName);
|
||||
|
||||
if (SystemFlags::getSystemSettingType(SystemFlags::debugSound).enabled) {
|
||||
|
Reference in New Issue
Block a user