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

Unified Diff: core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp

Issue 1293973002: Cleanup CFX_Font a bit. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Remove LoadFile() Created 5 years, 4 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
Index: core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp
index d36125e1b81f859f355193a20824c30ecf0f2474..91d6dcadb93ab53f385267a4af9c65e01cf7bb66 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp
@@ -789,10 +789,10 @@ void CPDF_RenderStatus::DrawTextPathWithPattern(
ProcessPath(&path, pObj2Device);
}
}
+
CFX_PathData* CPDF_Font::LoadGlyphPath(FX_DWORD charcode, int dest_width) {
int glyph_index = GlyphFromCharCode(charcode);
- if (m_Font.m_Face == NULL) {
- return NULL;
- }
+ if (!m_Font.GetFace())
+ return nullptr;
return m_Font.LoadGlyphPath(glyph_index, dest_width);
}

Powered by Google App Engine
This is Rietveld 408576698