From c15a3ee4ba5471f4a4a1367c2c0cfa2d9c3751ba Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Sat, 25 Apr 2015 11:00:58 +0000 Subject: [PATCH] [USP10] Sync with Wine Staging 1.7.37. CORE-9246 svn path=/trunk/; revision=67400 --- reactos/dll/win32/usp10/bidi.c | 6 --- reactos/dll/win32/usp10/opentype.c | 21 +++++---- reactos/dll/win32/usp10/usp10.c | 55 +++++++++++------------- reactos/dll/win32/usp10/usp10_internal.h | 4 +- reactos/media/doc/README.WINE | 2 +- 5 files changed, 41 insertions(+), 47 deletions(-) diff --git a/reactos/dll/win32/usp10/bidi.c b/reactos/dll/win32/usp10/bidi.c index 60b95923d6f..c65628c4239 100644 --- a/reactos/dll/win32/usp10/bidi.c +++ b/reactos/dll/win32/usp10/bidi.c @@ -496,12 +496,6 @@ static inline int iso_previousValidChar(IsolatedRun *iso_run, int index) return index; } -static inline int iso_previousChar(IsolatedRun *iso_run, int index) -{ - if (index <= 0) return -1; - return index --; -} - static inline void iso_dump_types(const char* header, IsolatedRun *iso_run) { int i, len = 0; diff --git a/reactos/dll/win32/usp10/opentype.c b/reactos/dll/win32/usp10/opentype.c index 2881f5d1806..9664765a459 100644 --- a/reactos/dll/win32/usp10/opentype.c +++ b/reactos/dll/win32/usp10/opentype.c @@ -914,10 +914,9 @@ static INT GSUB_apply_LigatureSubst(const OT_LookupTable *look, WORD *glyphs, IN static INT GSUB_apply_ChainContextSubst(const OT_LookupList* lookup, const OT_LookupTable *look, WORD *glyphs, INT glyph_index, INT write_dir, INT *glyph_count) { int j; - BOOL done = FALSE; TRACE("Chaining Contextual Substitution Subtable\n"); - for (j = 0; j < GET_BE_WORD(look->SubTableCount) && !done; j++) + for (j = 0; j < GET_BE_WORD(look->SubTableCount); j++) { const GSUB_ChainContextSubstFormat1 *ccsf1; int offset; @@ -928,14 +927,16 @@ static INT GSUB_apply_ChainContextSubst(const OT_LookupList* lookup, const OT_Lo ccsf1 = (const GSUB_ChainContextSubstFormat1*)((const BYTE*)look+offset); if (GET_BE_WORD(ccsf1->SubstFormat) == 1) { - FIXME(" TODO: subtype 1 (Simple context glyph substitution)\n"); + static int once; + if (!once++) + FIXME(" TODO: subtype 1 (Simple context glyph substitution)\n"); continue; } else if (GET_BE_WORD(ccsf1->SubstFormat) == 2) { -#ifndef __REACTOS__ - FIXME(" TODO: subtype 2 (Class-based Chaining Context Glyph Substitution)\n"); -#endif + static int once; + if (!once++) + FIXME(" TODO: subtype 2 (Class-based Chaining Context Glyph Substitution)\n"); continue; } else if (GET_BE_WORD(ccsf1->SubstFormat) == 3) @@ -1641,12 +1642,16 @@ static INT GPOS_apply_ChainContextPos(ScriptCache *psc, LPOUTLINETEXTMETRICW lpo if (GET_BE_WORD(ccpf3->PosFormat) == 1) { - FIXME(" TODO: subtype 1 (Simple Chaining Context Glyph Positioning)\n"); + static int once; + if (!once++) + FIXME(" TODO: subtype 1 (Simple Chaining Context Glyph Positioning)\n"); continue; } else if (GET_BE_WORD(ccpf3->PosFormat) == 2) { - FIXME(" TODO: subtype 2 (Class-based Chaining Context Glyph Positioning)\n"); + static int once; + if (!once++) + FIXME(" TODO: subtype 2 (Class-based Chaining Context Glyph Positioning)\n"); continue; } else if (GET_BE_WORD(ccpf3->PosFormat) == 3) diff --git a/reactos/dll/win32/usp10/usp10.c b/reactos/dll/win32/usp10/usp10.c index 102741fbb77..6f90b24efdc 100644 --- a/reactos/dll/win32/usp10/usp10.c +++ b/reactos/dll/win32/usp10/usp10.c @@ -489,23 +489,23 @@ const scriptData scriptInformation[] = { {{Script_Tai_Le, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {0, 0, 1, 0, 1, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, MS_MAKE_TAG('t','a','l','e'), - {'M','i','c','r','o','s','o','f','t',' ','T','a','i',' ','L','e'}}, + {'M','i','c','r','o','s','o','f','t',' ','T','a','i',' ','L','e',0}}, {{Script_New_Tai_Lue, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {0, 0, 1, 0, 1, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, MS_MAKE_TAG('t','a','l','u'), - {'M','i','c','r','o','s','o','f','t',' ','N','e','w',' ','T','a','i',' ','L','u','e'}}, + {'M','i','c','r','o','s','o','f','t',' ','N','e','w',' ','T','a','i',' ','L','u','e',0}}, {{Script_New_Tai_Lue_Numeric, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {0, 0, 1, 0, 1, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, MS_MAKE_TAG('t','a','l','u'), - {'M','i','c','r','o','s','o','f','t',' ','N','e','w',' ','T','a','i',' ','L','u','e'}}, + {'M','i','c','r','o','s','o','f','t',' ','N','e','w',' ','T','a','i',' ','L','u','e',0}}, {{Script_Khmer, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {0x53, 0, 1, 1, 1, DEFAULT_CHARSET, 0, 0, 0, 0, 1, 0, 0, 0, 0}, MS_MAKE_TAG('k','h','m','r'), - {'D','a','u','n','P','e','n','h'}}, + {'D','a','u','n','P','e','n','h',0}}, {{Script_Khmer_Numeric, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {0x53, 1, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, MS_MAKE_TAG('k','h','m','r'), - {'D','a','u','n','P','e','n','h'}}, + {'D','a','u','n','P','e','n','h',0}}, {{Script_CJK_Han, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {LANG_ENGLISH, 0, 0, 0, 0, ANSI_CHARSET, 0, 0, 0, 0, 0, 0, 1, 0, 0}, MS_MAKE_TAG('h','a','n','i'), @@ -529,59 +529,59 @@ const scriptData scriptInformation[] = { {{Script_Yi, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {LANG_ENGLISH, 0, 0, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 1, 0, 0}, MS_MAKE_TAG('y','i',' ',' '), - {'M','i','c','r','o','s','o','f','t',' ','Y','i',' ','B','a','i','t','i'}}, + {'M','i','c','r','o','s','o','f','t',' ','Y','i',' ','B','a','i','t','i',0}}, {{Script_Ethiopic, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {0x5e, 0, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, MS_MAKE_TAG('e','t','h','i'), - {'N','y','a','l','a'}}, + {'N','y','a','l','a',0}}, {{Script_Ethiopic_Numeric, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {0x5e, 1, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, MS_MAKE_TAG('e','t','h','i'), - {'N','y','a','l','a'}}, + {'N','y','a','l','a',0}}, {{Script_Mongolian, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {LANG_MONGOLIAN, 0, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, MS_MAKE_TAG('m','o','n','g'), - {'M','o','n','g','o','l','i','a','n',' ','B','a','i','t','i'}}, + {'M','o','n','g','o','l','i','a','n',' ','B','a','i','t','i',0}}, {{Script_Mongolian_Numeric, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {LANG_MONGOLIAN, 1, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, MS_MAKE_TAG('m','o','n','g'), - {'M','o','n','g','o','l','i','a','n',' ','B','a','i','t','i'}}, + {'M','o','n','g','o','l','i','a','n',' ','B','a','i','t','i',0}}, {{Script_Tifinagh, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {0, 0, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, MS_MAKE_TAG('t','f','n','g'), - {'E','b','r','i','m','a'}}, + {'E','b','r','i','m','a',0}}, {{Script_NKo, 1, 1, 0, 0, 0, 0, { 1,0,0,0,0,0,0,0,0,0,0}}, {0, 0, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, MS_MAKE_TAG('n','k','o',' '), - {'E','b','r','i','m','a'}}, + {'E','b','r','i','m','a',0}}, {{Script_Vai, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {0, 0, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, MS_MAKE_TAG('v','a','i',' '), - {'E','b','r','i','m','a'}}, + {'E','b','r','i','m','a',0}}, {{Script_Vai_Numeric, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {0, 1, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, MS_MAKE_TAG('v','a','i',' '), - {'E','b','r','i','m','a'}}, + {'E','b','r','i','m','a',0}}, {{Script_Cherokee, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {0x5c, 0, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, MS_MAKE_TAG('c','h','e','r'), - {'P','l','a','n','t','a','g','e','n','e','t',' ','C','h','e','r','o','k','e','e'}}, + {'P','l','a','n','t','a','g','e','n','e','t',' ','C','h','e','r','o','k','e','e',0}}, {{Script_Canadian, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {0x5d, 0, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, MS_MAKE_TAG('c','a','n','s'), - {'E','u','p','h','e','m','i','a'}}, + {'E','u','p','h','e','m','i','a',0}}, {{Script_Ogham, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {0, 0, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, MS_MAKE_TAG('o','g','a','m'), - {'S','e','g','o','e',' ','U','I',' ','S','y','m','b','o','l'}}, + {'S','e','g','o','e',' ','U','I',' ','S','y','m','b','o','l',0}}, {{Script_Runic, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {0, 0, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, MS_MAKE_TAG('r','u','n','r'), - {'S','e','g','o','e',' ','U','I',' ','S','y','m','b','o','l'}}, + {'S','e','g','o','e',' ','U','I',' ','S','y','m','b','o','l',0}}, {{Script_Braille, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {LANG_ENGLISH, 0, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, MS_MAKE_TAG('b','r','a','i'), - {'S','e','g','o','e',' ','U','I',' ','S','y','m','b','o','l'}}, + {'S','e','g','o','e',' ','U','I',' ','S','y','m','b','o','l',0}}, {{Script_Surrogates, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {LANG_ENGLISH, 0, 1, 0, 1, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 1, 0, 0}, 0x00000000, @@ -593,19 +593,19 @@ const scriptData scriptInformation[] = { {{Script_Deseret, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {0, 0, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, MS_MAKE_TAG('d','s','r','t'), - {'S','e','g','o','e',' ','U','I',' ','S','y','m','b','o','l'}}, + {'S','e','g','o','e',' ','U','I',' ','S','y','m','b','o','l',0}}, {{Script_Osmanya, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {0, 0, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, MS_MAKE_TAG('o','s','m','a'), - {'E','b','r','i','m','a'}}, + {'E','b','r','i','m','a',0}}, {{Script_Osmanya_Numeric, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {0, 1, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, MS_MAKE_TAG('o','s','m','a'), - {'E','b','r','i','m','a'}}, + {'E','b','r','i','m','a',0}}, {{Script_MathAlpha, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {0, 0, 1, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, MS_MAKE_TAG('m','a','t','h'), - {'C','a','m','b','r','i','a',' ','M','a','t','h'}}, + {'C','a','m','b','r','i','a',' ','M','a','t','h',0}}, {{Script_Hebrew_Currency, 0, 0, 0, 0, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0}}, {LANG_HEBREW, 0, 1, 0, 0, HEBREW_CHARSET, 0, 0, 0, 0, 0, 0, 0, 0, 0}, MS_MAKE_TAG('h','e','b','r'), @@ -1941,9 +1941,8 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc, const void *pString, int cString, if ((dwFlags & SSA_LINK) && !analysis->glyphs[i].fallbackFont && !scriptInformation[analysis->pItem[i].a.eScript].props.fComplex && !analysis->pItem[i].a.fRTL) analysis->pItem[i].a.fNoGlyphIndex = TRUE; - hr = ScriptShape(hdc, sc, &pStr[analysis->pItem[i].iCharPos], - cChar, numGlyphs, &analysis->pItem[i].a, - glyphs, pwLogClust, psva, &numGlyphsReturned); + ScriptShape(hdc, sc, &pStr[analysis->pItem[i].iCharPos], cChar, numGlyphs, + &analysis->pItem[i].a, glyphs, pwLogClust, psva, &numGlyphsReturned); hr = ScriptPlace(hdc, sc, glyphs, numGlyphsReturned, psva, &analysis->pItem[i].a, piAdvance, pGoffset, abc); if (originalFont) @@ -3396,10 +3395,6 @@ HRESULT WINAPI ScriptGetGlyphABCWidth(HDC hdc, SCRIPT_CACHE *psc, WORD glyph, AB * Success: S_OK * Failure: Non-zero HRESULT value. * - * BUGS - * This stub works correctly for any sequence of a single - * embedding level but not for sequences of different - * embedding levels, i.e. mixtures of RTL and LTR scripts. */ HRESULT WINAPI ScriptLayout(int runs, const BYTE *level, int *vistolog, int *logtovis) { diff --git a/reactos/dll/win32/usp10/usp10_internal.h b/reactos/dll/win32/usp10/usp10_internal.h index 093acad7a1c..8d048d838f4 100644 --- a/reactos/dll/win32/usp10/usp10_internal.h +++ b/reactos/dll/win32/usp10/usp10_internal.h @@ -189,7 +189,7 @@ typedef struct { OUTLINETEXTMETRICW *otm; SCRIPT_FONTPROPERTIES sfp; BOOL sfnt; - CacheGlyphPage *page[0x10]; + CacheGlyphPage *page[0x11]; ABC *widths[GLYPH_MAX / GLYPH_BLOCK_SIZE]; LPVOID GSUB_Table; LPVOID GDEF_Table; @@ -228,7 +228,7 @@ static inline BOOL is_consonant( int type ) return (type == lex_Ra || type == lex_Consonant); } -static inline WCHAR get_table_entry( const unsigned short *table, WCHAR ch ) +static inline unsigned short get_table_entry( const unsigned short *table, WCHAR ch ) { return table[table[table[ch >> 8] + ((ch >> 4) & 0x0f)] + (ch & 0xf)]; } diff --git a/reactos/media/doc/README.WINE b/reactos/media/doc/README.WINE index 538bad916dc..a44a115b2c6 100644 --- a/reactos/media/doc/README.WINE +++ b/reactos/media/doc/README.WINE @@ -196,7 +196,7 @@ reactos/dll/win32/unicows # Synced to Wine-1.3.32 (Win9x only, why d reactos/dll/win32/updspapi # Synced to Wine-1.7.27 reactos/dll/win32/url # Synced to Wine-1.7.27 reactos/dll/win32/urlmon # Synced to WineStaging-1.7.37 -reactos/dll/win32/usp10 # Synced to Wine-1.7.27 +reactos/dll/win32/usp10 # Synced to WineStaging-1.7.37 reactos/dll/win32/uxtheme # Forked reactos/dll/win32/vbscript # Synced to Wine-1.7.27 reactos/dll/win32/version # Synced to Wine-1.7.27 -- 2.17.1