From 283c47fad5b9849b1b51bc386afba6a61b218f1b Mon Sep 17 00:00:00 2001 From: hikerstk Date: Mon, 13 Dec 2010 10:43:08 +0000 Subject: [PATCH] Added offset to texture for Asian font to avoid clash with other fonts. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6995 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/font_tool/CFontTool.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/font_tool/CFontTool.cpp b/src/font_tool/CFontTool.cpp index cb2628582..c0dcdaa66 100644 --- a/src/font_tool/CFontTool.cpp +++ b/src/font_tool/CFontTool.cpp @@ -765,6 +765,7 @@ bool CFontTool::saveBitmapFont(const c8 *filename, const c8* format) writer->writeLineBreak(); // write images and link to them + u32 offset_for_asian_fonts=100; for (u32 i=0; igetVideoDriver()->writeImageToFile(currentImages[i],imagename.c_str()); writer->writeElement(L"Texture", true, - L"index", core::stringw(i).c_str(), + L"index", core::stringw(i+offset_for_asian_fonts).c_str(), L"filename", core::stringw(imagename.c_str()).c_str(), L"hasAlpha", UseAlphaChannel ? L"true" : L"false"); writer->writeLineBreak(); @@ -808,9 +809,9 @@ bool CFontTool::saveBitmapFont(const c8 *filename, const c8* format) names.push_back(core::stringw(L"c")); values.push_back(core::stringw(c)); // image number - if (fa.sourceimage != 0) + if (fa.sourceimage+offset_for_asian_fonts != 0) { - image = core::stringw(fa.sourceimage); + image = core::stringw(fa.sourceimage+offset_for_asian_fonts); names.push_back(core::stringw(L"i")); values.push_back(image); }