diff options
Diffstat (limited to 'core/src/fpdfapi/fpdf_font')
-rw-r--r-- | core/src/fpdfapi/fpdf_font/font_int.h | 2 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_font/fpdf_font.cpp | 25 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp | 5 |
3 files changed, 15 insertions, 17 deletions
diff --git a/core/src/fpdfapi/fpdf_font/font_int.h b/core/src/fpdfapi/fpdf_font/font_int.h index 1d1f006115..dc28010de3 100644 --- a/core/src/fpdfapi/fpdf_font/font_int.h +++ b/core/src/fpdfapi/fpdf_font/font_int.h @@ -89,7 +89,7 @@ class CPDF_CMapParser { public: CPDF_CMapParser(); ~CPDF_CMapParser() {} - FX_BOOL Initialize(CPDF_CMap*); + FX_BOOL Initialize(CPDF_CMap* pMap); void ParseWord(const CFX_ByteStringC& str); CFX_BinaryBuf m_AddMaps; diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp index 411f77254b..a9deba665c 100644 --- a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp +++ b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp @@ -966,22 +966,21 @@ FX_BOOL CPDF_Type1Font::Load() { m_Base14Font = PDF_GetStandardFontName(&m_BaseFont); if (m_Base14Font >= 0) { CPDF_Dictionary* pFontDesc = m_pFontDict->GetDictBy("FontDescriptor"); - if (pFontDesc && pFontDesc->KeyExist("Flags")) { + if (pFontDesc && pFontDesc->KeyExist("Flags")) m_Flags = pFontDesc->GetIntegerBy("Flags"); - } else { + else m_Flags = m_Base14Font >= 12 ? PDFFONT_SYMBOLIC : PDFFONT_NONSYMBOLIC; - } - if (m_Base14Font < 4) - for (int i = 0; i < 256; i++) { + + if (m_Base14Font < 4) { + for (int i = 0; i < 256; i++) m_CharWidth[i] = 600; - } - if (m_Base14Font == 12) { + } + if (m_Base14Font == 12) m_BaseEncoding = PDFFONT_ENCODING_ADOBE_SYMBOL; - } else if (m_Base14Font == 13) { + else if (m_Base14Font == 13) m_BaseEncoding = PDFFONT_ENCODING_ZAPFDINGBATS; - } else if (m_Flags & PDFFONT_NONSYMBOLIC) { + else if (m_Flags & PDFFONT_NONSYMBOLIC) m_BaseEncoding = PDFFONT_ENCODING_STANDARD; - } } return LoadCommon(); } @@ -1302,10 +1301,10 @@ CPDF_FontEncoding::CPDF_FontEncoding(int PredefinedEncoding) { const FX_WORD* pSrc = PDF_UnicodesForPredefinedCharSet(PredefinedEncoding); if (!pSrc) { FXSYS_memset(m_Unicodes, 0, sizeof(m_Unicodes)); - } else - for (int i = 0; i < 256; i++) { + } else { + for (int i = 0; i < 256; i++) m_Unicodes[i] = pSrc[i]; - } + } } FX_BOOL CPDF_FontEncoding::IsIdentical(CPDF_FontEncoding* pAnother) const { diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp index 1a78b1f93c..3cbd67633f 100644 --- a/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp +++ b/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp @@ -1545,12 +1545,11 @@ int CPDF_CIDFont::GlyphFromCharCode(FX_DWORD charcode, FX_BOOL* pVertGlyph) { if (m_Charset == CIDSET_JAPAN1) { if (unicode == '\\') { unicode = '/'; - } #if _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_ - else if (unicode == 0xa5) { + } else if (unicode == 0xa5) { unicode = 0x5c; - } #endif + } } if (!face) return unicode; |