From 313bc1e9827df7a1598b09049746f4c3eb5ff615 Mon Sep 17 00:00:00 2001 From: Eric Mader Date: Fri, 26 Oct 2007 02:27:04 +0000 Subject: [PATCH] ICU-6007 Don't check for Thai presentation forms if the font doesn't contain Thai! X-SVN-Rev: 22857 --- icu4c/source/layout/ThaiLayoutEngine.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/icu4c/source/layout/ThaiLayoutEngine.cpp b/icu4c/source/layout/ThaiLayoutEngine.cpp index 1df56d7fb2..b9cbdb808f 100644 --- a/icu4c/source/layout/ThaiLayoutEngine.cpp +++ b/icu4c/source/layout/ThaiLayoutEngine.cpp @@ -23,7 +23,10 @@ ThaiLayoutEngine::ThaiLayoutEngine(const LEFontInstance *fontInstance, le_int32 fErrorChar = 0x25CC; // Figure out which presentation forms the font uses - if (fontInstance->canDisplay(0x0E64)) { + if (! fontInstance->canDisplay(0x0E01)) { + // No Thai in font; don't use presentation forms. + fGlyphSet = 3; + } else if (fontInstance->canDisplay(0x0E64)) { // WorldType uses reserved space in Thai block fGlyphSet = 0; } else if (fontInstance->canDisplay(0xF701)) {