Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(460)

Unified Diff: core/src/fxge/ge/fx_ge_fontmap.cpp

Issue 1511613005: Add CFX_FontMapper::IsBuiltinFace() in master branch (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/include/fxge/fx_font.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxge/ge/fx_ge_fontmap.cpp
diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp
index 77f94865605476e0c759eb78b945fe73ab3ac0f5..29a29db6fe080820e663f2ebcb188edfdebe5edc 100644
--- a/core/src/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/src/fxge/ge/fx_ge_fontmap.cpp
@@ -1214,6 +1214,17 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name,
m_pFontInfo->DeleteFont(hFont);
return face;
}
+FX_BOOL CFX_FontMapper::IsBuiltinFace(const FXFT_Face face) const {
+ for (int i = 0; i < MM_FACE_COUNT; ++i) {
+ if (m_MMFaces[i] == face)
+ return TRUE;
+ }
+ for (int i = 0; i < FOXIT_FACE_COUNT; ++i) {
+ if (m_FoxitFaces[i] == face)
+ return TRUE;
+ }
+ return FALSE;
+}
extern "C" {
unsigned long _FTStreamRead(FXFT_Stream stream,
unsigned long offset,
« no previous file with comments | « core/include/fxge/fx_font.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698