mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Fixed Noto font not being used for Chinese characters, when the user's System Language is not "zh_TW"
This commit is contained in:
parent
1e58fb6911
commit
cf8229a4ae
|
@ -66,7 +66,7 @@ func _on_Language_pressed(button : Button) -> void:
|
|||
else:
|
||||
TranslationServer.set_locale(Global.loaded_locales[index])
|
||||
|
||||
if TranslationServer.get_locale() == "zh_TW":
|
||||
if "zh" in TranslationServer.get_locale():
|
||||
Global.control.theme.default_font = preload("res://Assets/Fonts/NotoSansCJKtc-Regular.tres")
|
||||
else:
|
||||
Global.control.theme.default_font = preload("res://Assets/Fonts/Roboto-Regular.tres")
|
||||
|
|
|
@ -93,7 +93,7 @@ func _ready() -> void:
|
|||
else: # If the user doesn't have a language preference, set it to their OS' locale
|
||||
TranslationServer.set_locale(OS.get_locale())
|
||||
|
||||
if TranslationServer.get_locale() == "zh_TW":
|
||||
if "zh" in TranslationServer.get_locale():
|
||||
theme.default_font = preload("res://Assets/Fonts/NotoSansCJKtc-Regular.tres")
|
||||
else:
|
||||
theme.default_font = preload("res://Assets/Fonts/Roboto-Regular.tres")
|
||||
|
|
Loading…
Reference in a new issue