From 992def065be348d6f8157fab75aee312f5f45558 Mon Sep 17 00:00:00 2001 From: thomasanderson Date: Tue, 17 May 2016 12:30:07 -0700 Subject: Don't use LCD antialiasing if Fontconfig doesn't support hinting Some Freetype implementations (like the one packaged with Fedora) do not support hinting due to patents 6219025, 6239783, 6307566, 6225973, 6243070, 6393145, 6421054, 6282327, and 6624828; the latest one expires 10/7/19. This makes LCD antialiasing very ugly, so we instead fall back on NORMAL antialiasing. A before/after on Fedora: https://bugs.chromium.org/p/chromium/issues/detail?id=479400#c31 BUG=479400 Review-Url: https://codereview.chromium.org/1982263004 --- core/fxge/include/fx_font.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/fxge/include/fx_font.h') diff --git a/core/fxge/include/fx_font.h b/core/fxge/include/fx_font.h index dad10f2ccb..6bc9b2e4c2 100644 --- a/core/fxge/include/fx_font.h +++ b/core/fxge/include/fx_font.h @@ -280,11 +280,13 @@ class CFX_FontMgr { bool GetBuiltinFont(size_t index, const uint8_t** pFontData, uint32_t* size); CFX_FontMapper* GetBuiltinMapper() const { return m_pBuiltinMapper.get(); } FXFT_Library GetFTLibrary() const { return m_FTLibrary; } + bool FTLibrarySupportsHinting() const { return m_FTLibrarySupportsHinting; } private: std::unique_ptr m_pBuiltinMapper; std::map m_FaceMap; FXFT_Library m_FTLibrary; + bool m_FTLibrarySupportsHinting; }; class CFX_FontMapper { -- cgit v1.2.3