[OpenGL] Fix font rendering.
Lionel Ulmer
lionel.ulmer at free.fr
Sat Feb 21 06:36:34 CST 2004
Changelog:
- use the NULL matrix instead of giving a badly filled identity matrix
--
Lionel Ulmer - http://www.bbrox.org/
-------------- next part --------------
Index: dlls/opengl32/wgl.c
===================================================================
RCS file: /home/wine/wine/dlls/opengl32/wgl.c,v
retrieving revision 1.45
diff -u -r1.45 wgl.c
--- dlls/opengl32/wgl.c 12 Feb 2004 00:35:01 -0000 1.45
+++ dlls/opengl32/wgl.c 21 Feb 2004 12:35:00 -0000
@@ -520,7 +520,6 @@
{
/* We are running using client-side rendering fonts... */
GLYPHMETRICS gm;
- static const MAT2 id = { { 0, 1 }, { 0, 0 }, { 0, 0 }, { 0, 0 } };
int glyph;
int size = 0;
void *bitmap = NULL, *gl_bitmap = NULL;
@@ -532,10 +531,20 @@
LEAVE_GL();
for (glyph = first; glyph < first + count; glyph++) {
- int needed_size = GetGlyphOutline_ptr(hdc, glyph, GGO_BITMAP, &gm, 0, NULL, &id);
+ int needed_size = GetGlyphOutline_ptr(hdc, glyph, GGO_BITMAP, &gm, 0, NULL, NULL);
int height, width_int;
-
- if (needed_size == GDI_ERROR) goto error;
+
+ TRACE("Glyph : %d\n", glyph);
+ if (needed_size == GDI_ERROR) {
+ TRACE(" - needed size : %d (GDI_ERROR)\n", needed_size);
+ goto error;
+ } else {
+ TRACE(" - needed size : %d\n", needed_size);
+ if (needed_size == 0) {
+ continue;
+ }
+ }
+
if (needed_size > size) {
size = needed_size;
if (bitmap) HeapFree(GetProcessHeap(), 0, bitmap);
@@ -543,16 +552,14 @@
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, &id) == GDI_ERROR) goto error;
+ if (GetGlyphOutline_ptr(hdc, glyph, GGO_BITMAP, &gm, size, bitmap, NULL) == GDI_ERROR) goto error;
if (TRACE_ON(opengl)) {
unsigned int height, width, bitmask;
unsigned char *bitmap_ = (unsigned char *) bitmap;
- DPRINTF("Glyph : %d\n", glyph);
DPRINTF(" - bbox : %d x %d\n", gm.gmBlackBoxX, gm.gmBlackBoxY);
DPRINTF(" - origin : (%ld , %ld)\n", gm.gmptGlyphOrigin.x, gm.gmptGlyphOrigin.y);
DPRINTF(" - increment : %d - %d\n", gm.gmCellIncX, gm.gmCellIncY);
- DPRINTF(" - size : %d\n", needed_size);
DPRINTF(" - bitmap : \n");
for (height = 0; height < gm.gmBlackBoxY; height++) {
DPRINTF(" ");
More information about the wine-patches
mailing list