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

Side by Side Diff: core/fxge/apple/fx_mac_imp.cpp

Issue 2347313002: Remove duplicated charset definitions (Closed)
Patch Set: Nits Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « core/fxge/android/fpf_skiafontmgr.cpp ('k') | core/fxge/ge/cfx_folderfontinfo.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "core/fxge/apple/apple_int.h" 7 #include "core/fxge/apple/apple_int.h"
8 #include "core/fxge/ge/cfx_folderfontinfo.h" 8 #include "core/fxge/ge/cfx_folderfontinfo.h"
9 #include "core/fxge/include/cfx_gemodule.h" 9 #include "core/fxge/include/cfx_gemodule.h"
10 #include "core/fxge/include/ifx_systemfontinfo.h" 10 #include "core/fxge/include/ifx_systemfontinfo.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 if (charset == FXFONT_ANSI_CHARSET || charset == FXFONT_SYMBOL_CHARSET) 100 if (charset == FXFONT_ANSI_CHARSET || charset == FXFONT_SYMBOL_CHARSET)
101 return nullptr; 101 return nullptr;
102 102
103 switch (charset) { 103 switch (charset) {
104 case FXFONT_SHIFTJIS_CHARSET: 104 case FXFONT_SHIFTJIS_CHARSET:
105 GetJapanesePreference(&face, weight, pitch_family); 105 GetJapanesePreference(&face, weight, pitch_family);
106 break; 106 break;
107 case FXFONT_GB2312_CHARSET: 107 case FXFONT_GB2312_CHARSET:
108 face = "STSong"; 108 face = "STSong";
109 break; 109 break;
110 case FXFONT_HANGEUL_CHARSET: 110 case FXFONT_HANGUL_CHARSET:
111 face = "AppleMyungjo"; 111 face = "AppleMyungjo";
112 break; 112 break;
113 case FXFONT_CHINESEBIG5_CHARSET: 113 case FXFONT_CHINESEBIG5_CHARSET:
114 face = "LiSong Pro Light"; 114 face = "LiSong Pro Light";
115 } 115 }
116 it = m_FontList.find(face); 116 it = m_FontList.find(face);
117 return it != m_FontList.end() ? it->second : nullptr; 117 return it != m_FontList.end() ? it->second : nullptr;
118 } 118 }
119 119
120 } // namespace 120 } // namespace
(...skipping 11 matching lines...) Expand all
132 m_pPlatformData = new CApplePlatform; 132 m_pPlatformData = new CApplePlatform;
133 m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault(nullptr)); 133 m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault(nullptr));
134 } 134 }
135 135
136 void CFX_GEModule::DestroyPlatform() { 136 void CFX_GEModule::DestroyPlatform() {
137 delete reinterpret_cast<CApplePlatform*>(m_pPlatformData); 137 delete reinterpret_cast<CApplePlatform*>(m_pPlatformData);
138 m_pPlatformData = nullptr; 138 m_pPlatformData = nullptr;
139 } 139 }
140 140
141 #endif // _FX_OS_ == _FX_MACOSX_ 141 #endif // _FX_OS_ == _FX_MACOSX_
OLDNEW
« no previous file with comments | « core/fxge/android/fpf_skiafontmgr.cpp ('k') | core/fxge/ge/cfx_folderfontinfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698