summaryrefslogtreecommitdiff
path: root/core/fxge/apple
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-04-19 12:46:53 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-19 17:08:38 +0000
commitf51a02a29e10fcc490ba28f44d43f50104f940ed (patch)
tree354215ff5deeea419ce5a88b369535b5e4468a62 /core/fxge/apple
parent2a473dbecab2b47c513de9127a2cddf4c2800306 (diff)
downloadpdfium-f51a02a29e10fcc490ba28f44d43f50104f940ed.tar.xz
Cleanup codepage and charset definitions.
This Cl cleans up the unused defines in fx_codepage.h. The FXFONT_CHARSET_ defines are replaced with fx_codepage defines, this moves fx_codepage into core instead of xfa only. Static asserts are added to verify the public/ charsets match the fx_codepage charsets. Change-Id: Ie2f749e093de60a9a6743128a1fb087912e4cc96 Reviewed-on: https://pdfium-review.googlesource.com/4316 Commit-Queue: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fxge/apple')
-rw-r--r--core/fxge/apple/fx_mac_imp.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/core/fxge/apple/fx_mac_imp.cpp b/core/fxge/apple/fx_mac_imp.cpp
index 2df6e754a0..cb1adf701f 100644
--- a/core/fxge/apple/fx_mac_imp.cpp
+++ b/core/fxge/apple/fx_mac_imp.cpp
@@ -6,6 +6,7 @@
#include <memory>
+#include "core/fxcrt/fx_codepage.h"
#include "core/fxge/apple/apple_int.h"
#include "core/fxge/cfx_gemodule.h"
#include "core/fxge/ge/cfx_folderfontinfo.h"
@@ -94,23 +95,23 @@ void* CFX_MacFontInfo::MapFont(int weight,
if (it != m_FontList.end())
return it->second;
- if (charset == FXFONT_ANSI_CHARSET && (pitch_family & FXFONT_FF_FIXEDPITCH))
+ if (charset == FX_CHARSET_ANSI && (pitch_family & FXFONT_FF_FIXEDPITCH))
return GetFont("Courier New");
- if (charset == FXFONT_ANSI_CHARSET || charset == FXFONT_SYMBOL_CHARSET)
+ if (charset == FX_CHARSET_ANSI || charset == FX_CHARSET_Symbol)
return nullptr;
switch (charset) {
- case FXFONT_SHIFTJIS_CHARSET:
+ case FX_CHARSET_ShiftJIS:
GetJapanesePreference(&face, weight, pitch_family);
break;
- case FXFONT_GB2312_CHARSET:
+ case FX_CHARSET_ChineseSimplified:
face = "STSong";
break;
- case FXFONT_HANGUL_CHARSET:
+ case FX_CHARSET_Hangul:
face = "AppleMyungjo";
break;
- case FXFONT_CHINESEBIG5_CHARSET:
+ case FX_CHARSET_ChineseTraditional:
face = "LiSong Pro Light";
}
it = m_FontList.find(face);