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

Unified Diff: core/src/fpdfapi/fpdf_font/fpdf_font.cpp

Issue 1415453002: Merge to XFA: Declare PDF_GetStandardFontName() in the header. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: rebase Created 5 years, 2 months 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/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp ('k') | core/src/fxge/ge/fx_ge_fontmap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_font/fpdf_font.cpp
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
index d64c77f03f997aad9dd96a9f4ec9c03330c08bfd..3157b36fbd3d9b58f376400948cf8bfb02424f7f 100644
--- a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
+++ b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
@@ -369,13 +369,13 @@ int CPDF_Font::GetCharTypeWidth(FX_DWORD charcode) {
}
return m_Font.GetGlyphWidth(glyph_index);
}
-int _PDF_GetStandardFontName(CFX_ByteString& name);
+
CPDF_Font* CPDF_Font::GetStockFont(CPDF_Document* pDoc,
const CFX_ByteStringC& name) {
CFX_ByteString fontname(name);
- int font_id = _PDF_GetStandardFontName(fontname);
+ int font_id = PDF_GetStandardFontName(&fontname);
if (font_id < 0) {
- return NULL;
+ return nullptr;
}
CPDF_FontGlobals* pFontGlobals =
CPDF_ModuleMgr::Get()->GetPageModule()->GetFontGlobals();
@@ -1009,7 +1009,7 @@ CPDF_Type1Font::CPDF_Type1Font() : CPDF_SimpleFont(PDFFONT_TYPE1) {
m_Base14Font = -1;
}
FX_BOOL CPDF_Type1Font::_Load() {
- m_Base14Font = _PDF_GetStandardFontName(m_BaseFont);
+ m_Base14Font = PDF_GetStandardFontName(&m_BaseFont);
if (m_Base14Font >= 0) {
CPDF_Dictionary* pFontDesc =
m_pFontDict->GetDict(FX_BSTRC("FontDescriptor"));
« no previous file with comments | « core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp ('k') | core/src/fxge/ge/fx_ge_fontmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698