diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-02-22 08:38:14 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-02-22 08:38:14 +0000 |
commit | 07d53c40eed683d8cd67a30bf6c5dc750a5c73e5 (patch) | |
tree | b563b11d452fb92b8c4c44d340cbf6accff0a947 /Build/source/texk/web2c/xetexdir | |
parent | 212bc117def50f8d94347561b0aa14a840ddbf62 (diff) |
XeTeX: Drop support for ICU < 4.2.
git-svn-id: svn://tug.org/texlive/trunk@21497 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/xetexdir')
-rw-r--r-- | Build/source/texk/web2c/xetexdir/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/xetexdir/XeTeXOTLayoutEngine.cpp | 51 | ||||
-rw-r--r-- | Build/source/texk/web2c/xetexdir/XeTeXOTLayoutEngine.h | 17 |
3 files changed, 23 insertions, 49 deletions
diff --git a/Build/source/texk/web2c/xetexdir/ChangeLog b/Build/source/texk/web2c/xetexdir/ChangeLog index abf22428bf3..0fdc02689f9 100644 --- a/Build/source/texk/web2c/xetexdir/ChangeLog +++ b/Build/source/texk/web2c/xetexdir/ChangeLog @@ -1,3 +1,7 @@ +2011-02-22 Peter Breitenlohner <peb@mppmu.mpg.de> + + * XeTeXOTLayoutEngine.{cpp,h}: Drop support for ICU < 4.2. + 2011-01-17 Karl Berry <karl@tug.org> * XeTeX_ext.h: #include <w2c/c-auto.h> for SIZEOF_LONG and diff --git a/Build/source/texk/web2c/xetexdir/XeTeXOTLayoutEngine.cpp b/Build/source/texk/web2c/xetexdir/XeTeXOTLayoutEngine.cpp index fbd77ef5b3b..97ebe19804e 100644 --- a/Build/source/texk/web2c/xetexdir/XeTeXOTLayoutEngine.cpp +++ b/Build/source/texk/web2c/xetexdir/XeTeXOTLayoutEngine.cpp @@ -44,11 +44,7 @@ public: const GlyphSubstitutionTableHeader *gsubTable, const GlyphPositioningTableHeader* gposTable, const LETag* addFeatures, const le_int32* addParams, - const LETag* removeFeatures -#if U_ICU_VERSION_CODE >= 42 - , LEErrorCode &success -#endif - ); + const LETag* removeFeatures, LEErrorCode &success); virtual ~XeTeXHanLayoutEngine(); @@ -125,18 +121,14 @@ LayoutEngine* XeTeXOTLayoutEngine::LayoutEngineFactory case teluScriptCode: case sinhScriptCode: // result = new XeTeXIndicLayoutEngine(fontInstance, scriptTag, languageTag, gsubTable, addFeatures, removeFeatures); - result = new IndicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, -#if U_ICU_VERSION_CODE >= 42 - FALSE, -#endif - gsubTable XeTeX_success); + result = new IndicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, FALSE, gsubTable, success); break; case arabScriptCode: case syrcScriptCode: case mongScriptCode: // result = new XeTeXArabicLayoutEngine(fontInstance, scriptTag, languageTag, gsubTable, addFeatures, removeFeatures); - result = new ArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable XeTeX_success); + result = new ArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success); break; case bopoScriptCode: @@ -145,19 +137,19 @@ LayoutEngine* XeTeXOTLayoutEngine::LayoutEngineFactory case hiraScriptCode: case kanaScriptCode: case hrktScriptCode: - result = new XeTeXHanLayoutEngine(fontInstance, scriptTag, languageTag, gsubTable, gposTable, addFeatures, addParams, removeFeatures XeTeX_success); + result = new XeTeXHanLayoutEngine(fontInstance, scriptTag, languageTag, gsubTable, gposTable, addFeatures, addParams, removeFeatures, success); break; case tibtScriptCode: - result = new TibetanOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable XeTeX_success); + result = new TibetanOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success); break; case khmrScriptCode: - result = new KhmerOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable XeTeX_success); + result = new KhmerOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success); break; default: - result = new XeTeXOTLayoutEngine(fontInstance, scriptTag, languageTag, gsubTable, gposTable, addFeatures, addParams, removeFeatures XeTeX_success); + result = new XeTeXOTLayoutEngine(fontInstance, scriptTag, languageTag, gsubTable, gposTable, addFeatures, addParams, removeFeatures, success); break; } } @@ -173,31 +165,26 @@ LayoutEngine* XeTeXOTLayoutEngine::LayoutEngineFactory case tamlScriptCode: case teluScriptCode: case sinhScriptCode: - result = new IndicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags XeTeX_success); + result = new IndicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success); break; case arabScriptCode: // case hebrScriptCode: - result = new UnicodeArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags XeTeX_success); + result = new UnicodeArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success); break; case thaiScriptCode: - result = new ThaiLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags XeTeX_success); + result = new ThaiLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success); break; default: - result = new OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags XeTeX_success); + result = new OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success); break; } } -#if U_ICU_VERSION_CODE >= 42 if (LE_FAILURE(success)) return NULL; -#else - if (result == NULL) - success = LE_MEMORY_ALLOCATION_ERROR; -#endif return result; } @@ -205,12 +192,8 @@ LayoutEngine* XeTeXOTLayoutEngine::LayoutEngineFactory XeTeXOTLayoutEngine::XeTeXOTLayoutEngine( const LEFontInstance* fontInstance, LETag scriptTag, LETag languageTag, const GlyphSubstitutionTableHeader* gsubTable, const GlyphPositioningTableHeader* gposTable, - const LETag* addFeatures, const le_int32* addParams, const LETag* removeFeatures -#if U_ICU_VERSION_CODE >= 42 - , LEErrorCode &success -#endif - ) - : OpenTypeLayoutEngine(fontInstance, getScriptCode(scriptTag), getLanguageCode(languageTag), 3, gsubTable XeTeX_success) + const LETag* addFeatures, const le_int32* addParams, const LETag* removeFeatures, LEErrorCode &success) + : OpenTypeLayoutEngine(fontInstance, getScriptCode(scriptTag), getLanguageCode(languageTag), 3, gsubTable, success) { fDefaultFeatureMap = fFeatureMap; @@ -376,12 +359,8 @@ static const le_int32 featureMapCount = LE_ARRAY_SIZE(featureMap); XeTeXHanLayoutEngine::XeTeXHanLayoutEngine(const XeTeXFontInst *fontInstance, LETag scriptTag, LETag languageTag, const GlyphSubstitutionTableHeader *gsubTable, const GlyphPositioningTableHeader *gposTable, const LETag *addFeatures, const le_int32* addParams, - const LETag *removeFeatures -#if U_ICU_VERSION_CODE >= 42 - , LEErrorCode &success -#endif - ) - : XeTeXOTLayoutEngine(fontInstance, scriptTag, languageTag, gsubTable, gposTable, NULL, NULL, NULL XeTeX_success) + const LETag *removeFeatures, LEErrorCode &success) + : XeTeXOTLayoutEngine(fontInstance, scriptTag, languageTag, gsubTable, gposTable, NULL, NULL, NULL, success) { // reset the feature map and default features fFeatureMap = featureMap; diff --git a/Build/source/texk/web2c/xetexdir/XeTeXOTLayoutEngine.h b/Build/source/texk/web2c/xetexdir/XeTeXOTLayoutEngine.h index 5af9b4f5948..725c5b6d9d1 100644 --- a/Build/source/texk/web2c/xetexdir/XeTeXOTLayoutEngine.h +++ b/Build/source/texk/web2c/xetexdir/XeTeXOTLayoutEngine.h @@ -35,14 +35,9 @@ authorization from the copyright holders. #include "layout/OpenTypeLayoutEngine.h" -#include "unicode/uversion.h" -#define U_ICU_VERSION_CODE (U_ICU_VERSION_MAJOR_NUM*10+U_ICU_VERSION_MINOR_NUM) -/* ICU-4.2 added 'success' as last parameter to LayoutEngine constructors. */ -#if U_ICU_VERSION_CODE >= 42 -#define XeTeX_success , success -#else -#define XeTeX_success -#endif +// /* ICU-4.2 added 'success' as last parameter to LayoutEngine constructors. */ +// #include "unicode/uversion.h" +// #define U_ICU_VERSION_CODE (U_ICU_VERSION_MAJOR_NUM*10+U_ICU_VERSION_MINOR_NUM) #include "XeTeXFontInst.h" @@ -53,11 +48,7 @@ public: const GlyphSubstitutionTableHeader* gsubTable, const GlyphPositioningTableHeader* gposTable, const LETag* addFeatures, const le_int32* addParams, - const LETag* removeFeatures -#if U_ICU_VERSION_CODE >= 42 - , LEErrorCode &success -#endif - ); + const LETag* removeFeatures, LEErrorCode &success); virtual ~XeTeXOTLayoutEngine(); |