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

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: 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..d0b45b031e53e606296c33a3c3436fa412cc8256 100644
--- a/core/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/fxge/ge/fx_ge_fontmap.cpp
@@ -472,6 +472,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) {
@@ -648,6 +651,12 @@ bool CFX_FontMgr::GetBuiltinFont(size_t index,
return false;
}
+bool CFX_FontMgr::FTLibrarySupportsHinting() const {
+ if (!m_FTLibrary)
Lei Zhang 2016/05/17 18:30:54 And don't worry about this.
Tom (Use chromium acct) 2016/05/17 19:06:37 Done.
+ return false;
+ return m_FTLibrarySupportsHinting;
+}
+
CFX_FontMapper::CFX_FontMapper(CFX_FontMgr* mgr)
: m_bListLoaded(FALSE),
m_pFontInfo(nullptr),
« 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