[GTK] Honor GTK+ font settings
authormcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Mar 2017 23:18:54 +0000 (23:18 +0000)
committermcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Mar 2017 23:18:54 +0000 (23:18 +0000)
commit8cfc042dbf07a82177fee701d8ea7a3acff6ad07
tree93f2b1499c04f5bf5d1b18c3b70ac8cc9ddbe7c9
parentb2f14670cb4018d63d07f22cac2ef0846ba633f6
[GTK] Honor GTK+ font settings
https://bugs.webkit.org/show_bug.cgi?id=82889

Reviewed by Carlos Garcia Campos.

After much discussion with Behdad and Martin (who is still not completely convinced I think
:) I want to merge cairo font options into the Fontconfig pattern used for rendering using
cairo_ft_font_options_substitute(). This is how the API was designed to be used anyway.
Fontconfig will still have final say over whether to actually respect the desktop settings
or not, so it can still choose to ignore the desktop's settings, but I don't think it makes
sense to have desktop-wide font settings and not tell Fontconfig about them, especially when
the whole point of WebKitGTK+ is desktop integration. This should also reduce complaints
that we're not following desktop settings and that we're drawing fonts differently than
Firefox.

* PlatformGTK.cmake:
* platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::getDefaultCairoFontOptions):
* platform/graphics/cairo/CairoUtilities.h:
* platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::createFontConfigPatternForCharacters):
(WebCore::strongAliasesForFamily):
(WebCore::FontCache::createFontPlatformData):
* platform/graphics/freetype/FontPlatformDataFreeType.cpp:
(WebCore::getDefaultFontconfigOptions):
(WebCore::getDefaultCairoFontOptions): Deleted.
* platform/graphics/gtk/GdkCairoUtilities.cpp:
(getDefaultCairoFontOptions):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@214283 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/PlatformGTK.cmake
Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp
Source/WebCore/platform/graphics/cairo/CairoUtilities.h
Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp
Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp
Source/WebCore/platform/graphics/gtk/GdkCairoUtilities.cpp
Source/WebCore/platform/graphics/gtk/GdkCairoUtilities.h