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

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

Issue 2248453002: Use a std::vector in fpdf_font code. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nits Created 4 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
« no previous file with comments | « core/fpdfapi/fpdf_font/cpdf_truetypefont.cpp ('k') | core/fpdfapi/fpdf_font/cpdf_type3font.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_font/cpdf_type1font.cpp
diff --git a/core/fpdfapi/fpdf_font/cpdf_type1font.cpp b/core/fpdfapi/fpdf_font/cpdf_type1font.cpp
index 5f6eb1f6626807a6d0c7c01fb4b9cc90a00c900b..c316d8d424effd26ada811bea1aacf363fe73da1 100644
--- a/core/fpdfapi/fpdf_font/cpdf_type1font.cpp
+++ b/core/fpdfapi/fpdf_font/cpdf_type1font.cpp
@@ -173,10 +173,10 @@ void CPDF_Type1Font::LoadGlyphMap() {
}
for (int charcode = 0; charcode < 256; charcode++) {
const FX_CHAR* name =
- GetAdobeCharName(m_BaseEncoding, m_pCharNames, charcode);
- if (!name) {
+ GetAdobeCharName(m_BaseEncoding, m_CharNames, charcode);
+ if (!name)
continue;
- }
+
m_Encoding.m_Unicodes[charcode] = PDF_UnicodeFromAdobeName(name);
m_GlyphIndex[charcode] = FXFT_Get_Char_Index(
m_Font.GetFace(), m_Encoding.m_Unicodes[charcode]);
@@ -225,7 +225,7 @@ void CPDF_Type1Font::LoadGlyphMap() {
if (m_Flags & PDFFONT_SYMBOLIC) {
for (int charcode = 0; charcode < 256; charcode++) {
const FX_CHAR* name =
- GetAdobeCharName(m_BaseEncoding, m_pCharNames, charcode);
+ GetAdobeCharName(m_BaseEncoding, m_CharNames, charcode);
if (name) {
m_Encoding.m_Unicodes[charcode] = PDF_UnicodeFromAdobeName(name);
m_GlyphIndex[charcode] =
@@ -273,7 +273,7 @@ void CPDF_Type1Font::LoadGlyphMap() {
}
for (int charcode = 0; charcode < 256; charcode++) {
const FX_CHAR* name =
- GetAdobeCharName(m_BaseEncoding, m_pCharNames, charcode);
+ GetAdobeCharName(m_BaseEncoding, m_CharNames, charcode);
if (!name) {
continue;
}
@@ -331,11 +331,11 @@ void CPDF_Type1Font::LoadGlyphMap() {
}
return;
}
-#endif
+#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
if (m_Flags & PDFFONT_SYMBOLIC) {
for (int charcode = 0; charcode < 256; charcode++) {
const FX_CHAR* name =
- GetAdobeCharName(m_BaseEncoding, m_pCharNames, charcode);
+ GetAdobeCharName(m_BaseEncoding, m_CharNames, charcode);
if (name) {
m_Encoding.m_Unicodes[charcode] = PDF_UnicodeFromAdobeName(name);
m_GlyphIndex[charcode] =
@@ -373,7 +373,7 @@ void CPDF_Type1Font::LoadGlyphMap() {
}
for (int charcode = 0; charcode < 256; charcode++) {
const FX_CHAR* name =
- GetAdobeCharName(m_BaseEncoding, m_pCharNames, charcode);
+ GetAdobeCharName(m_BaseEncoding, m_CharNames, charcode);
if (!name) {
continue;
}
« no previous file with comments | « core/fpdfapi/fpdf_font/cpdf_truetypefont.cpp ('k') | core/fpdfapi/fpdf_font/cpdf_type3font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698