http://bugs.winehq.org/show_bug.cgi?id=30506
Bug #: 30506 Summary: Text misrendered in Brain Workshop Product: Wine Version: 1.5.2 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com Classification: Unclassified
The free matching game Brain Workshop http://sourceforge.net/projects/brainworkshop/ downloadable from http://downloads.sourceforge.net/project/brainworkshop/brainworkshop/Brain%2... renders all its "menu" text illegibly. 'winetricks corefonts' doesn't help.
(Yes, there's a Linux version, but that doesn't work on my machine, so I thought I'd try the Windows version under Wine.)
http://bugs.winehq.org/show_bug.cgi?id=30506
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |http://sourceforge.net/proj | |ects/brainworkshop/
http://bugs.winehq.org/show_bug.cgi?id=30506
--- Comment #1 from Dan Kegel dank@kegel.com 2012-04-22 17:25:58 CDT --- Created attachment 39892 --> http://bugs.winehq.org/attachment.cgi?id=39892 Screenshot of main 'menu' showing garbled text
http://bugs.winehq.org/show_bug.cgi?id=30506
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |adys.wh@gmail.com, | |aric@codeweavers.com
--- Comment #2 from Jerome Leclanche adys.wh@gmail.com 2012-04-22 18:24:59 CDT --- cc aric
http://bugs.winehq.org/show_bug.cgi?id=30506
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source
http://bugs.winehq.org/show_bug.cgi?id=30506
--- Comment #3 from Aric Stewart aric@codeweavers.com 2012-04-23 13:42:52 CDT --- There is no evidence that this is using uniscribe at all. I do not think I will be too helpful here.
https://bugs.winehq.org/show_bug.cgi?id=30506
--- Comment #4 from Ken Sharp imwellcushtymelike@gmail.com --- Is this still an issue in Wine 1.7.45 or later?
https://bugs.winehq.org/show_bug.cgi?id=30506
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man@post.com
--- Comment #5 from super_man@post.com --- It didnt render me the garbage at all. Some writing was totally missing. Since winetricks -q corefonts wasnt solving this accroding to comment 1 I tried winetricks -q allfonts. After rerun of the program I get exactly same looking garbage as shown in the picture attached here. So is the font somehow damaged or font loading code somehow broken? What's the conclusion?
So no change
1.7.53(up to date git)
https://bugs.winehq.org/show_bug.cgi?id=30506
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest@luukku.com
--- Comment #6 from winetest@luukku.com --- Regressed with wine 1.9.14-git (cant start), but starts with staging 1.9.14.
The issue is still valid.
https://bugs.winehq.org/show_bug.cgi?id=30506
Damjan Jovanovic damjan.jov@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |damjan.jov@gmail.com
--- Comment #7 from Damjan Jovanovic damjan.jov@gmail.com --- Still an issue in Wine 4.20
The application ships with Python 2.5. A fork of it shows its written in Python too: https://github.com/samcv/brainworkshop/blob/master/brainworkshop.pyw
It uses the Pyglet library for multimedia in Python (https://github.com/pyglet/pyglet).
Pyglet uses OpenGL.
WINEDEBUG='+opengl' wasn't particularly revealing.
I wonder if the Pyglet sample code will have the same bug?
https://bugs.winehq.org/show_bug.cgi?id=30506
--- Comment #8 from Damjan Jovanovic damjan.jov@gmail.com --- Pyglet sample code does reproduce the problem. Even the hello_world.py example shows text corruption.
https://bugs.winehq.org/show_bug.cgi?id=30506
Damjan Jovanovic damjan.jov@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |gdiplus
--- Comment #9 from Damjan Jovanovic damjan.jov@gmail.com --- Source code shows lots of gdiplus usage in pyglet/font/win32.py
Native gdiplus fixes the problem.
Setting component.
https://bugs.winehq.org/show_bug.cgi?id=30506
--- Comment #10 from Damjan Jovanovic damjan.jov@gmail.com --- Pyglet code, font/win32.py, class GDIPlusGlyphRenderer, method render(), is called multiple times, once for each letter.
The section entitled: # Draw character to bitmap calls GdipGraphicsClear() to clear the region to draw on, then GdipDrawString() to render the character in the given font, then locks the bitmap and extracts the pixels.
What we observe if we dump bitmaps in between those steps, is that the first character is drawn correctly. With "Hello world!", the "H" comes out right. But then the next character, "e", begins with the bitmap containing a portion of the "H", and draws on top of the "H", resulting in a corrupted glyph. The "l" draws on top of both "H" and "e".
The problem seems to be the call to GdipGraphicsClear(). It is called as follows: gdiplus.GdipGraphicsClear(self._graphics, 0x00000000)
The 0x00000000 is A R G B fully transparent black.
1. GdipGraphicsClear() creates a solid fill brush with that color and calls GdipFillRectangle() 2. which calls GdipFillRectangles() 3. which adds the rectangle to a path and calls GdipFillPath() 4. which, since there is alpha, calls SOFTWARE_GdipFillPath() 5. which calls GdipFillPath() 6. which calls SOFTWARE_GdipFillPath() 7. which calls GdipFillRegion() 8. which calls SOFTWARE_GdipFillRegion() 9. which creates a memory block, and calls brush_fill_pixels() to fill it with the brush, then calls alpha_blend_pixels_hrgn() to mix it into the background 10. which calls alpha_blend_bmp_pixels() 11. which does nothing as the color is 0x00000000 and:
if (!(src_color & 0xff000000)) continue;
Even if we commented that out, further on, color_over_fgpremult() would ignore the 0x00000000 as it is fully transparent, leaving the background unmodified.
So it seems GdipGraphicsClear() needs to overwrite pixels unconditionally, not alpha blend them into the background.
https://bugs.winehq.org/show_bug.cgi?id=30506
Damjan Jovanovic damjan.jov@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Text misrendered in Brain |GdipGraphicsClear() needs |Workshop |to overwrite pixels, not | |alpha blend (Text | |misrendered in Brain | |Workshop)
https://bugs.winehq.org/show_bug.cgi?id=30506
Damjan Jovanovic damjan.jov@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |3c8784bf9c1a897de021587437c | |5ec4f648c84a1 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #11 from Damjan Jovanovic damjan.jov@gmail.com --- Patches committed, resolving fixed.
https://bugs.winehq.org/show_bug.cgi?id=30506
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #12 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 5.0-rc2.
https://bugs.winehq.org/show_bug.cgi?id=30506
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |4.0.x
https://bugs.winehq.org/show_bug.cgi?id=30506
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|4.0.x |---
--- Comment #13 from Michael Stefaniuc mstefani@winehq.org --- Removing the 4.0.x milestone from bug fixes included in 4.0.4.