diff --git a/gfx/thebes/gfxFont.cpp b/gfx/thebes/gfxFont.cpp index cde93ddf504..5c6ef0eb4df 100644 --- a/gfx/thebes/gfxFont.cpp +++ b/gfx/thebes/gfxFont.cpp @@ -2262,6 +2262,9 @@ gfxFont::ShapeWord(gfxContext *aContext, return ok; } +inline static bool IsChar8Bit(PRUint8 /*aCh*/) { return true; } +inline static bool IsChar8Bit(PRUnichar aCh) { return aCh < 0x100; } + template bool gfxFont::SplitAndInitTextRun(gfxContext *aContext, @@ -2332,7 +2335,7 @@ gfxFont::SplitAndInitTextRun(gfxContext *aContext, } if (!breakHere) { - if (ch >= 0x100) { + if (!IsChar8Bit(ch)) { wordIs8Bit = false; } // include this character in the hash, and move on to next @@ -2410,7 +2413,7 @@ gfxFont::SplitAndInitTextRun(gfxContext *aContext, // word was forcibly broken, so current char will begin next word hash = HashMix(0, ch); wordStart = i; - wordIs8Bit = (ch < 0x100); + wordIs8Bit = IsChar8Bit(ch); } return true;