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

Unified Diff: core/src/fpdfdoc/doc_form.cpp

Issue 1398383002: core/ difference with XFA (for information only). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: 2015-11-24 version Created 5 years, 1 month 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') | core/src/fpdfdoc/doc_formfield.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfdoc/doc_form.cpp
diff --git a/core/src/fpdfdoc/doc_form.cpp b/core/src/fpdfdoc/doc_form.cpp
index 07c54a08a8003a88f87fc46fd96ef073089e500b..ffd6bf7955f728d27eac19fa5da01ef35804ea58 100644
--- a/core/src/fpdfdoc/doc_form.cpp
+++ b/core/src/fpdfdoc/doc_form.cpp
@@ -371,6 +371,21 @@ static FX_BOOL RetrieveSpecificFont(uint8_t charSet,
}
return RetrieveSpecificFont(lf);
}
+#ifdef PDF_ENABLE_XFA
+static FX_BOOL RetrieveStockFont(int iFontObject,
+ uint8_t charSet,
+ LOGFONTA& lf) {
+ HFONT hFont = (HFONT)::GetStockObject(iFontObject);
+ if (hFont != NULL) {
+ memset(&lf, 0, sizeof(LOGFONTA));
+ int iRet = ::GetObject(hFont, sizeof(LOGFONTA), &lf);
+ if (iRet > 0 && (lf.lfCharSet == charSet || charSet == 255)) {
+ return RetrieveSpecificFont(lf);
+ }
+ }
+ return FALSE;
+}
+#endif
#endif
CPDF_Font* CPDF_InterForm::AddStandardFont(CPDF_Document* pDocument,
« no previous file with comments | « core/include/fxge/fx_font.h ('k') | core/src/fpdfdoc/doc_formfield.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698