OLD | NEW |
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/cfx_gemodule.h" | 8 #include "core/fxge/cfx_gemodule.h" |
9 #include "core/fxge/ge/cfx_folderfontinfo.h" | 9 #include "core/fxge/ge/cfx_folderfontinfo.h" |
10 #include "core/fxge/ifx_systemfontinfo.h" | 10 #include "core/fxge/ifx_systemfontinfo.h" |
11 | 11 |
12 #if _FX_OS_ == _FX_MACOSX_ | |
13 | |
14 namespace { | 12 namespace { |
15 | 13 |
16 const struct { | 14 const struct { |
17 const FX_CHAR* m_pName; | 15 const FX_CHAR* m_pName; |
18 const FX_CHAR* m_pSubstName; | 16 const FX_CHAR* m_pSubstName; |
19 } g_Base14Substs[] = { | 17 } g_Base14Substs[] = { |
20 {"Courier", "Courier New"}, | 18 {"Courier", "Courier New"}, |
21 {"Courier-Bold", "Courier New Bold"}, | 19 {"Courier-Bold", "Courier New Bold"}, |
22 {"Courier-BoldOblique", "Courier New Bold Italic"}, | 20 {"Courier-BoldOblique", "Courier New Bold Italic"}, |
23 {"Courier-Oblique", "Courier New Italic"}, | 21 {"Courier-Oblique", "Courier New Italic"}, |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 | 128 |
131 void CFX_GEModule::InitPlatform() { | 129 void CFX_GEModule::InitPlatform() { |
132 m_pPlatformData = new CApplePlatform; | 130 m_pPlatformData = new CApplePlatform; |
133 m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault(nullptr)); | 131 m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault(nullptr)); |
134 } | 132 } |
135 | 133 |
136 void CFX_GEModule::DestroyPlatform() { | 134 void CFX_GEModule::DestroyPlatform() { |
137 delete reinterpret_cast<CApplePlatform*>(m_pPlatformData); | 135 delete reinterpret_cast<CApplePlatform*>(m_pPlatformData); |
138 m_pPlatformData = nullptr; | 136 m_pPlatformData = nullptr; |
139 } | 137 } |
140 | |
141 #endif // _FX_OS_ == _FX_MACOSX_ | |
OLD | NEW |