summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-11 13:25:12 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-11 13:25:12 -0700
commit864773a57a54763b97bef7d38f65375b15c14437 (patch)
tree8140ca8bcca2c66582e83b8a406d71042507dca8
parenteda202769e5c79eba1d2fb5090f6e9cf176e2d4a (diff)
downloadpdfium-864773a57a54763b97bef7d38f65375b15c14437.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 Committed: https://pdfium.googlesource.com/pdfium/+/7a2fcd8d1256c267380b40f2d2d8e98c3b181cee Review URL: https://codereview.chromium.org/1170313003.
-rw-r--r--DEPS2
-rw-r--r--core/src/fxge/ge/fx_ge_text.cpp5
2 files changed, 5 insertions, 2 deletions
diff --git a/DEPS b/DEPS
index d6972d7417..91da7d61bd 100644
--- a/DEPS
+++ b/DEPS
@@ -8,7 +8,7 @@ deps = {
"https://chromium.googlesource.com/chromium/buildtools.git@46ce8cb60364e9e0b21a81136c7debdddfd063a8",
"testing/corpus":
- "https://pdfium.googlesource.com/pdfium_tests@9cc1567a5eab106c1f3dbcfcada815c9505ac906",
+ "https://pdfium.googlesource.com/pdfium_tests@4b9a1d593e5a101d034a4f1195174a22c179a42d",
"testing/gmock":
"https://chromium.googlesource.com/external/googlemock.git@29763965ab52f24565299976b936d1265cb6a271",
diff --git a/core/src/fxge/ge/fx_ge_text.cpp b/core/src/fxge/ge/fx_ge_text.cpp
index fd39ee8017..551aaf647e 100644
--- a/core/src/fxge/ge/fx_ge_text.cpp
+++ b/core/src/fxge/ge/fx_ge_text.cpp
@@ -1655,7 +1655,10 @@ CFX_PathData* CFX_Font::LoadGlyphPath(FX_DWORD glyph_index, int dest_width)
}
}
ScopedFontTransform scoped_transform(m_Face, &ft_matrix);
- 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;