Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Unified Diff: core/fxge/ge/fx_ge_fontmap.cpp

Issue 1982263004: Don't use LCD antialiasing if Fontconfig doesn't support hinting (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Initialize m_FTLibrarySupportsHinting Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | core/fxge/ge/fx_ge_text.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxge/ge/fx_ge_fontmap.cpp
diff --git a/core/fxge/ge/fx_ge_fontmap.cpp b/core/fxge/ge/fx_ge_fontmap.cpp
index e8af2dce534c1042296b7ec2fd4cec83e0cd9fd2..7938e1098472912a18312124a12ca5faf3bbd40e 100644
--- a/core/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/fxge/ge/fx_ge_fontmap.cpp
@@ -454,7 +454,8 @@ int CTTFontDesc::ReleaseFace(FXFT_Face face) {
return 0;
}
-CFX_FontMgr::CFX_FontMgr() : m_FTLibrary(nullptr) {
+CFX_FontMgr::CFX_FontMgr()
+ : m_FTLibrary(nullptr), m_FTLibrarySupportsHinting(false) {
m_pBuiltinMapper.reset(new CFX_FontMapper(this));
}
@@ -472,6 +473,9 @@ void CFX_FontMgr::InitFTLibrary() {
if (m_FTLibrary)
return;
FXFT_Init_FreeType(&m_FTLibrary);
+ m_FTLibrarySupportsHinting =
+ FXFT_Library_SetLcdFilter(m_FTLibrary, FT_LCD_FILTER_DEFAULT) !=
+ FT_Err_Unimplemented_Feature;
}
void CFX_FontMgr::SetSystemFontInfo(IFX_SystemFontInfo* pFontInfo) {
« no previous file with comments | « no previous file | core/fxge/ge/fx_ge_text.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698