Adding the support for the Arphic gkai00mp.ttf font for the Chinese language
Fixed a font-initialization-order bug, where the font order was not used in the title screen.
This commit is contained in:
parent
bc56262d9b
commit
ec38d67fff
5 changed files with 31 additions and 4 deletions
|
@ -23,4 +23,8 @@
|
|||
# list would be huge.
|
||||
codepoints="32-126,160-255,305,321-322,331,338-339,402,593,602,658,710-711,714-715,728,730,732,913-929,931-937,945-969,977,981,1025,1040-1103,1105,12288-12543,12800-40959,63744-64255,65280-65439,65537-65991"
|
||||
[/font]
|
||||
[font]
|
||||
name="gkai00mp.ttf"
|
||||
codepoints="32-126,164,167-168,176-177,183,215,224-225,232-234,236-237,242-243,247,249-250,252,257,275,283,299,324,328,333,363,462,464,466,468,470,472,474,476,593,609,711,713,913-929,931-937,945-961,963-969,1025,1040-1103,1105,8212,8214,8216-8217,8220-8221,8230,8240,8242-8243,8251,8451,8470,8544-8555,8560-8569,8592-8595,8712,8719,8721,8730,8733-8734,8736,8741,8743-8747,8750,8756-8759,8765,8776,8780,8800-8801,8804-8805,8814-8815,8857,8869,8978,9312-9321,9332-9371,9472-9547,9632-9633,9650-9651,9670-9671,9675,9678-9679,9733-9734,9792,9794,19968-40959,65073,65075-65092,65281-65374,65504-65505,65507,65509"
|
||||
[/font]
|
||||
[/fonts]
|
||||
|
|
|
@ -9,7 +9,7 @@ msgstr ""
|
|||
"Project-Id-Version: Battle for Wesnoth 0.8.11+cvs\n"
|
||||
"Report-Msgid-Bugs-To: http://bugs.wesnoth.org/\n"
|
||||
"POT-Creation-Date: 2005-03-29 09:34+0200\n"
|
||||
"PO-Revision-Date: 2005-04-09 11:17+0200\n"
|
||||
"PO-Revision-Date: 2005-04-09 11:32+0200\n"
|
||||
"Last-Translator: Automatically generated\n"
|
||||
"Language-Team: none\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
@ -17,8 +17,8 @@ msgstr ""
|
|||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: data/fonts.cfg:4
|
||||
msgid "gkai00mp.ttf,Vera.ttf,Bepa-Roman.ttf,FreeSans.ttf,sazanami-gothic.ttf"
|
||||
msgstr ""
|
||||
msgid "Vera.ttf,Bepa-Roman.ttf,FreeSans.ttf,sazanami-gothic.ttf"
|
||||
msgstr "gkai00mp.ttf,Vera.ttf,Bepa-Roman.ttf,FreeSans.ttf,sazanami-gothic.ttf"
|
||||
|
||||
#: data/help.cfg:10 data/help.cfg:53 data/help.cfg:59
|
||||
msgid "Introduction"
|
||||
|
|
|
@ -475,7 +475,8 @@ std::string load_game_dialog(display& disp, const config& game_config, const gam
|
|||
|
||||
try {
|
||||
summary["mod_time"] = str_cast(lexical_cast<int>(games[*s].time_modified));
|
||||
load_game(data,games[*s].name,state,NULL);
|
||||
std::string dummy;
|
||||
load_game(data,games[*s].name,state,&dummy);
|
||||
extract_summary_data_from_save(state,summary);
|
||||
} catch(io_exception&) {
|
||||
summary["corrupt"] = "yes";
|
||||
|
|
|
@ -1611,6 +1611,9 @@ int play_game(int argc, char** argv)
|
|||
|
||||
bool res;
|
||||
|
||||
// do initialize fonts before reading the game config, to have game
|
||||
// config error messages displayed. fonts will be re-initialized later
|
||||
// when the language is read from the game config.
|
||||
res = font::load_font_config();
|
||||
if(res == false) {
|
||||
std::cerr << "could not initialize fonts\n";
|
||||
|
@ -1637,6 +1640,12 @@ int play_game(int argc, char** argv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
res = font::load_font_config();
|
||||
if(res == false) {
|
||||
std::cerr << "could not re-initialize fonts for the current language\n";
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
// it is better for gettext-native platforms to read the config
|
||||
// files after having pre-initialized the language, maybe...
|
||||
|
|
13
src/help.cpp
13
src/help.cpp
|
@ -1801,6 +1801,18 @@ void help_text_area::handle_ref_cfg(const config &cfg)
|
|||
bool show_ref = true;
|
||||
if (find_topic(toplevel_, dst) == NULL && !force) {
|
||||
show_ref = false;
|
||||
// FIXME: workaround: if different campaigns define different
|
||||
// terrains, some terrains available in one campaign will
|
||||
// appear in the list of seen terrains, and be displayed in the
|
||||
// help, even if the current campaign does not handle such
|
||||
// terrains. This will lead to the unit page generator creating
|
||||
// invalid references.
|
||||
//
|
||||
// Disabling this is a kludgy workaround until the
|
||||
// encountered_terrains system is fixed
|
||||
//
|
||||
// -- Ayin apr 8 2005
|
||||
#if 0
|
||||
if (game_config::debug) {
|
||||
std::stringstream msg;
|
||||
msg << "Reference to non-existent topic '" << dst
|
||||
|
@ -1809,6 +1821,7 @@ void help_text_area::handle_ref_cfg(const config &cfg)
|
|||
write(msg, cfg);
|
||||
throw parse_error(msg.str());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (dst == "") {
|
||||
std::stringstream msg;
|
||||
|
|
Loading…
Add table
Reference in a new issue