http://bugs.winehq.org/show_bug.cgi?id=10933
Summary: PAF 5 unicode font displays with inconsistent size Product: Wine Version: 0.9.52. Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-misc AssignedTo: wine-bugs@winehq.org ReportedBy: rm.riches@verizon.net
Created an attachment (id=9857) --> (http://bugs.winehq.org/attachment.cgi?id=9857) GEDCOM containing only Fred Flintstone
In the Family and Pedigree tabs, the international unicode font supplied by PAF 5 displays with apparently random sizes. This symptom is new with Wine 0.9.52. With Wine 0.9.50, font sizes were consistent. (The installer failed with Wine 0.9.51.)
To reproduce the problem, do one of the following:
First, in the Family tab, observe "Marriage" has obviously inconsistent font sizing.
Second, create a new person, named "Fred Flintstone" and observe his name showing with inconsistent font sizing in both the Family and Pedigree tabs.
Third, import the GEDCOM file I am about to attach. Observe Fred's name in the Family and Pedigree tabs, plus "Marriage" in the Family tab.
http://bugs.winehq.org/show_bug.cgi?id=10933
Clinton Stimpson cjstimpson@utwire.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |cjstimpson@utwire.net Status|UNCONFIRMED |NEW Component|wine-misc |wine-usp10.dll Ever Confirmed|0 |1
--- Comment #1 from Clinton Stimpson cjstimpson@utwire.net 2008-01-01 12:55:16 ---
Regression caused by this commit: http://source.winehq.org/git/wine.git/?a=commit;h=68efae1615aa2e40672bd0b195...
It may be useful to note that Paf doesn't use usp10 to draw the text, it only uses usp10 to compute text widths.
http://bugs.winehq.org/show_bug.cgi?id=10933
Hans Leidekker hans@it.vu.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hans@it.vu.nl
--- Comment #2 from Hans Leidekker hans@it.vu.nl 2008-01-01 15:11:41 --- Notice that with native usp10 spacing for the word 'Marriage' is too dense. It looks worse with builtin though, I'll look into it.
Reporter, what do you mean by 'international unicode font supplied by PAF'? I can't find it. This is the binary I used to install PAF:
5e222554fd00c638accd9876947a0106 PAF5EnglishSetup.exe
Lastly, the sample GEDCOM file makes PAF dump core when I open it.
http://bugs.winehq.org/show_bug.cgi?id=10933
--- Comment #3 from Robert Riches rm.riches@verizon.net 2008-01-01 15:25:47 --- Thank you for looking into this.
The "international unicode font supplied by PAF" is contained in b91c842ccbe5adbddf3fc2f894772f7c PAF5AllLangs.exe which is also available for download as http://ftp.ldscatalog.com/PAF5AllLangs.exe
Follow the installation HowTo on the AppDB page http://appdb.winehq.org/appview.php?iVersionId=1706 and select the international unicode font during installation.
The GEDCOM file can't be opened directly. You need to use File->New to create a new empty DB and then File->import the GEDCOM file into it.
http://bugs.winehq.org/show_bug.cgi?id=10933
Hans Leidekker hans@it.vu.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|usp10 |gdi32
--- Comment #4 from Hans Leidekker hans@it.vu.nl 2008-01-09 03:49:31 --- I've been digging around for while and I've come to the conclusion that this is a gdi32 or freetype bug. The first hint is that spacing is off when you use native usp10 with Wine, like I said earlier. To confirm that our usp10 is not the culprit I cross compiled a PE version to try on Windows and indeed, rendering is correct when I use that.
http://bugs.winehq.org/show_bug.cgi?id=10933
--- Comment #5 from Hans Leidekker hans@it.vu.nl 2008-01-09 03:59:48 ---
It may be useful to note that Paf doesn't use usp10 to draw the text, it only uses usp10 to compute text widths.
Do you know why?
http://bugs.winehq.org/show_bug.cgi?id=10933
--- Comment #6 from Luke Bratch l_bratch@yahoo.co.uk 2008-01-10 04:46:11 --- Clinton, please post in Bugzilla, don't reply to wine-bugs. Email read:
"I don't really know why it doesn't use usp10 to draw, but I can guess it uses it to compute widths as it needs to successively abbreviate text until it fits in a given rectangle.
Clinton"
http://bugs.winehq.org/show_bug.cgi?id=10933
--- Comment #7 from Clinton Stimpson cjstimpson@utwire.net 2008-02-27 01:23:52 --- In winex11.drv/xrender.c, line 1255 it has
for(idx = 0; idx < count; idx++) { if( !formatEntry ) { UploadGlyph(physDev, wstr[idx], aa_type); /* re-evaluate antialias since aa_default may have changed */ if( disable_antialias == FALSE ) aa_type = entry->aa_default; formatEntry = entry->format[aa_type]; } else if( wstr[idx] >= formatEntry->nrealized || formatEntry->realized[wstr[idx]] == FALSE) { UploadGlyph(physDev, wstr[idx], aa_type); }
The variable font size is caused by not calling UploadGlyph on each character (some are skipped). If I force it to call UploadGlyph on every character (without knowing the correct fix), then the font size is consistent in this program.
http://bugs.winehq.org/show_bug.cgi?id=10933
--- Comment #8 from Clinton Stimpson cjstimpson@utwire.net 2008-02-28 18:22:35 --- Created an attachment (id=11029) --> (http://bugs.winehq.org/attachment.cgi?id=11029) xrender-patch
This patch fixes the problem. It seemed like the glyph cache was a bit inconsistent about using -1 or 0 or an unused entry in the cache. The patch makes an unused entry zero.
Can someone review this patch?
http://bugs.winehq.org/show_bug.cgi?id=10933
Hans Leidekker hans@it.vu.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|gdi32 |winex11.drv
--- Comment #9 from Hans Leidekker hans@it.vu.nl 2008-03-01 08:18:20 --- I tried your patch, it fixes the problem of inconsistent font sizes for me too, although it looks like the word 'Marriage' is now rendered too large? It doesn't fit in its box; the 'g' lost its tail. What intrigues me is why this bug hasn't shown up before. Do you have a theory?
Please send the patch to wine-patches for wider review (make sure to include a reference to this bug).
http://bugs.winehq.org/show_bug.cgi?id=10933
--- Comment #10 from Clinton Stimpson cjstimpson@utwire.net 2008-03-01 11:43:56 --- The word "Marriage:" fits just fine for me. After making the patch I also wondered why this bug hasn't shown up before. But at least I know its related to some changes in usp10 where some additional SelectFont() calls were introduced. Part of me thinks this is possibly related to nested painting this app does (UpdateWindow() within a paint event). What concerns me now is that the cache hit rate is pretty low after this patch, even with other apps I checked. I want to look at this a bit more and see if I'm missing the real problem, before sending to wine-patches.
http://bugs.winehq.org/show_bug.cgi?id=10933
--- Comment #11 from Robert Riches rm.riches@verizon.net 2008-03-01 13:50:21 --- FWIW, the patch appears to work fine for me, using 0.9.56.
The word "Marriage:" fits just fine for me. (I'm using Mandriva 2008 at 1600x1200 with 24 bit color, about 100dpi, using the PAF-supplied international Unicode font.)
http://bugs.winehq.org/show_bug.cgi?id=10933
--- Comment #12 from Hans Leidekker hans@it.vu.nl 2008-03-01 16:22:12 --- I generated two +xrender traces, one before and one after applying your patch, to quantify the cache rate drop:
$ grep "LookupEntry found font in cache" paf-before.log | wc -l 1385 $ grep "LookupEntry font not in cache" paf-before.log | wc -l 369
$ grep "LookupEntry found font in cache" paf-after.log | wc -l 648 $ grep "LookupEntry font not in cache" paf-after.log | wc -l 1130
http://bugs.winehq.org/show_bug.cgi?id=10933
Sam Liddicott sam@liddicott.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sam@liddicott.com
http://bugs.winehq.org/show_bug.cgi?id=10933
--- Comment #13 from Robert Riches rm.riches@verizon.net 2008-05-02 22:51:01 --- Is there a way to make progress on this regression during the march toward 1.0?
http://bugs.winehq.org/show_bug.cgi?id=10933
--- Comment #14 from Robert Riches rm.riches@verizon.net 2008-06-29 20:40:45 --- I just saw a screenshot of development version 1.1.0 running PAF 5, and it has something that looks similar but much worse. I also hear the problem on 1.1.0 shows up on many other applications. (Sorry, but I'm swamped and can't try 1.1.0 myself.) I have not heard whether a bug report has been filed for that problem. I wonder whether Clinton Stimpson's xrender-patch (attached 2/28/08) might be applicable to the new alleged problem.
Back on this particular problem (which shows up on every version from 0.9.52 to 1.0, inclusive), I wonder whether the reduction in glyph cache hit rate caused by the patch might be mostly or entirely things that _SHOULD_ miss the cache, and that the erroneous cache hits might be those characters that are incorrectly rendered.
http://bugs.winehq.org/show_bug.cgi?id=10933
--- Comment #15 from Clinton Stimpson cjstimpson@utwire.net 2008-06-29 21:43:40 --- The xrender-patch is not entirely correct (or maybe not correct at all).
I haven't had much time to look at this, but I got as far as a possible hint towards gdi being part of the problem and that possibly xrender and gdi are out of sync with respect to the current font.
It looks worse when the main window is larger. So the screenshot you saw might be from a higher resolution monitor.
http://bugs.winehq.org/show_bug.cgi?id=10933
--- Comment #16 from Robert Riches rm.riches@verizon.net 2008-06-29 21:51:22 --- (Sorry for not being specific enough in the first comment.)
Actually, what was worse in the screenshot I saw from development version 1.1.0 was the characters appeared to be replaced by punctuation or something else too small to distinguish even with Gimp magnifying the screenshot to the point that individual pixels were large. From 0.9.52 through 1.0, the characters appeared to be correct, just the wrong size.
http://bugs.winehq.org/show_bug.cgi?id=10933
--- Comment #17 from djrpublic@cfl.rr.com 2008-06-30 18:27:26 --- Created an attachment (id=14494) --> (http://bugs.winehq.org/attachment.cgi?id=14494) pedigree tree from Ancestral Quest
http://bugs.winehq.org/show_bug.cgi?id=10933
--- Comment #18 from djrpublic@cfl.rr.com 2008-06-30 18:28:53 --- Created an attachment (id=14495) --> (http://bugs.winehq.org/attachment.cgi?id=14495) pedigree display page from PAF 5.2
http://bugs.winehq.org/show_bug.cgi?id=10933
djrpublic@cfl.rr.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |djrpublic@cfl.rr.com
--- Comment #19 from djrpublic@cfl.rr.com 2008-06-30 18:32:38 --- My system is Ubuntu 8.04 - Wine 1.1.0
I've previously attached screen shots from Ancestral Quest 11 and PAF 5.2 screen showing an individual's pedigree. Why the bug application won't let me make a comment and attach a screen shot is way beyond me! As you can see this screen is completely useless.
With Wine 1.0.0 the letter sizes were inconsistent - some too small and some too large and some bold - but at least they were readable. I have tried a couple of other TT fonts, a fixed width TT font and an, I think, bitmapped font with the same outcome.
http://bugs.winehq.org/show_bug.cgi?id=10933
--- Comment #20 from Clinton Stimpson cjstimpson@utwire.net 2008-07-07 09:51:18 --- I see the incorrect font sizing in the pedigree view too, whereas it used to be that only the family view had the problem. I don't know if the application intends to use two fonts to draw the text, but there are two freetype font instances. When resizing the main window, one font scales proportionately, and the other doesn't in both the family view and pedigree view. This behavior seems to indicate that the inconsistent text sizing in the family view and pedigree view are related, even though the pedigree view didn't have problems until now.
Anyway, some of the text in the pedigree view now shows upside down and in a different size, which was caused by this commit.
commit df76fe6f0cdd55568ba67489cc725813804061fd Author: Dmitry Timoshkov dmitry@codeweavers.com Date: Tue Jun 24 16:11:40 2008 +0900 gdi32: Perform the world transform separately from font scaling.
http://bugs.winehq.org/show_bug.cgi?id=10933
djrpublic@cfl.rr.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #14494|0 |1 is obsolete| | Attachment #14495|0 |1 is obsolete| |
--- Comment #21 from djrpublic@cfl.rr.com 2008-07-13 09:23:34 --- Created an attachment (id=14786) --> (http://bugs.winehq.org/attachment.cgi?id=14786) showing vastly improved display
Wine 1.1.1 goes a long way toward increased usability for Ancestral Quest and PAF. Many thanks to all who contributed.
I've sent these 2 screens to show both the improvement and how the choice of font will change the display quality. After fooling a bit around I've settled on the Bitstream Vera fonts.
Again - THANKS ;-)
http://bugs.winehq.org/show_bug.cgi?id=10933
--- Comment #22 from Robert Riches rm.riches@verizon.net 2008-07-25 23:18:57 --- Using the PAF-supplied international unicode font, the font size inconsistency problem is still very much apparent for me with Wine version 1.1.2.
http://bugs.winehq.org/show_bug.cgi?id=10933
--- Comment #23 from Clinton Stimpson cjstimpson@utwire.net 2008-10-01 22:52:30 --- Created an attachment (id=16410) --> (http://bugs.winehq.org/attachment.cgi?id=16410) testfont.c
Finally, a simple way to reproduce this bug!
In the child window, the string that is rendered has inconsistent sizes.
The parent draws some text, and the same HFONT is used by the child. In the painting the child, it changes the viewport mapping, selects a font, resets the viewport mapping, then renders the text. The behavior on Windows is to draw text the size specified when the font was selected. That means the xrender-path previously attached is consistently getting the wrong size, by rebuilding the cache with the wrong sizes.
Next is to test the gdi functions to how they behave in this case, to see whether gdi or winex11.drv needs fixing.
http://bugs.winehq.org/show_bug.cgi?id=10933
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |testcase
--- Comment #24 from Austin English austinenglish@gmail.com 2008-10-02 13:10:56 --- Bonus points if you can add that testcase to the wine testsuite.
http://bugs.winehq.org/show_bug.cgi?id=10933
--- Comment #25 from Dmitry Timoshkov dmitry@codeweavers.com 2008-10-02 13:39:37 --- Please retest with today's Wine git.
http://bugs.winehq.org/show_bug.cgi?id=10933
Clinton Stimpson cjstimpson@utwire.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #16410|0 |1 is obsolete| |
--- Comment #26 from Clinton Stimpson cjstimpson@utwire.net 2008-10-02 14:49:24 --- Created an attachment (id=16428) --> (http://bugs.winehq.org/attachment.cgi?id=16428) testfont.c
It is fixed in today's git with commit: b31d7dbe8e41f20243a2d8c22c079985d730f7a6
I uploaded the wrong test case. Here's the correct one, which can be modified to go in the test suite if you need a test for your commit, Dmitry.
http://bugs.winehq.org/show_bug.cgi?id=10933
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #27 from Dmitry Timoshkov dmitry@codeweavers.com 2008-10-02 14:56:46 --- (In reply to comment #26)
It is fixed in today's git with commit: b31d7dbe8e41f20243a2d8c22c079985d730f7a6
I uploaded the wrong test case. Here's the correct one, which can be modified to go in the test suite if you need a test for your commit, Dmitry.
Thanks for testing, and thanks for the sample code, I'll use it as a base for the test case.
http://bugs.winehq.org/show_bug.cgi?id=10933
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #28 from Alexandre Julliard julliard@winehq.org 2008-10-10 10:09:06 --- Closing bugs fixed in 1.1.6.
http://bugs.winehq.org/show_bug.cgi?id=10933
--- Comment #29 from djrpublic@cfl.rr.com 2008-10-11 08:21:06 --- Here's a BIG helping of THANKS to all who aided in the resolution of this bug.
David Rowell
http://bugs.winehq.org/show_bug.cgi?id=10933
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |b31d7dbe8e41f20243a2d8c22c0 | |79985d730f7a6