diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-06-11 15:24:26 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-06-11 15:24:26 -0700 |
commit | 5bba2b63759940ab2ac134bf376310e72b7adf47 (patch) | |
tree | 6d5aaa5c9a159d2eee6a0adc7c4b8fea094c9188 /core/src/fxge | |
parent | 6581175666ba4e1eb2826142376cbfe4495c6e76 (diff) | |
download | pdfium-5bba2b63759940ab2ac134bf376310e72b7adf47.tar.xz |
Merge to XFA: Correct unexpected hinting fonts
If the font is 'tricky', it needs to be hinted by default according to the description in freetype.
BUG=490814
TBR=jun_fang@foxitsoftware.com
Original Review URL: https://codereview.chromium.org/1170313003.
Review URL: https://codereview.chromium.org/1175243008.
Diffstat (limited to 'core/src/fxge')
-rw-r--r-- | core/src/fxge/ge/fx_ge_text.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/src/fxge/ge/fx_ge_text.cpp b/core/src/fxge/ge/fx_ge_text.cpp index 7133d65417..3a98154060 100644 --- a/core/src/fxge/ge/fx_ge_text.cpp +++ b/core/src/fxge/ge/fx_ge_text.cpp @@ -1638,7 +1638,10 @@ 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; |