[Webkit-unassigned] [Bug 42220] Subpixel rendering always disabled for Chromium Linux

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 14 12:11:31 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=42220





--- Comment #6 from Daniel Erat <derat at google.com>  2010-07-14 12:11:31 PST ---
I think that the big picture of what's currently going on (probably more for my benefit than anyone else's) is:

- Chrome's browser process uses GtkSettings to get the user's "gtk-xft-rgba" setting and maps it one-to-one to a value from RendererPreferencesSubpixelRenderingEnum (with a "system default" value for cases where we don't get back a recognizable value from GTK or the hint style is undefined).

- RenderView::UpdateFontRenderingFromRendererPrefs() in renderer/render_view_linux.cc maps the RendererPreferences's enum to a bool (true for everything other than "system default" and "none") and passes that value to WebFontRendering::setSubpixelGlyphs(), which passes it to FontPlatformData::setSubpixelGlyphs(), which sets the global isSkiaSubpixelGlyphs bool in WebCore/platform/graphics/chromium/FontPlatformDataLinux.cpp.

- When we eventually call out to WebFontInfo::renderStyleForStrike() to get the per-strike settings, we aren't currently looking at fontconfig's FC_RGBA value, so we leave the WebFontRenderStyle::useSubpixel member at its default value of 2 ("no preference expressed") -- I missed that this wasn't just a bool when looking at the code earlier.

- Back in FontPlatformData::setupPaint(), we call SkPaint::setLCDRenderText() using the useSubpixel value if a preference was expressed, or the value from the isSkiaSubpixelGlyphs global otherwise.

So I think that the problem is that when subpixel isn't configured correctly in GtkSettings (as is the case for Chrome OS), we use the default instead of using the setting from fontconfig if one is available.  My previous patch is incorrect, I think, in that I should be using the "no preference expressed" 2 value in the case where there's no setting in fontconfig, so we'll fall back to whatever value we already have from GtkSettings.

Also, it looks like we only use the subpixel order and orientation provided by GtkSettings (the only place I see this getting touched is RenderView::UpdateFontRenderingFromRendererPrefs()).  Does it make sense to continue doing that, or do we want to find some way that we can use the order provided by fontconfig?  I can't think of any reason why someone would want to configure *differing* subpixel orders in fontconfig, but I think that there may be no way to configure the order and orientation at all currently using only fontconfig.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list