{
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])
* 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);
+ 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++;
+ }
+ }
- /* FIXME */
- for (i = 0; i < nbchars; i++) widths[i] = glyph_width[i];
return S_OK;
}
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