summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornpm <npm@chromium.org>2016-08-12 10:29:31 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-12 10:29:31 -0700
commitc6833c2366e97b4779641464bf1d14d4115cc51d (patch)
tree8a58b9d187ec6a4ca16355952ced9f739b13703c
parentd0b6ed1a0842386e474c5fcd6bdbb260bb631bd1 (diff)
downloadpdfium-c6833c2366e97b4779641464bf1d14d4115cc51d.tar.xz
Make g_LinuxGpFontList be a 2D char array.
Review-Url: https://codereview.chromium.org/2240863002
-rw-r--r--core/fxge/ge/fx_ge_linux.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/core/fxge/ge/fx_ge_linux.cpp b/core/fxge/ge/fx_ge_linux.cpp
index 642bbc4561..f57efe8a32 100644
--- a/core/fxge/ge/fx_ge_linux.cpp
+++ b/core/fxge/ge/fx_ge_linux.cpp
@@ -31,17 +31,15 @@ class CFX_LinuxFontInfo : public CFX_FolderFontInfo {
const size_t kLinuxGpNameSize = 6;
-const struct {
- const FX_CHAR* NameArr[kLinuxGpNameSize];
-} g_LinuxGpFontList[] = {
- {{"TakaoPGothic", "VL PGothic", "IPAPGothic", "VL Gothic", "Kochi Gothic",
- "VL Gothic regular"}},
- {{"TakaoGothic", "VL Gothic", "IPAGothic", "Kochi Gothic", nullptr,
- "VL Gothic regular"}},
- {{"TakaoPMincho", "IPAPMincho", "VL Gothic", "Kochi Mincho", nullptr,
- "VL Gothic regular"}},
- {{"TakaoMincho", "IPAMincho", "VL Gothic", "Kochi Mincho", nullptr,
- "VL Gothic regular"}},
+const FX_CHAR* const g_LinuxGpFontList[][kLinuxGpNameSize] = {
+ {"TakaoPGothic", "VL PGothic", "IPAPGothic", "VL Gothic", "Kochi Gothic",
+ "VL Gothic regular"},
+ {"TakaoGothic", "VL Gothic", "IPAGothic", "Kochi Gothic", nullptr,
+ "VL Gothic regular"},
+ {"TakaoPMincho", "IPAPMincho", "VL Gothic", "Kochi Mincho", nullptr,
+ "VL Gothic regular"},
+ {"TakaoMincho", "IPAMincho", "VL Gothic", "Kochi Mincho", nullptr,
+ "VL Gothic regular"},
};
const FX_CHAR* const g_LinuxGbFontList[] = {
@@ -100,7 +98,7 @@ void* CFX_LinuxFontInfo::MapFont(int weight,
size_t index = GetJapanesePreference(cstr_face, weight, pitch_family);
ASSERT(index < FX_ArraySize(g_LinuxGpFontList));
for (size_t i = 0; i < kLinuxGpNameSize; i++) {
- auto it = m_FontList.find(g_LinuxGpFontList[index].NameArr[i]);
+ auto it = m_FontList.find(g_LinuxGpFontList[index][i]);
if (it != m_FontList.end()) {
return it->second;
}