- Joined
- Sep 21, 2016
- Messages
- 358
- Reaction score
- 546
- First Language
- English
- Primarily Uses
- RMMV
Hello, and sorry if I'm posting this in the wrong board - wasn't really sure where this question would be appropriate.
Basically I want to have the game's font change when using a different language besides English (specifically German, Spanish and Portuguese). I am using Iavra's Localization Core and Menu to switch the language in-game. The font switches seamlessly when the language is changed to Simplified Chinese and Japanese, which I somewhat understand from looking through MV's source code:
Unfortunately I have no idea how this code operates - I tried messing with the code to see if I could get it to detect German, Spanish and Portuguese but to no avail - which is why I'm asking here.
I know this is kind of a silly issue, but I'm using a font I really like as the base font (PCSenior, a very retro font), but this font doesn't have the characters necessary for languages like German, which is why I'd rather it switch to a language-friendly font when needed rather than just giving up on it and using a basic font for everything.
Basically I want to have the game's font change when using a different language besides English (specifically German, Spanish and Portuguese). I am using Iavra's Localization Core and Menu to switch the language in-game. The font switches seamlessly when the language is changed to Simplified Chinese and Japanese, which I somewhat understand from looking through MV's source code:
Window_Base.prototype.standardFontFace = function() {
if ($gameSystem.isChinese()) {
return 'SimHei, Heiti TC, sans-serif';
} else if ($gameSystem.isKorean()) {
return 'Dotum, AppleGothic, sans-serif';
} else {
return 'GameFont';
}
Game_System.prototype.isJapanese = function() {
return $dataSystem.locale.match(/^ja/);
};
Game_System.prototype.isChinese = function() {
return $dataSystem.locale.match(/^zh/);
};
Game_System.prototype.isKorean = function() {
return $dataSystem.locale.match(/^ko/);
};
Game_System.prototype.isCJK = function() {
return $dataSystem.locale.match(/^(ja|zh|ko)/);
};
Game_System.prototype.isRussian = function() {
return $dataSystem.locale.match(/^ru/);
};
};
if ($gameSystem.isChinese()) {
return 'SimHei, Heiti TC, sans-serif';
} else if ($gameSystem.isKorean()) {
return 'Dotum, AppleGothic, sans-serif';
} else {
return 'GameFont';
}
Game_System.prototype.isJapanese = function() {
return $dataSystem.locale.match(/^ja/);
};
Game_System.prototype.isChinese = function() {
return $dataSystem.locale.match(/^zh/);
};
Game_System.prototype.isKorean = function() {
return $dataSystem.locale.match(/^ko/);
};
Game_System.prototype.isCJK = function() {
return $dataSystem.locale.match(/^(ja|zh|ko)/);
};
Game_System.prototype.isRussian = function() {
return $dataSystem.locale.match(/^ru/);
};
};
Unfortunately I have no idea how this code operates - I tried messing with the code to see if I could get it to detect German, Spanish and Portuguese but to no avail - which is why I'm asking here.
I know this is kind of a silly issue, but I'm using a font I really like as the base font (PCSenior, a very retro font), but this font doesn't have the characters necessary for languages like German, which is why I'd rather it switch to a language-friendly font when needed rather than just giving up on it and using a basic font for everything.
