Move SourceHanSansLite.ttf to the top level, so it can be classified into projects.
This commit is contained in:
+7
-16
@@ -31,7 +31,7 @@ init -1 python:
|
||||
|
||||
from store import config
|
||||
|
||||
def translate_font(language, font, path=None):
|
||||
def translate_font(language, font):
|
||||
"""
|
||||
Selects the font file that is used when translating `language`.
|
||||
|
||||
@@ -39,26 +39,17 @@ init -1 python:
|
||||
Is the name of the font file used for both the launcher and
|
||||
the new GUI template. This should be a string giving the name
|
||||
of the font file.
|
||||
|
||||
`path`
|
||||
The path to the font file, relative to the launcher's game
|
||||
directory. If not given, defaults to fonts.
|
||||
"""
|
||||
|
||||
if path is None:
|
||||
path = "fonts"
|
||||
|
||||
fullfont = path + "/" + font
|
||||
|
||||
def callback():
|
||||
gui.REGULAR_FONT = fullfont
|
||||
gui.LIGHT_FONT = fullfont
|
||||
gui.REGULAR_FONT = font
|
||||
gui.LIGHT_FONT = font
|
||||
gui.REGULAR_BOLD = True
|
||||
|
||||
style._default.font = fullfont
|
||||
style.default.font = fullfont
|
||||
style._default.font = font
|
||||
style.default.font = font
|
||||
|
||||
gui.system_font = fullfont
|
||||
gui.system_font = font
|
||||
gui.project_system_font = font
|
||||
|
||||
config.language_callbacks[language].append(callback)
|
||||
@@ -66,7 +57,7 @@ init -1 python:
|
||||
def s(s):
|
||||
return '"' + s + '"'
|
||||
|
||||
gui7.translate_copy(language, fullfont, font)
|
||||
gui7.translate_copy(language, "sdk-fonts/" + font, font)
|
||||
gui7.translate_define(language, "gui.text_font", s(font))
|
||||
gui7.translate_define(language, "gui.name_text_font", s(font))
|
||||
gui7.translate_define(language, "gui.interface_text_font", s(font))
|
||||
|
||||
@@ -356,7 +356,7 @@ class CodeGenerator(object):
|
||||
def copy_files(self):
|
||||
|
||||
for src, dst in language_copies[self.p.language]:
|
||||
src = os.path.join(renpy.config.gamedir, src)
|
||||
src = os.path.join(renpy.config.renpy_base, src)
|
||||
dst = os.path.join(self.p.prefix, dst)
|
||||
|
||||
if os.path.exists(dst):
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
|
||||
init -1 python hide:
|
||||
|
||||
# Update the searchpath to find additional fonts.
|
||||
config.searchpath.append(config.renpy_base + "/sdk-fonts")
|
||||
|
||||
# Should we enable the use of developer tools? This should be
|
||||
# set to False before the game is released, so the user can't
|
||||
# cheat using developer tools.
|
||||
@@ -349,6 +352,9 @@ init python:
|
||||
source_and_binary("the_question")
|
||||
source_and_binary("tutorial")
|
||||
|
||||
# extra fonts.
|
||||
build.classify_renpy("sdk-fonts/**", "source")
|
||||
|
||||
# docs.
|
||||
build.classify_renpy("doc/", "source")
|
||||
build.classify_renpy("doc/.doctrees/", None)
|
||||
|
||||
@@ -162,6 +162,11 @@ define config.window_icon = "gui/window_icon.png"
|
||||
|
||||
init python:
|
||||
|
||||
# SDK Fonts.
|
||||
config.searchpath.append(config.renpy_base + "/sdk-fonts")
|
||||
config.searchpath.append("sdk-fonts")
|
||||
build.classify_renpy("sdk-fonts/**", "all")
|
||||
|
||||
## The following functions take file patterns. File patterns are case-
|
||||
## insensitive, and matched against the path relative to the base directory,
|
||||
## with and without a leading /. If multiple patterns match, the first is
|
||||
|
||||
@@ -789,25 +789,24 @@ screen preferences():
|
||||
textbutton _("After Choices") action Preference("after choices", "toggle")
|
||||
textbutton _("Transitions") action InvertSelected(Preference("transitions", "toggle"))
|
||||
|
||||
if renpy.loadable("../../launcher/game/fonts/SourceHanSansLite.ttf"):
|
||||
## Additional vboxes of type "radio_pref" or "check_pref" can be
|
||||
## added here, to add additional creator-defined preferences.
|
||||
|
||||
#begin language_picker
|
||||
## Additional vboxes of type "radio_pref" or "check_pref" can be
|
||||
## added here, to add additional creator-defined preferences.
|
||||
|
||||
vbox:
|
||||
style_prefix "radio"
|
||||
label _("Language")
|
||||
vbox:
|
||||
style_prefix "radio"
|
||||
label _("Language")
|
||||
|
||||
textbutton "English" text_font "DejaVuSans.ttf" action Language(None)
|
||||
textbutton "Français" text_font "DejaVuSans.ttf" action Language("french")
|
||||
textbutton "Русский" text_font "DejaVuSans.ttf" action Language("russian")
|
||||
textbutton "Bahasa Melayu" text_font "DejaVuSans.ttf" action Language("malay")
|
||||
textbutton "한국어" text_font "../../launcher/game/fonts/SourceHanSansLite.ttf" action Language("korean")
|
||||
textbutton "简体中文" text_font "../../launcher/game/fonts/SourceHanSansLite.ttf" action Language("schinese")
|
||||
textbutton "繁體中文" text_font "../../launcher/game/fonts/SourceHanSansLite.ttf" action Language("tchinese")
|
||||
textbutton "Español" text_font "DejaVuSans.ttf" action Language("spanish")
|
||||
textbutton "日本語" text_font "../../launcher/game/fonts/SourceHanSansLite.ttf" action Language("japanese")
|
||||
textbutton "English" text_font "DejaVuSans.ttf" action Language(None)
|
||||
textbutton "Français" text_font "DejaVuSans.ttf" action Language("french")
|
||||
textbutton "Русский" text_font "DejaVuSans.ttf" action Language("russian")
|
||||
textbutton "Bahasa Melayu" text_font "DejaVuSans.ttf" action Language("malay")
|
||||
textbutton "한국어" text_font "SourceHanSansLite.ttf" action Language("korean")
|
||||
textbutton "简体中文" text_font "SourceHanSansLite.ttf" action Language("schinese")
|
||||
textbutton "繁體中文" text_font "SourceHanSansLite.ttf" action Language("tchinese")
|
||||
textbutton "Español" text_font "DejaVuSans.ttf" action Language("spanish")
|
||||
textbutton "日本語" text_font "SourceHanSansLite.ttf" action Language("japanese")
|
||||
|
||||
#end language_picker
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
translate japanese python:
|
||||
gui.system_font = gui.main_font = gui.text_font = gui.name_text_font = gui.interface_text_font = gui.button_text_font = gui.choice_button_text_font = "../../launcher/game/fonts/SourceHanSansLite.ttf"
|
||||
gui.system_font = gui.main_font = gui.text_font = gui.name_text_font = gui.interface_text_font = gui.button_text_font = gui.choice_button_text_font = "SourceHanSansLite.ttf"
|
||||
|
||||
translate japanese strings:
|
||||
|
||||
@@ -14,4 +14,3 @@ translate japanese strings:
|
||||
# game/options.rpy:32
|
||||
old "Character Art: Deji.\nOriginal Character Art: derik.\n\nBackground Art: Mugenjohncel.\nOriginal Background Art: DaFool\n\nMusic By: Alessio\n\nWritten By: mikey"
|
||||
new "Character Art: Deji.\nOriginal Character Art: derik.\n\nBackground Art: Mugenjohncel.\nOriginal Background Art: DaFool\n\nMusic By: Alessio\n\nWritten By: mikey"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
translate korean python:
|
||||
gui.system_font = gui.main_font = gui.text_font = gui.name_text_font = gui.interface_text_font = gui.button_text_font = gui.choice_button_text_font = "../../launcher/game/fonts/SourceHanSansLite.ttf"
|
||||
gui.system_font = gui.main_font = gui.text_font = gui.name_text_font = gui.interface_text_font = gui.button_text_font = gui.choice_button_text_font = "SourceHanSansLite.ttf"
|
||||
config.window_title = u"물음 (The Question)"
|
||||
|
||||
translate korean strings:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
translate schinese python:
|
||||
gui.system_font = gui.main_font = gui.text_font = gui.name_text_font = gui.interface_text_font = gui.button_text_font = gui.choice_button_text_font = "../../launcher/game/fonts/SourceHanSansLite.ttf"
|
||||
gui.system_font = gui.main_font = gui.text_font = gui.name_text_font = gui.interface_text_font = gui.button_text_font = gui.choice_button_text_font = "SourceHanSansLite.ttf"
|
||||
|
||||
|
||||
translate schinese strings:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
translate tchinese python:
|
||||
gui.system_font = gui.main_font = gui.text_font = gui.name_text_font = gui.interface_text_font = gui.button_text_font = gui.choice_button_text_font = "../../launcher/game/fonts/SourceHanSansLite.ttf"
|
||||
gui.system_font = gui.main_font = gui.text_font = gui.name_text_font = gui.interface_text_font = gui.button_text_font = gui.choice_button_text_font = "SourceHanSansLite.ttf"
|
||||
|
||||
|
||||
translate tchinese strings:
|
||||
|
||||
@@ -152,6 +152,11 @@ define config.window_icon = "gui/window_icon.png"
|
||||
|
||||
init python:
|
||||
|
||||
## Add SDK Fonts.
|
||||
config.searchpath.append(config.renpy_base + "/sdk-fonts")
|
||||
config.searchpath.append("sdk-fonts")
|
||||
build.classify_renpy("sdk-fonts/**", "all")
|
||||
|
||||
## The following functions take file patterns. File patterns are case-
|
||||
## insensitive, and matched against the path relative to the base directory,
|
||||
## with and without a leading /. If multiple patterns match, the first is
|
||||
|
||||
@@ -776,9 +776,9 @@ screen preferences():
|
||||
textbutton "Français" text_font "DejaVuSans.ttf" action Language("french")
|
||||
textbutton "Русский" text_font "DejaVuSans.ttf" action Language("russian")
|
||||
textbutton "Español" text_font "DejaVuSans.ttf" action Language("spanish")
|
||||
textbutton "한국어" text_font "../../launcher/game/fonts/SourceHanSansLite.ttf" action Language("korean")
|
||||
textbutton "日本語" text_font "../../launcher/game/fonts/SourceHanSansLite.ttf" action Language("japanese")
|
||||
textbutton "简体中文" text_font "../../launcher/game/fonts/SourceHanSansLite.ttf" action Language("schinese")
|
||||
textbutton "한국어" text_font "SourceHanSansLite.ttf" action Language("korean")
|
||||
textbutton "日本語" text_font "SourceHanSansLite.ttf" action Language("japanese")
|
||||
textbutton "简体中文" text_font "SourceHanSansLite.ttf" action Language("schinese")
|
||||
|
||||
# This should be last.
|
||||
textbutton "Pig Latin" text_font "DejaVuSans.ttf" action Language("piglatin")
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
translate japanese python:
|
||||
gui.system_font = gui.main_font = gui.text_font = gui.name_text_font = gui.interface_text_font = gui.button_text_font = gui.choice_button_text_font = "../../launcher/game/fonts/SourceHanSansLite.ttf"
|
||||
gui.system_font = gui.main_font = gui.text_font = gui.name_text_font = gui.interface_text_font = gui.button_text_font = gui.choice_button_text_font = "SourceHanSansLite.ttf"
|
||||
|
||||
@@ -709,7 +709,7 @@ translate korean strings:
|
||||
|
||||
# indepth_style.rpy:22
|
||||
old "Button 2"
|
||||
new "{font=../../launcher/game/fonts/SourceHanSansLite.ttf}버튼 2{/font}"
|
||||
new "{font=SourceHanSansLite.ttf}버튼 2{/font}"
|
||||
|
||||
# indepth_style.rpy:66
|
||||
old "Style basics."
|
||||
@@ -806,4 +806,3 @@ translate korean strings:
|
||||
# indepth_style.rpy:886
|
||||
old "Sixth Child"
|
||||
new "여섯 번째 자식"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
translate korean python:
|
||||
gui.system_font = gui.main_font = gui.text_font = gui.name_text_font = gui.interface_text_font = gui.button_text_font = gui.choice_button_text_font = "../../launcher/game/fonts/SourceHanSansLite.ttf"
|
||||
gui.system_font = gui.main_font = gui.text_font = gui.name_text_font = gui.interface_text_font = gui.button_text_font = gui.choice_button_text_font = "SourceHanSansLite.ttf"
|
||||
config.window_title = u"길라잡이"
|
||||
|
||||
translate korean strings:
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
translate schinese python:
|
||||
gui.system_font = gui.main_font = gui.text_font = gui.name_text_font = gui.interface_text_font = gui.button_text_font = gui.choice_button_text_font = "../../launcher/game/fonts/SourceHanSansLite.ttf"
|
||||
gui.system_font = gui.main_font = gui.text_font = gui.name_text_font = gui.interface_text_font = gui.button_text_font = gui.choice_button_text_font = "SourceHanSansLite.ttf"
|
||||
|
||||
Reference in New Issue
Block a user