summaryrefslogtreecommitdiff
path: root/core/src/fxge
diff options
context:
space:
mode:
authorJUN FANG <jun_fang@foxitsoftware.com>2015-06-09 16:28:53 -0700
committerJUN FANG <jun_fang@foxitsoftware.com>2015-06-09 16:28:53 -0700
commit7a2fcd8d1256c267380b40f2d2d8e98c3b181cee (patch)
tree018be8eb6256514be83c97c69eea03091aedc2fe /core/src/fxge
parentbb17868d736f698d5217c30d52c5bbfed62c5936 (diff)
downloadpdfium-7a2fcd8d1256c267380b40f2d2d8e98c3b181cee.tar.xz
Correct unexpected hinting fonts
If the font is 'tricky', it needs to be hinted by default according to the description in freetype. BUG=490814 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1170313003
Diffstat (limited to 'core/src/fxge')
-rw-r--r--core/src/fxge/ge/fx_ge_text.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/src/fxge/ge/fx_ge_text.cpp b/core/src/fxge/ge/fx_ge_text.cpp
index 0d9e985a8e..5412b2993d 100644
--- a/core/src/fxge/ge/fx_ge_text.cpp
+++ b/core/src/fxge/ge/fx_ge_text.cpp
@@ -1622,7 +1622,11 @@ CFX_PathData* CFX_Font::LoadGlyphPath(FX_DWORD glyph_index, int dest_width)
}
}
FXFT_Set_Transform(m_Face, &ft_matrix, 0);
- int load_flags = (m_Face->face_flags & FT_FACE_FLAG_SFNT) ? FXFT_LOAD_NO_BITMAP : FXFT_LOAD_NO_BITMAP | FT_LOAD_NO_HINTING;
+ int load_flags = FXFT_LOAD_NO_BITMAP;
+ if (!(m_Face->face_flags & FT_FACE_FLAG_SFNT) || !FT_IS_TRICKY(m_Face)) {
+ load_flags |= FT_LOAD_NO_HINTING;
+ }
+
int error = FXFT_Load_Glyph(m_Face, glyph_index, load_flags);
if (error) {
return NULL;