diff options
Diffstat (limited to 'Build/source/libs/icu/icu-4.2.1-PATCHES/patch-23-fix-JK-GlyphPos')
-rw-r--r-- | Build/source/libs/icu/icu-4.2.1-PATCHES/patch-23-fix-JK-GlyphPos | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-23-fix-JK-GlyphPos b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-23-fix-JK-GlyphPos new file mode 100644 index 00000000000..192e6f84627 --- /dev/null +++ b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-23-fix-JK-GlyphPos @@ -0,0 +1,56 @@ +diff -ur icu-4.2.1.orig/source/layout/OpenTypeLayoutEngine.cpp icu-4.2.1/source/layout/OpenTypeLayoutEngine.cpp +--- icu-4.2.1.orig/source/layout/OpenTypeLayoutEngine.cpp 2009-10-23 00:04:31.000000000 +0200 ++++ icu-4.2.1/source/layout/OpenTypeLayoutEngine.cpp 2009-10-23 00:09:47.000000000 +0200 +@@ -96,8 +96,10 @@ + setScriptAndLanguageTags(); + + fGDEFTable = (const GlyphDefinitionTableHeader *) getFontTable(gdefTableTag); +- +- if (gposTable != NULL && gposTable->coversScriptAndLanguage(fScriptTag, fLangSysTag)) { ++ ++// JK patch, 2008-05-30 - see Sinhala bug report and LKLUG font ++// if (gposTable != NULL && gposTable->coversScriptAndLanguage(fScriptTag, fLangSysTag)) { ++ if (gposTable != NULL && gposTable->coversScript(fScriptTag)) { + fGPOSTable = gposTable; + } + } +@@ -193,8 +195,16 @@ + return 0; + } + ++ if (LE_FAILURE(success)) { ++ LE_DELETE_ARRAY(outChars); ++ return 0; ++ } ++ + CanonShaping::reorderMarks(&chars[offset], count, rightToLeft, outChars, glyphStorage); + } ++ if (LE_FAILURE(success)) { ++ return 0; ++ } + + glyphStorage.allocateGlyphArray(count, rightToLeft, success); + glyphStorage.allocateAuxData(success); +@@ -333,8 +343,10 @@ + } + + le_int32 glyphCount = glyphStorage.getGlyphCount(); ++ if (glyphCount == 0) ++ return; + +- if (glyphCount > 0 && fGPOSTable != NULL) { ++ if (fGPOSTable != NULL) { + GlyphPositionAdjustments *adjustments = new GlyphPositionAdjustments(glyphCount); + le_int32 i; + +@@ -401,6 +413,10 @@ + + delete adjustments; + } ++ else { ++ // if there was no GPOS table, maybe there's non-OpenType kerning we can use ++ LayoutEngine::adjustGlyphPositions(chars, offset, count, reverse, glyphStorage, success); ++ } + + LEGlyphID zwnj = fFontInstance->mapCharToGlyph(0x200C); + |