Closed
Bug 571622
Opened 14 years ago
Closed 14 years ago
D2D seems not to select DWRITE_RENDERING mode automatically
Categories
(Core :: Graphics, enhancement)
Tracking
()
RESOLVED
INVALID
People
(Reporter: pxbugz, Unassigned)
Details
Attachments
(1 file)
1.06 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; WOW64; en-US; rv:1.9.3a5pre) Gecko/20100610 Minefield/3.7a5pre (.NET CLR 3.5.30729) Forgive me if I have this all wrong :) CreateGlyphRunAnalysis here: http://mxr.mozilla.org/mozilla-central/source/gfx/cairo/cairo/src/cairo-dwrite-font.cpp#498 uses DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC and DWRITE_MEASURING_MODE_NATURAL Reproducible: Always Actual Results: D2D fonts are, I believe, rendered using DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC and DWRITE_MEASURING_MODE_NATURAL except in the correct case of Bug 568495 Expected Results: Could CreateGlyphRunAnalysis use DWRITE_RENDERING_MODE based on the results of IDWriteRenderingParams::GetRenderingMode Method - http://msdn.microsoft.com/en-us/library/dd371300%28VS.85%29.aspx and IDWriteFontFace::GetRecommendedRenderingMode Method - http://msdn.microsoft.com/en-us/library/dd371015%28v=VS.85%29.aspx Perhaps this could happen at http://mxr.mozilla.org/mozilla-central/source/gfx/cairo/cairo/src/cairo-dwrite-font.cpp#287 to 310 GetRecommendedRenderingMode could then use the data about the particular character font type/size/etc to give CreateGlyphRunAnalysis 'optimal' values. I'm don't feel confident enough to attempt a patch but my reasoning is that with all the combinations of themes, fonts, colours and websites etc. out there that there are likely to be cases where the DWRITE modes would do a better job being set differently. Allowing the DRWITE_RENDERING mode to be automatically set based on the content being rendered would be very helpful for a web browser.
Reporter | ||
Updated•14 years ago
|
Version: unspecified → Trunk
Reporter | ||
Updated•14 years ago
|
Component: General → Graphics
Product: Firefox → Core
Reporter | ||
Comment 1•14 years ago
|
||
Upon further investigation it seems that the values such as emsize, pixelsPerDip and renderingParams aren't useful/necessary in this case. DWRITE_RENDERING_MODE should probably now be set to DEFAULT.
Reporter | ||
Comment 2•14 years ago
|
||
Updated•14 years ago
|
QA Contact: general → thebes
Comment 3•14 years ago
|
||
This will only change something for fallback rendering. The vast majority of text is not rendered using this codepath. So this should not make any difference for how normal text looks, we could still change the rendering mode of course.
Reporter | ||
Comment 4•14 years ago
|
||
I'm still looking in the wrong place then :) Is it planned/possible to be able to pass the text/glyphs about to be drawn to GetRecommendedRenderingMode and maybe CreateMonitorRenderingParams, then use the results and DWRITE (would IDWriteTextRenderer::DrawGlyphRun be the right one?) to draw the text/glyphs on the codepath that is used for most/all of the text?
Comment 5•14 years ago
|
||
(In reply to comment #4) > I'm still looking in the wrong place then :) > > Is it planned/possible to be able to pass the text/glyphs about to be drawn to > GetRecommendedRenderingMode and maybe CreateMonitorRenderingParams, then use > the results and DWRITE (would IDWriteTextRenderer::DrawGlyphRun be the right > one?) to draw the text/glyphs on the codepath that is used for most/all of the > text? The place to look for D2D would be http://mxr.mozilla.org/mozilla-central/source/gfx/cairo/cairo/src/cairo-d2d-surface.cpp#2107.
Reporter | ||
Comment 6•14 years ago
|
||
Aha, so it does it correctly already. Sorry for wasting your time :) So I take it the text 'improvements' mentioned here http://blogs.msdn.com/b/text/archive/2010/03/05/additional-wpf-text-clarity-improvements.aspx would require firefox to be built differently (target .NET4) but I suspect the actual issue/solution will be more complex than that :)
Reporter | ||
Updated•14 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
Comment 7•14 years ago
|
||
(In reply to comment #6) > Aha, so it does it correctly already. Sorry for wasting your time :) > > So I take it the text 'improvements' mentioned here > http://blogs.msdn.com/b/text/archive/2010/03/05/additional-wpf-text-clarity-improvements.aspx > > would require firefox to be built differently (target .NET4) but I suspect the > actual issue/solution will be more complex than that :) No such thing :). Always good to have more eyes look at something. I would suspect that all that is required is an update, we don't target any specific .NET version. But I might be mistaking.
You need to log in
before you can comment on or make changes to this bug.
Description
•