From 698aed79d6ad6e8e3a0c7a500c108d69f944b82d Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 26 Sep 2017 16:24:49 -0400 Subject: Cleanup FX macros This CL renames the FX_OS defines to have _OS_ in their names and drops the _DESKTOP suffix. The FXM defines have been changed to just FX. Change-Id: Iab172fba541713b5f6d14fb8098baf68e3364c74 Reviewed-on: https://pdfium-review.googlesource.com/14833 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- core/fpdfapi/font/cpdf_type1font.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'core/fpdfapi/font/cpdf_type1font.cpp') diff --git a/core/fpdfapi/font/cpdf_type1font.cpp b/core/fpdfapi/font/cpdf_type1font.cpp index a7ac264fe0..296351fc82 100644 --- a/core/fpdfapi/font/cpdf_type1font.cpp +++ b/core/fpdfapi/font/cpdf_type1font.cpp @@ -10,13 +10,13 @@ #include "core/fxge/cfx_gemodule.h" #include "core/fxge/fx_freetype.h" -#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ +#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ #include "core/fxge/apple/apple_int.h" #endif namespace { -#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ +#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ struct GlyphNameMap { const char* m_pStrAdobe; const char* m_pStrUnicode; @@ -40,7 +40,7 @@ const char* GlyphNameRemap(const char* pStrAdobe) { return found ? found->m_pStrUnicode : nullptr; } -#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ +#endif // _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ bool FT_UseType1Charmap(FXFT_Face face) { if (FXFT_Get_Face_CharmapCount(face) == 0) { @@ -114,7 +114,7 @@ void CPDF_Type1Font::LoadGlyphMap() { if (!m_Font.GetFace()) return; -#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ +#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ bool bCoreText = true; CQuartz2D& quartz2d = static_cast(CFX_GEModule::Get()->GetPlatformData()) @@ -138,7 +138,7 @@ void CPDF_Type1Font::LoadGlyphMap() { uint16_t unicode = prefix[j] * 256 + charcode; m_GlyphIndex[charcode] = FXFT_Get_Char_Index(m_Font.GetFace(), unicode); -#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ +#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ CalcExtGID(charcode); #endif if (m_GlyphIndex[charcode]) { @@ -148,7 +148,7 @@ void CPDF_Type1Font::LoadGlyphMap() { } } if (bGotOne) { -#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ +#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ if (!bCoreText) memcpy(m_ExtGID, m_GlyphIndex, 256); #endif @@ -168,25 +168,25 @@ void CPDF_Type1Font::LoadGlyphMap() { m_Encoding.m_Unicodes[charcode] = PDF_UnicodeFromAdobeName(name); m_GlyphIndex[charcode] = FXFT_Get_Char_Index( m_Font.GetFace(), m_Encoding.m_Unicodes[charcode]); -#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ +#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ CalcExtGID(charcode); #endif 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_ +#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ CalcExtGID(charcode); #endif } } -#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ +#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ if (!bCoreText) memcpy(m_ExtGID, m_GlyphIndex, 256); #endif return; } FT_UseType1Charmap(m_Font.GetFace()); -#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ +#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ if (bCoreText) { if (m_Flags & FXFONT_SYMBOLIC) { for (int charcode = 0; charcode < 256; charcode++) { @@ -254,7 +254,7 @@ void CPDF_Type1Font::LoadGlyphMap() { } return; } -#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ +#endif // _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ if (m_Flags & FXFONT_SYMBOLIC) { for (int charcode = 0; charcode < 256; charcode++) { const char* name = @@ -283,7 +283,7 @@ void CPDF_Type1Font::LoadGlyphMap() { } } } -#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ +#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ if (!bCoreText) memcpy(m_ExtGID, m_GlyphIndex, 256); @@ -312,13 +312,13 @@ void CPDF_Type1Font::LoadGlyphMap() { } } } -#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ +#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ if (!bCoreText) memcpy(m_ExtGID, m_GlyphIndex, 256); #endif } -#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ +#if _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ void CPDF_Type1Font::SetExtGID(const char* name, int charcode) { CFStringRef name_ct = CFStringCreateWithCStringNoCopy( kCFAllocatorDefault, name, kCFStringEncodingASCII, kCFAllocatorNull); @@ -335,4 +335,4 @@ void CPDF_Type1Font::CalcExtGID(int charcode) { name_glyph[255] = 0; SetExtGID(name_glyph, charcode); } -#endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ +#endif // _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ -- cgit v1.2.3