Added basic Japanese font support.

This commit is contained in:
linshier
2010-10-24 07:56:28 +00:00
parent 0ce36747a7
commit 60ef07a025
11 changed files with 769 additions and 71 deletions

View File

@@ -58,7 +58,9 @@ const vector<string>& CardPrimitive::formattedText()
{
std::string s = text;
std::string::size_type found = s.find_first_of("{}");
while (found!=string::npos)
// XXX: neofonts don't use {} for mana cost because some Shift-JIS character's
// second byte equals to the value of '{' or '}'.
while (!neofont && found!=string::npos)
{
s[found] = '/';
found = s.find_first_of("{}", found + 1);