Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2552)

Unified Diff: core/fxge/ge/fx_ge_linux.cpp

Issue 2240863002: Change g_LinuxGpFontList format (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxge/ge/fx_ge_linux.cpp
diff --git a/core/fxge/ge/fx_ge_linux.cpp b/core/fxge/ge/fx_ge_linux.cpp
index 642bbc4561218e222ef2b4841ba9a066e1eb62fb..f57efe8a32f089e4ca9dda4ef2103e8f3c538e32 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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698