Added preliminary support for greek and russian. Chinese is also supported if the SungTil files are present (I'm not committing them yet since they're quite large, so we need to decide first if we want to ship them by default or separately)

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4525 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2010-01-24 01:30:33 +00:00
parent 05f21d45ee
commit 60425bf01d
6 changed files with 6 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

BIN
data/fonts/StkFont.xml Normal file

Binary file not shown.

View File

@ -11,9 +11,6 @@ Logo and Logo_slim : under CC-BY-SA 3.0+ by 'rastapax'
difficulty_*.png icons, released under Creative-Commons BY-SA 3, By Conso (Constantin Pelikan)
Okolaks font by Gluk, released under Open Font License
Layne Hansom font by Scott V. Layne, with modifications by Magne Djupvik. released under Open Font License
title_font, by Marianne Gagnon (Auria), released under CC-BY-SA 3+
screen*.png, by Marianne Gagnon (Auria), including elements from the public domain Tango icon set

View File

@ -613,7 +613,11 @@ void ScalableFont::draw(const core::stringw& text, const core::rect<s32>& positi
// perform lazy loading
lazyLoadTexture(texID);
texture = SpriteBank->getTexture(texID);
assert(texture != NULL);
if (texture == NULL)
{
std::cerr << "WARNING: character not found in current font\n";
continue; // no such character
}
}
driver->draw2DImage(texture,

View File

@ -205,7 +205,7 @@ void init(IrrlichtDevice* device_a, IVideoDriver* driver_a, AbstractStateManager
const float title_text_scale = 0.2f + 0.2f*std::max(0, screen_width - 640)/564.0f;
//ScalableFont* sfont = new ScalableFont(g_env, (file_manager->getGUIDir() + "/okolaks.xml").c_str());
ScalableFont* sfont = new ScalableFont(g_env, file_manager->getFontFile("LayneHansom.xml").c_str() );
ScalableFont* sfont = new ScalableFont(g_env, file_manager->getFontFile("StkFont.xml").c_str() );
sfont->setScale(normal_text_scale);
sfont->setKerningHeight(-5);
g_font = sfont;