diff options
Diffstat (limited to 'core/fpdfapi')
-rw-r--r-- | core/fpdfapi/font/cpdf_truetypefont.cpp | 2 | ||||
-rw-r--r-- | core/fpdfapi/font/cpdf_type1font.cpp | 8 | ||||
-rw-r--r-- | core/fpdfapi/parser/cpdf_document.cpp | 3 |
3 files changed, 6 insertions, 7 deletions
diff --git a/core/fpdfapi/font/cpdf_truetypefont.cpp b/core/fpdfapi/font/cpdf_truetypefont.cpp index a87370f971..54e565bfd1 100644 --- a/core/fpdfapi/font/cpdf_truetypefont.cpp +++ b/core/fpdfapi/font/cpdf_truetypefont.cpp @@ -130,7 +130,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap() { } if ((m_GlyphIndex[charcode] == 0 || m_GlyphIndex[charcode] == 0xffff) && name) { - if (name[0] == '.' && FXSYS_strcmp(name, ".notdef") == 0) { + if (name[0] == '.' && strcmp(name, ".notdef") == 0) { m_GlyphIndex[charcode] = FXFT_Get_Char_Index(m_Font.GetFace(), 32); } else { m_GlyphIndex[charcode] = diff --git a/core/fpdfapi/font/cpdf_type1font.cpp b/core/fpdfapi/font/cpdf_type1font.cpp index 4c7b86a567..a264a780c3 100644 --- a/core/fpdfapi/font/cpdf_type1font.cpp +++ b/core/fpdfapi/font/cpdf_type1font.cpp @@ -172,7 +172,7 @@ void CPDF_Type1Font::LoadGlyphMap() { #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ CalcExtGID(charcode); #endif - if (m_GlyphIndex[charcode] == 0 && FXSYS_strcmp(name, ".notdef") == 0) { + if (m_GlyphIndex[charcode] == 0 && strcmp(name, ".notdef") == 0) { m_Encoding.m_Unicodes[charcode] = 0x20; m_GlyphIndex[charcode] = FXFT_Get_Char_Index(m_Font.GetFace(), 0x20); #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ @@ -240,8 +240,7 @@ void CPDF_Type1Font::LoadGlyphMap() { FXFT_Get_Name_Index(m_Font.GetFace(), (char*)name); SetExtGID(name, charcode); if (m_GlyphIndex[charcode] == 0) { - if (FXSYS_strcmp(name, ".notdef") != 0 && - FXSYS_strcmp(name, "space") != 0) { + if (strcmp(name, ".notdef") != 0 && strcmp(name, "space") != 0) { m_GlyphIndex[charcode] = FXFT_Get_Char_Index( m_Font.GetFace(), bUnicode ? m_Encoding.m_Unicodes[charcode] : charcode); @@ -304,8 +303,7 @@ void CPDF_Type1Font::LoadGlyphMap() { m_Encoding.m_Unicodes[charcode] = PDF_UnicodeFromAdobeName(name); m_GlyphIndex[charcode] = FXFT_Get_Name_Index(m_Font.GetFace(), (char*)name); if (m_GlyphIndex[charcode] == 0) { - if (FXSYS_strcmp(name, ".notdef") != 0 && - FXSYS_strcmp(name, "space") != 0) { + if (strcmp(name, ".notdef") != 0 && strcmp(name, "space") != 0) { m_GlyphIndex[charcode] = FXFT_Get_Char_Index( m_Font.GetFace(), bUnicode ? m_Encoding.m_Unicodes[charcode] : charcode); diff --git a/core/fpdfapi/parser/cpdf_document.cpp b/core/fpdfapi/parser/cpdf_document.cpp index fb2c723ce4..975592d044 100644 --- a/core/fpdfapi/parser/cpdf_document.cpp +++ b/core/fpdfapi/parser/cpdf_document.cpp @@ -966,7 +966,8 @@ CPDF_Font* CPDF_Document::AddWindowsFont(LOGFONTW* pLogFont, if (face.GetLength() >= LF_FACESIZE) return nullptr; - FXSYS_strcpy(lfa.lfFaceName, face.c_str()); + strncpy(lfa.lfFaceName, face.c_str(), + (face.GetLength() + 1) * sizeof(CFX_ByteString::CharType)); return AddWindowsFont(&lfa, bVert, bTranslateName); } |