Huw D M Davies wrote:
A much better way to do font rendering in Wine is to use the new client side rendering code. For this you need an XServer capable of supporting the RENDER extension (xdpyinfo will tell you whether you have such a beast) and a copy of the FreeType library version at least 2.0.5 (but the later the better). Add a [FontDirs] section to your ~/.wine/config file, with entries pointing at any directories that contain TT fonts...
This got me to try out the client side rendering. It really does make the fonts (in MS Word in particular) not suck! Nice job. Guess I will stick with this configuration.
I came across two issues. The first is that virtually all dialogs and some windows were being drawn too narrow. The window/dialog height was normal. Looking at traces with and without the client side rendering, I saw this difference:
Server rendering: trace:dialog:DIALOG_ParseTemplate32 DIALOG 0, 0, 287, 165, 0 trace:dialog:DIALOG_ParseTemplate32 STYLE 0x80c820c0 trace:dialog:DIALOG_ParseTemplate32 EXSTYLE 0x00000000 trace:dialog:DIALOG_ParseTemplate32 CAPTION L"Open" trace:dialog:DIALOG_ParseTemplate32 FONT 8, L"helv", 0, FALSE trace:font:WineEngCreateFontInstance L"System", h=16, it=0, weight=400, PandF=22, charset=0 orient 0 escapement 0 ... trace:font:XFONT_GetAvgCharWidth retuning 6 trace:font:XFONT_RealizeFont physfont 3 trace:font:GetTextMetricsW text metrics: Weight = 400 FirstChar = 0 AveCharWidth = 6
Client rendering: trace:dialog:DIALOG_ParseTemplate32 DIALOG 0, 0, 287, 165, 0 trace:dialog:DIALOG_ParseTemplate32 STYLE 0x80c820c0 trace:dialog:DIALOG_ParseTemplate32 EXSTYLE 0x00000000 trace:dialog:DIALOG_ParseTemplate32 CAPTION L"Open" trace:dialog:DIALOG_ParseTemplate32 FONT 8, L"helv", 0, FALSE ... trace:font:WineEngCreateFontInstance L"helv", h=-10, it=0, weight=0, PandF=00, charset=1 orient 0 escapement 0 ... trace:font:WineEngGetTextMetrics OS/2 winA = 1854 winD = 434 typoA = 1491 typoD = -431 typoLG = 307 FT_Face a = 1854, d = -434, h = 2355: HORZ a = 1854, d = -434 lg = 67 maxY = 2124 minY = -665 trace:font:WineEngGetTextMetrics xAvgCharWidth 904 x_scale 20480 tmAvgCharWidth 4 trace:font:GetTextMetricsW text metrics: Weight = 400 FirstChar = 32 AveCharWidth = 4
Suspecting the average char width, but not understanding the code that generates it, I cheated. In WineEngGetTextMetrics(), I added: if (ptm->tmAveCharWidth == 4) ptm->tmAveCharWidth = 6;
And this fixes all the dialogs and windows for me.
The other problem I ran across is shown in these pictures, showing server and client side rendering. My little hack above had no effect on this particular problem. http://www.leewardfpga.com/server.png http://www.leewardfpga.com/client.png
As can be seen, the vertical text is getting chopped off slightly.
The font with the problem is Tahoma, and this is with a ~/.wine/config that contains
[fonts] "Resolution" = "96" "Default" = "-adobe-times-" "DefaultFixed" = "fixed" "DefaultSerif" = "-monotype-times new roman-" "DefaultSansSerif" = "-microsoft-tahoma-"
On Mon, 25 Mar 2002, Duane Clark wrote: [...]
The other problem I ran across is shown in these pictures, showing server and client side rendering. My little hack above had no effect on this particular problem. http://www.leewardfpga.com/server.png http://www.leewardfpga.com/client.png
This looks like a FreeType bug. Slashdot had a story about this some time ago and I believe it was related to anti-aliasing. Disabling anti-aliasing, or better, upgrading the FreeType library may fix this problem.
-- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ "Only wimps use tape backup: _real_ men just upload their important stuff on ftp, and let the rest of the world mirror it ;)" -- Linus Torvalds
On Mon, Mar 25, 2002 at 08:26:31PM -0800, Duane Clark wrote:
Huw D M Davies wrote:
A much better way to do font rendering in Wine is to use the new client side rendering code. For this you need an XServer capable of supporting the RENDER extension (xdpyinfo will tell you whether you have such a beast) and a copy of the FreeType library version at least 2.0.5 (but the later the better). Add a [FontDirs] section to your ~/.wine/config file, with entries pointing at any directories that contain TT fonts...
This got me to try out the client side rendering.
Good, that was the idea :)
I came across two issues. The first is that virtually all dialogs and some windows were being drawn too narrow. The window/dialog height was normal.
Actaully it's the code that calculates the size of the dialog units that's wrong. Give me a couple of days and I'll dig out my patch.
The other problem I ran across is shown in these pictures, showing server and client side rendering. My little hack above had no effect on this particular problem. http://www.leewardfpga.com/server.png http://www.leewardfpga.com/client.png
As can be seen, the vertical text is getting chopped off slightly.
As Francois says this maybe a FreeType bug (versions < 2.0.6 have errors calculating the advance width of certain glyphs. If you could upgrade FreeType and test again that would be very helpful, if it's still a problem we'll take it from there.
Thanks,
Huw.
Huw D M Davies wrote:
On Mon, Mar 25, 2002 at 08:26:31PM -0800, Duane Clark wrote:
The other problem I ran across is shown in these pictures, showing server and client side rendering. My little hack above had no effect on this particular problem. http://www.leewardfpga.com/server.png http://www.leewardfpga.com/client.png
As can be seen, the vertical text is getting chopped off slightly.
As Francois says this maybe a FreeType bug (versions < 2.0.6 have errors calculating the advance width of certain glyphs. If you could upgrade FreeType and test again that would be very helpful, if it's still a problem we'll take it from there.
I was using FreeType 2.0.6, but I went ahead and upgraded to 2.0.9. It still looks the same though (slightly cut off).
On Tue, Mar 26, 2002 at 08:35:51AM -0800, Duane Clark wrote:
Huw D M Davies wrote:
On Mon, Mar 25, 2002 at 08:26:31PM -0800, Duane Clark wrote:
The other problem I ran across is shown in these pictures, showing server and client side rendering. My little hack above had no effect on this particular problem. http://www.leewardfpga.com/server.png http://www.leewardfpga.com/client.png
As can be seen, the vertical text is getting chopped off slightly.
As Francois says this maybe a FreeType bug (versions < 2.0.6 have errors calculating the advance width of certain glyphs. If you could upgrade FreeType and test again that would be very helpful, if it's still a problem we'll take it from there.
I was using FreeType 2.0.6, but I went ahead and upgraded to 2.0.9. It still looks the same though (slightly cut off).
Could you send me a --debugmsg +relay=gdi32,+font,+xrender,+text log for this please?
Thanks,
Huw.