summaryrefslogtreecommitdiff
path: root/core/fxge/cfx_fontmgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge/cfx_fontmgr.cpp')
-rw-r--r--core/fxge/cfx_fontmgr.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/fxge/cfx_fontmgr.cpp b/core/fxge/cfx_fontmgr.cpp
index d9b03549e0..0d4524c954 100644
--- a/core/fxge/cfx_fontmgr.cpp
+++ b/core/fxge/cfx_fontmgr.cpp
@@ -98,9 +98,17 @@ void CFX_FontMgr::InitFTLibrary() {
if (m_FTLibrary)
return;
FXFT_Init_FreeType(&m_FTLibrary);
+ FT_Int major;
+ FT_Int minor;
+ FT_Int patch;
+ FXFT_Library_Version(m_FTLibrary, &major, &minor, &patch);
+ // Freetype versions >= 2.8.1 support hinting even if subpixel rendering is
+ // disabled. https://sourceforge.net/projects/freetype/files/freetype2/2.8.1/
m_FTLibrarySupportsHinting =
+ major > 2 || (major >= 2 && minor > 8) ||
+ (major >= 2 && minor >= 8 && patch >= 1) ||
FXFT_Library_SetLcdFilter(m_FTLibrary, FT_LCD_FILTER_DEFAULT) !=
- FT_Err_Unimplemented_Feature;
+ FT_Err_Unimplemented_Feature;
}
void CFX_FontMgr::SetSystemFontInfo(