Closed
Bug 549661
Opened 14 years ago
Closed 13 years ago
[D2D] Direct2D doesn't handle light text on dark background well
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: bugzilla1, Unassigned)
References
()
Details
Attachments
(3 files)
15.15 KB,
image/png
|
Details | |
54.47 KB,
image/png
|
Details | |
1.35 KB,
patch
|
Details | Diff | Splinter Review |
Looking at www.pre-school.org.uk, the menu and footer text appears very bold and blocky compared to normal rendering. Screenshot coming up
Reporter | ||
Comment 1•14 years ago
|
||
Minefield on the left, IE on the right
Reporter | ||
Comment 2•14 years ago
|
||
Minefield on the bottom, IE on the top
Comment 3•14 years ago
|
||
Please confirm this was also with D2D switched on.
Reporter | ||
Comment 4•14 years ago
|
||
(In reply to comment #3) > Please confirm this was also with D2D switched on. Yes it was
Comment 5•14 years ago
|
||
Adjusting title to what's going on here. Not this is also hardware dependent, I'm seeing this on my NVidia, but not on my ATI card.
Alias: [D2D]
Summary: Directwrite mode doesn't handle white text well → Direct2D doesn't handle light text on dark background well
Updated•14 years ago
|
Updated•14 years ago
|
Alias: [D2D]
Summary: Direct2D doesn't handle light text on dark background well → [D2D] Direct2D doesn't handle light text on dark background well
Reporter | ||
Comment 6•14 years ago
|
||
(In reply to comment #5) > Adjusting title to what's going on here. Not this is also hardware dependent, > I'm seeing this on my NVidia, but not on my ATI card. Interesting, as I have an ATI (Radeon 3870)
Comment 7•14 years ago
|
||
Just as a note on this bug, this happens on IE9 Testdrive as well, so presumably it's something D2D.
Reporter | ||
Comment 8•14 years ago
|
||
(In reply to comment #7) > Just as a note on this bug, this happens on IE9 Testdrive as well, so > presumably it's something D2D. Sigh. Do you have any contacts at MSFT who might be able to shed light on this (e.g. by design, known bug) In any case if it's an OS-level issue, I won't object if this gets resolved WONTFIX/INVALID.
Reporter | ||
Comment 9•14 years ago
|
||
(In reply to comment #7) > Just as a note on this bug, this happens on IE9 Testdrive as well, so > presumably it's something D2D. http://blogs.msdn.com/ie/archive/2010/04/26/feedback-on-the-ie9-platform-preview.aspx says "In addition, we are making specific changes to the rendering algorithm when light text is displayed against a dark background." So it would appear to be a D2D thing that can/should be tweaked.
Comment 10•14 years ago
|
||
(In reply to comment #9) > (In reply to comment #7) > > Just as a note on this bug, this happens on IE9 Testdrive as well, so > > presumably it's something D2D. > > http://blogs.msdn.com/ie/archive/2010/04/26/feedback-on-the-ie9-platform-preview.aspx > > says "In addition, we are making specific changes to the rendering algorithm > when light text is displayed against a dark background." So it would appear to > be a D2D thing that can/should be tweaked. They are pushing DirectWrite updates though, so this is not something we can fix on our side of the API I believe, we sadly do not have the luxury to update DirectWrite for our users :-).
Comment 11•14 years ago
|
||
With Bug 568495 being fixed and, I assume, the release of .NET4, this issue does not occur. This could be closed.
Updated•14 years ago
|
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 12•14 years ago
|
||
(In reply to comment #11) > With Bug 568495 being fixed and, I assume, the release of .NET4, this issue > does not occur. This could be closed. Sorry, but I have to disagree - am running today's nightly (20100612), and have downloaded .NET 4.0, and can see no difference at all.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 13•14 years ago
|
||
(In reply to comment #12) My bad, I didn't read properly and assumed it was just an aliasing issue. I can reproduce this issue using AA tuner https://addons.mozilla.org/en-US/firefox/addon/150952/ (which needs a version bump) and setting it to Cleartype Natural Symmetric. I found forcing one of the GDI compatible modes thins the text and makes it look closer to non-d2d. The problem with this is that, I believe, ideally (http://msdn.microsoft.com/en-us/library/dd368118%28VS.85%29.aspx) the DWRITE_RENDERING mode should be DEFAULT - which bases it's choice on DWRITE_MEASURING_MODE which is set to NATURAL and is not 'best', according to the link, with the GDI compatible modes. I have no idea whether trying to render as close to the old GDI modes as possible is a good idea. I am experimenting with setting different DWRITE_RENDERING modes (here http://mxr.mozilla.org/mozilla-central/source/gfx/cairo/cairo/src/cairo-dwrite-font.cpp#497) on my local builds but I can't get them to change - commenting out the code results the build and working as before; maybe the code is not used. I don't understand the code really as I'm not much of a programmer, but I can't find how the output of the DWRITE_RENDERING mode code finds its way to here http://mxr.mozilla.org/mozilla-central/source/gfx/cairo/cairo/src/cairo-dwrite-font.cpp#1241
Comment 14•14 years ago
|
||
(In reply to comment #13) > (In reply to comment #12) > I am experimenting with setting different DWRITE_RENDERING modes (here > http://mxr.mozilla.org/mozilla-central/source/gfx/cairo/cairo/src/cairo-dwrite-font.cpp#497) > on my local builds but I can't get them to change - commenting out the code > results the build and working as before; maybe the code is not used. You're correct, this code is not used. > > I don't understand the code really as I'm not much of a programmer, but I can't > find how the output of the DWRITE_RENDERING mode code finds its way to here > http://mxr.mozilla.org/mozilla-central/source/gfx/cairo/cairo/src/cairo-dwrite-font.cpp#1241 DWRITE_RENDERING_MODE's as far as I know only affects DWrite rendering when using the DWrite rasterizer, not when using Direct2D. Which has its own rendering mode which is merely based on the D2D1_TEXT_ANTIALIAS_MODE.
Comment 15•14 years ago
|
||
(In reply to comment #14) Thanks, I understand better now. I made a little patch to set D2D1_GAMMA_1_0 in the two places here http://mxr.mozilla.org/mozilla-central/source/gfx/cairo/cairo/src/cairo-d2d-surface.cpp#704 I got the info from here http://msdn.microsoft.com/en-us/library/dd368113%28v=VS.85%29.aspx I think it means that 1_0 is best and that 2_2 is the default. Text does seem to be a little less 'grey' in comparison to GDI, but it may be my wishful thinking so I will make a comparison later.
Comment 16•14 years ago
|
||
(In reply to comment #15) > Created an attachment (id=450899) [details] > Tries to set D2D1_GAMMA_1_0 > > (In reply to comment #14) > Thanks, I understand better now. > > I made a little patch to set D2D1_GAMMA_1_0 in the two places here > http://mxr.mozilla.org/mozilla-central/source/gfx/cairo/cairo/src/cairo-d2d-surface.cpp#704 > > I got the info from here > http://msdn.microsoft.com/en-us/library/dd368113%28v=VS.85%29.aspx > > I think it means that 1_0 is best and that 2_2 is the default. > > Text does seem to be a little less 'grey' in comparison to GDI, but it may be > my wishful thinking so I will make a comparison later. That change will only affect text drawn with a gradient fill. This is a rare case and applies to none of the UI text as far as I know.
Comment 17•14 years ago
|
||
(In reply to comment #10) Bas, could you direct me to info about MS updating Directwrite? I can only find references to the WPF4 text rendering improvements. If IE9 uses WPF they get the text improvements, so if Firefox used (I may be wrong and it does :) ) WPF it should get the text improvements too. Now, as (i think) Firefox just uses Direct2d the update you mentioned would be something like the WPF improvements being carried over to a OS/directx update. Is this correct? as I'd like to bug MS about it :)
Comment 18•14 years ago
|
||
(In reply to comment #17) > (In reply to comment #10) > > Bas, could you direct me to info about MS updating Directwrite? > > I can only find references to the WPF4 text rendering improvements. If IE9 uses > WPF they get the text improvements, so if Firefox used (I may be wrong and it > does :) ) WPF it should get the text improvements too. > > Now, as (i think) Firefox just uses Direct2d the update you mentioned would be > something like the WPF improvements being carried over to a OS/directx update. > Is this correct? as I'd like to bug MS about it :) http://blogs.msdn.com/b/ie/archive/2010/04/26/feedback-on-the-ie9-platform-preview.aspx 'We’re working on improvements in DirectWrite’s ClearType font rasterization. Specifically, in the first Platform Preview, GDI logic was used to select fonts though DirectWrite was used to render them. That creates some text spacing differences. Future updates to the Platform Preview will use DirectWrite throughout and will address this spacing issue. In addition, we are making specific changes to the rendering algorithm when light text is displayed against a dark background.'
Comment 19•14 years ago
|
||
(In reply to comment #18) 'This is a good example of how your feedback directs changes to IE' 'We’re working on improvements in DirectWrite’s ClearType font rasterization..In addition, we are making specific changes to the rendering algorithm when light text is displayed against a dark background.' I read that like they're vaguely saying they'll fix the fonts but they offer nothing concrete on whether it's an OS level update for Directwrite or just a specifc fix for IE9. It'd be pretty mean of them to keep the font improvements to WPF4 and IE9.
Comment 20•14 years ago
|
||
(In reply to comment #19) > (In reply to comment #18) > 'This is a good example of how your feedback directs changes to IE' > 'We’re working on improvements in DirectWrite’s ClearType font > rasterization..In addition, we are making specific changes to the rendering > algorithm when light text is displayed against a dark background.' > > > I read that like they're vaguely saying they'll fix the fonts but they offer > nothing concrete on whether it's an OS level update for Directwrite or just a > specifc fix for IE9. It'd be pretty mean of them to keep the font improvements > to WPF4 and IE9. I'm sure it will be updated for all applications. They -want- to get rid of GDI, they won't leave a bug like that in the D2D/DWrite combination.
Comment 21•14 years ago
|
||
I've been reading through here http://blogs.msdn.com/b/llobo/archive/2009/10/21/new-wpf-features-textformattingmode-for-clear-text.aspx and the comment from 'Dennis' and thinking that the 'Display' mode might go some way to working around this issue until MS updates D2D/Dwrite properly. I tried to think of a way this could be implemented Forgive the pseudocode: If the text/glyph is 15/16pt or less AND it is not being rotated/animated/skewed etc { DWRITE_MEASURING_MODE_GDI_NATURAL/Classic, i'm not sure which one would be closer to the example on the page DWRITE_RENDERING_MODE_DEFAULT - which should pick one the the GDI modes Draw the text } else { follow the normal rendering mode } I'm not sure how to decide whether text is being rotated/animated/skewed but copying the 'Display' would go some way to alleviate the 'blurry' fonts since an awful lot of sites use < 16pt fonts. It's still not going to fix the quality of the cleartype rendering :( Would this be beneficial, possible, or even worth implementing, in the short term?
Comment 22•14 years ago
|
||
I don't have access to a vista machine so can't test this new D2D patch from Microsoft: http://support.microsoft.com/?kbid=2117917 "This update improves text rendering performance of Direct2D and conformance of Direct2D..." It's a bit vague but hopefully will address this bug.
Comment 23•14 years ago
|
||
I have an issue with bold text on a site and someone pointed to this bug. Screenshot: http://files.jyggen.com/fx4d2d.png
Comment 24•14 years ago
|
||
I actually fixed the problem I posted above. It's something strange with bold text and D2D/DW, don't know if it's related to thing bug but I posted the solution here if anyone is intrested: http://forums.mozillazine.org/viewtopic.php?f=23&t=1775755&p=9709103#p9709103
Comment 25•14 years ago
|
||
but that doesn't help us who are on Windows 7 :( and some grey and black text on white is also VERY blurry.
Comment 26•14 years ago
|
||
think im seeing this on the grey background of the news image on my homepage http://www.iinet.net.au/customers/ funnily, it only effects the white text on the grey backgrounds... the white text on the black background at the bottom is the practically the same or close to it between DW/D2D on/off
Comment 27•13 years ago
|
||
Microsoft's latest tweaks to DirectWrite and the Core Web fonts, in addition to our reverting to GDI classic style rendering for fonts up to size 15, effectively fixes this bug, I think.
Status: REOPENED → RESOLVED
Closed: 14 years ago → 13 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•