Author: akhaldi Date: Thu Nov 17 23:13:09 2016 New Revision: 73296
URL: http://svn.reactos.org/svn/reactos?rev=73296&view=rev Log: [USP10] Sync with Wine Staging 1.9.23. CORE-12409
Modified: trunk/reactos/dll/win32/usp10/usp10.c trunk/reactos/dll/win32/usp10/usp10_internal.h trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/usp10/usp10.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/usp10/usp10.c?rev... ============================================================================== --- trunk/reactos/dll/win32/usp10/usp10.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/usp10/usp10.c [iso-8859-1] Thu Nov 17 23:13:09 2016 @@ -1008,7 +1008,7 @@ { heap_free(((ScriptCache *)*psc)->widths[i]); } - for (i = 0; i < 0x10; i++) + for (i = 0; i < NUM_PAGES; i++) { unsigned int j; if (((ScriptCache *)*psc)->page[i]) @@ -3879,16 +3879,33 @@ * Failure: a non-zero HRESULT. */ HRESULT WINAPI ScriptGetLogicalWidths(const SCRIPT_ANALYSIS *sa, int nbchars, int nbglyphs, - const int *glyph_width, const WORD *log_clust, + const int *advances, const WORD *log_clust, const SCRIPT_VISATTR *sva, int *widths) { - int i; + int i, next = 0, direction;
TRACE("(%p, %d, %d, %p, %p, %p, %p)\n", - sa, nbchars, nbglyphs, glyph_width, log_clust, sva, widths); - - /* FIXME */ - for (i = 0; i < nbchars; i++) widths[i] = glyph_width[i]; + sa, nbchars, nbglyphs, advances, log_clust, sva, widths); + + if (sa->fRTL && !sa->fLogicalOrder) + direction = -1; + else + direction = 1; + + for (i = 0; i < nbchars; i++) + { + int clust_size = get_cluster_size(log_clust, nbchars, i, direction, NULL, NULL); + int advance = get_glyph_cluster_advance(advances, sva, log_clust, nbglyphs, nbchars, log_clust[i], direction); + int j; + + for (j = 0; j < clust_size; j++) + { + widths[next] = advance / clust_size; + next++; + if (j) i++; + } + } + return S_OK; }
Modified: trunk/reactos/dll/win32/usp10/usp10_internal.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/usp10/usp10_inter... ============================================================================== --- trunk/reactos/dll/win32/usp10/usp10_internal.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/usp10/usp10_internal.h [iso-8859-1] Thu Nov 17 23:13:09 2016 @@ -145,6 +145,8 @@ #define GLYPH_BLOCK_MASK (GLYPH_BLOCK_SIZE - 1) #define GLYPH_MAX 65536
+#define NUM_PAGES 17 + #define GSUB_E_NOFEATURE -2 #define GSUB_E_NOGLYPH -1
@@ -189,7 +191,7 @@ OUTLINETEXTMETRICW *otm; SCRIPT_FONTPROPERTIES sfp; BOOL sfnt; - CacheGlyphPage *page[0x11]; + CacheGlyphPage *page[NUM_PAGES]; ABC *widths[GLYPH_MAX / GLYPH_BLOCK_SIZE]; LPVOID GSUB_Table; LPVOID GDEF_Table;
Modified: trunk/reactos/media/doc/README.WINE URL: http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=7... ============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Thu Nov 17 23:13:09 2016 @@ -189,7 +189,7 @@ reactos/dll/win32/updspapi # Synced to WineStaging-1.9.11 reactos/dll/win32/url # Synced to WineStaging-1.9.11 reactos/dll/win32/urlmon # Synced to WineStaging-1.9.23 -reactos/dll/win32/usp10 # Synced to WineStaging-1.9.16 +reactos/dll/win32/usp10 # Synced to WineStaging-1.9.23 reactos/dll/win32/uxtheme # Forked reactos/dll/win32/vbscript # Synced to WineStaging-1.9.11 reactos/dll/win32/version # Synced to WineStaging-1.9.11