Commit f6230530 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

winex11.drv: The MAT2 parameter of GetGlyphOutline is mandatory.

parent 118c75a8
...@@ -1902,7 +1902,8 @@ static BOOL internal_wglUseFontBitmaps(HDC hdc, DWORD first, DWORD count, DWORD ...@@ -1902,7 +1902,8 @@ static BOOL internal_wglUseFontBitmaps(HDC hdc, DWORD first, DWORD count, DWORD
wine_tsx11_unlock(); wine_tsx11_unlock();
for (glyph = first; glyph < first + count; glyph++) { for (glyph = first; glyph < first + count; glyph++) {
unsigned int needed_size = GetGlyphOutline_ptr(hdc, glyph, GGO_BITMAP, &gm, 0, NULL, NULL); static const MAT2 identity = { {0,1},{0,0},{0,0},{0,1} };
unsigned int needed_size = GetGlyphOutline_ptr(hdc, glyph, GGO_BITMAP, &gm, 0, NULL, &identity);
unsigned int height, width_int; unsigned int height, width_int;
TRACE("Glyph : %3d / List : %d\n", glyph, listBase); TRACE("Glyph : %3d / List : %d\n", glyph, listBase);
...@@ -1920,7 +1921,8 @@ static BOOL internal_wglUseFontBitmaps(HDC hdc, DWORD first, DWORD count, DWORD ...@@ -1920,7 +1921,8 @@ static BOOL internal_wglUseFontBitmaps(HDC hdc, DWORD first, DWORD count, DWORD
bitmap = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); bitmap = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
gl_bitmap = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); gl_bitmap = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
} }
if (GetGlyphOutline_ptr(hdc, glyph, GGO_BITMAP, &gm, size, bitmap, NULL) == GDI_ERROR) goto error; if (GetGlyphOutline_ptr(hdc, glyph, GGO_BITMAP, &gm, size, bitmap, &identity) == GDI_ERROR)
goto error;
if (TRACE_ON(wgl)) { if (TRACE_ON(wgl)) {
unsigned int height, width, bitmask; unsigned int height, width, bitmask;
unsigned char *bitmap_ = bitmap; unsigned char *bitmap_ = bitmap;
......
...@@ -666,6 +666,7 @@ static BOOL UploadGlyph(X11DRV_PDEVICE *physDev, int glyph, AA_Type format) ...@@ -666,6 +666,7 @@ static BOOL UploadGlyph(X11DRV_PDEVICE *physDev, int glyph, AA_Type format)
XRenderPictFormat pf; XRenderPictFormat pf;
unsigned long pf_mask; unsigned long pf_mask;
static const char zero[4]; static const char zero[4];
static const MAT2 identity = { {0,1},{0,0},{0,0},{0,1} };
switch(format) { switch(format) {
case AA_Grey: case AA_Grey:
...@@ -691,15 +692,13 @@ static BOOL UploadGlyph(X11DRV_PDEVICE *physDev, int glyph, AA_Type format) ...@@ -691,15 +692,13 @@ static BOOL UploadGlyph(X11DRV_PDEVICE *physDev, int glyph, AA_Type format)
break; break;
} }
buflen = GetGlyphOutlineW(physDev->hdc, glyph, ggo_format, &gm, 0, NULL, buflen = GetGlyphOutlineW(physDev->hdc, glyph, ggo_format, &gm, 0, NULL, &identity);
NULL);
if(buflen == GDI_ERROR) { if(buflen == GDI_ERROR) {
if(format != AA_None) { if(format != AA_None) {
format = AA_None; format = AA_None;
entry->aa_default = AA_None; entry->aa_default = AA_None;
ggo_format = GGO_GLYPH_INDEX | GGO_BITMAP; ggo_format = GGO_GLYPH_INDEX | GGO_BITMAP;
buflen = GetGlyphOutlineW(physDev->hdc, glyph, ggo_format, &gm, 0, NULL, buflen = GetGlyphOutlineW(physDev->hdc, glyph, ggo_format, &gm, 0, NULL, &identity);
NULL);
} }
if(buflen == GDI_ERROR) { if(buflen == GDI_ERROR) {
WARN("GetGlyphOutlineW failed\n"); WARN("GetGlyphOutlineW failed\n");
...@@ -800,7 +799,7 @@ static BOOL UploadGlyph(X11DRV_PDEVICE *physDev, int glyph, AA_Type format) ...@@ -800,7 +799,7 @@ static BOOL UploadGlyph(X11DRV_PDEVICE *physDev, int glyph, AA_Type format)
buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, buflen); buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, buflen);
GetGlyphOutlineW(physDev->hdc, glyph, ggo_format, &gm, buflen, buf, NULL); GetGlyphOutlineW(physDev->hdc, glyph, ggo_format, &gm, buflen, buf, &identity);
formatEntry->realized[glyph] = TRUE; formatEntry->realized[glyph] = TRUE;
TRACE("buflen = %d. Got metrics: %dx%d adv=%d,%d origin=%d,%d\n", TRACE("buflen = %d. Got metrics: %dx%d adv=%d,%d origin=%d,%d\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment