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

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

Issue 1268323004: Allow external font-path configuration from pdfium_test. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Remove python driver changes Created 5 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 unified diff | Download patch
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 "../../../include/fxge/fx_ge.h" 7 #include "../../../include/fxge/fx_ge.h"
8 #include "apple_int.h" 8 #include "apple_int.h"
9 #if _FX_OS_ == _FX_MACOSX_ 9 #if _FX_OS_ == _FX_MACOSX_
10 static const struct { 10 static const struct {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 face = "AppleMyungjo"; 86 face = "AppleMyungjo";
87 break; 87 break;
88 case FXFONT_CHINESEBIG5_CHARSET: 88 case FXFONT_CHINESEBIG5_CHARSET:
89 face = "LiSong Pro Light"; 89 face = "LiSong Pro Light";
90 } 90 }
91 if (m_FontList.Lookup(face, p)) { 91 if (m_FontList.Lookup(face, p)) {
92 return p; 92 return p;
93 } 93 }
94 return NULL; 94 return NULL;
95 } 95 }
96 IFX_SystemFontInfo* IFX_SystemFontInfo::CreateDefault() { 96 IFX_SystemFontInfo* IFX_SystemFontInfo::CreateDefault(const char** pUnused) {
97 CFX_MacFontInfo* pInfo = new CFX_MacFontInfo; 97 CFX_MacFontInfo* pInfo = new CFX_MacFontInfo;
98 pInfo->AddPath("~/Library/Fonts"); 98 pInfo->AddPath("~/Library/Fonts");
99 pInfo->AddPath("/Library/Fonts"); 99 pInfo->AddPath("/Library/Fonts");
100 pInfo->AddPath("/System/Library/Fonts"); 100 pInfo->AddPath("/System/Library/Fonts");
101 return pInfo; 101 return pInfo;
102 } 102 }
103 void CFX_GEModule::InitPlatform() { 103 void CFX_GEModule::InitPlatform() {
104 m_pPlatformData = new CApplePlatform; 104 m_pPlatformData = new CApplePlatform;
105 m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault()); 105 m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault(nullptr));
106 } 106 }
107 void CFX_GEModule::DestroyPlatform() { 107 void CFX_GEModule::DestroyPlatform() {
108 delete (CApplePlatform*)m_pPlatformData; 108 delete (CApplePlatform*)m_pPlatformData;
109 m_pPlatformData = NULL; 109 m_pPlatformData = NULL;
110 } 110 }
111 #endif 111 #endif
OLDNEW
« no previous file with comments | « core/include/fxge/fx_ge.h ('k') | core/src/fxge/ge/fx_ge.cpp » ('j') | fpdfsdk/src/fpdfview.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698