diff options
author | Nicolas Pena <npm@chromium.org> | 2017-11-07 16:32:20 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-07 16:32:20 +0000 |
commit | 979e916fde750e47f262c59dc75f4ca2dc19ed39 (patch) | |
tree | 5e767486014c58e384f827f3fd7dc11efe658865 /core/fxge/fx_ge_linux.cpp | |
parent | f2f12b32b601f022b5c10fddd8c4d19d00072630 (diff) | |
download | pdfium-979e916fde750e47f262c59dc75f4ca2dc19ed39.tar.xz |
Remove m_bFlagExact from CFX_SubstFont
This CL removes the single use case from |m_bFlagExact|. This flag
allows the PDF viewer to treat a substitute font with a matching name as
if it was actually an embedded font, which is wrong. For all substitute
fonts, it is important to follow the longer process of first obtaining
the unicode from the charcode to then obtain the glyph in the substitute
font that corresponds to that unicode.
Bug: chromium:781785
Change-Id: Ie5958b43914e0e46334b89b7c2c55c02d0da0c11
Reviewed-on: https://pdfium-review.googlesource.com/17859
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Diffstat (limited to 'core/fxge/fx_ge_linux.cpp')
-rw-r--r-- | core/fxge/fx_ge_linux.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/core/fxge/fx_ge_linux.cpp b/core/fxge/fx_ge_linux.cpp index c9d1dd128b..22a3c4cd1b 100644 --- a/core/fxge/fx_ge_linux.cpp +++ b/core/fxge/fx_ge_linux.cpp @@ -74,8 +74,7 @@ class CFX_LinuxFontInfo : public CFX_FolderFontInfo { bool bItalic, int charset, int pitch_family, - const char* family, - int& iExact) override; + const char* family) override; bool ParseFontCfg(const char** pUserPaths); }; @@ -83,13 +82,11 @@ void* CFX_LinuxFontInfo::MapFont(int weight, bool bItalic, int charset, int pitch_family, - const char* cstr_face, - int& iExact) { + const char* cstr_face) { void* font = GetSubstFont(cstr_face); - if (font) { - iExact = 1; + if (font) return font; - } + bool bCJK = true; switch (charset) { case FX_CHARSET_ShiftJIS: { |