From d627f56f7817ef3d193c7f485f9e40416d3079dc Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 5 Jan 2003 08:47:48 +0000 Subject: [PATCH] update --- stepmania/src/BitmapText.cpp | 19 +++++++++++++++++++ stepmania/src/FontManager.cpp | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/stepmania/src/BitmapText.cpp b/stepmania/src/BitmapText.cpp index 1387b11d74..da2e4d06bb 100644 --- a/stepmania/src/BitmapText.cpp +++ b/stepmania/src/BitmapText.cpp @@ -22,6 +22,25 @@ #include "GameConstantsAndTypes.h" #include "Font.h" +/* + * Forward planning: + * + * This can't handle full CJK fonts; it's not reasonable to load a 2000+ glyph bitmap + * font into memory. We want to be able to fall back on a real font renderer when + * we're missing characters. However, we make use of custom glyphs, and we don't want + * custom glyphs and fallback fonts to be mutually exclusive. + * + * So, if we have a fallback font renderer active, and we're missing any characters at + * all, send the text to the fallback renderer. If it can't render a character + * (because it's a special-use character), render up to that character, render the + * special character ourself, then start again on the next character. The data + * rendered can be put into textures and put into the verts/tex lists as if it came + * from a regular font (nothing says we can't put more than one character per quad) + * and DrawChars won't have to be changed at all. + * + * Some mechanism to hint which fallback font size/style a given font wants, to make + * a best effort to line up font types. This could be a setting in the font INI. + */ #define RAINBOW_COLOR(n) THEME->GetMetricC("BitmapText",ssprintf("RainbowColor%i", n+1)) const int NUM_RAINBOW_COLORS = 7; diff --git a/stepmania/src/FontManager.cpp b/stepmania/src/FontManager.cpp index a7c06599dd..ad127df3fe 100644 --- a/stepmania/src/FontManager.cpp +++ b/stepmania/src/FontManager.cpp @@ -356,8 +356,8 @@ Font* FontManager::LoadFont( const CString &sFontOrTextureFilePath, CString sCha /* XXX; these should be in a data file somewhere (theme metrics?) * (The comments here are UTF-8; they won't show up in VC6.) */ CharAliases["default"] = Font::DEFAULT_GLYPH; /* ? */ - CharAliases["kakumei1"] = 0x547D; /* 革 */ - CharAliases["kakumei2"] = 0x9769; /* 命 */ + CharAliases["kakumei1"] = 0x9769; /* 革 */ + CharAliases["kakumei2"] = 0x547D; /* 命 */ CharAliases["matsuri"] = 0x796D; /* 祭 */ CharAliases["oni"] = 0x9B3C; /* 鬼 */ CharAliases["michi"] = 0x9053; /* 道 */