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

Side by Side Diff: core/src/fxge/ge/fx_ge_linux.cpp

Issue 1253603002: Fix FX_BOOL type mismatches. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Public API Created 5 years, 5 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/src/fxge/ge/fx_ge_fontmap.cpp ('k') | fpdfsdk/src/fpdf_sysfontinfo.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 "../../../include/fxge/fx_ge.h" 7 #include "../../../include/fxge/fx_ge.h"
8 #include "../agg/include/fx_agg_driver.h" 8 #include "../agg/include/fx_agg_driver.h"
9 #include "text_int.h" 9 #include "text_int.h"
10 10
(...skipping 12 matching lines...) Expand all
23 {"Helvetica-BoldOblique", "Arial Bold Italic"}, 23 {"Helvetica-BoldOblique", "Arial Bold Italic"},
24 {"Helvetica-Oblique", "Arial Italic"}, 24 {"Helvetica-Oblique", "Arial Italic"},
25 {"Times-Roman", "Times New Roman"}, 25 {"Times-Roman", "Times New Roman"},
26 {"Times-Bold", "Times New Roman Bold"}, 26 {"Times-Bold", "Times New Roman Bold"},
27 {"Times-BoldItalic", "Times New Roman Bold Italic"}, 27 {"Times-BoldItalic", "Times New Roman Bold Italic"},
28 {"Times-Italic", "Times New Roman Italic"}, 28 {"Times-Italic", "Times New Roman Italic"},
29 }; 29 };
30 class CFX_LinuxFontInfo : public CFX_FolderFontInfo 30 class CFX_LinuxFontInfo : public CFX_FolderFontInfo
31 { 31 {
32 public: 32 public:
33 virtual void*» » MapFont(int weight, FX_BOOL bItalic, int charset , int pitch_family, const FX_CHAR* family, FX_BOOL& bExact); 33 void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, co nst FX_CHAR* family, int& iExact) override;
34 FX_BOOL ParseFontCfg(); 34 FX_BOOL ParseFontCfg();
35 void* FindFont(int weight, FX_BOOL bItalic, in t charset, int pitch_family, const FX_CHAR* family, FX_BOOL bMatchName); 35 void* FindFont(int weight, FX_BOOL bItalic, in t charset, int pitch_family, const FX_CHAR* family, FX_BOOL bMatchName);
36 }; 36 };
37 #define LINUX_GPNAMESIZE 6 37 #define LINUX_GPNAMESIZE 6
38 static const struct { 38 static const struct {
39 const FX_CHAR* NameArr[LINUX_GPNAMESIZE]; 39 const FX_CHAR* NameArr[LINUX_GPNAMESIZE];
40 } 40 }
41 LinuxGpFontList[] = { 41 LinuxGpFontList[] = {
42 {{"TakaoPGothic", "VL PGothic", "IPAPGothic", "VL Gothic", "Kochi Gothic", " VL Gothic regular"}}, 42 {{"TakaoPGothic", "VL PGothic", "IPAPGothic", "VL Gothic", "Kochi Gothic", " VL Gothic regular"}},
43 {{"TakaoGothic", "VL Gothic", "IPAGothic", "Kochi Gothic", NULL, "VL Gothic regular"}}, 43 {{"TakaoGothic", "VL Gothic", "IPAGothic", "Kochi Gothic", NULL, "VL Gothic regular"}},
(...skipping 26 matching lines...) Expand all
70 if (face.Find("PMincho") >= 0 || face.Find("\x82\x6f\x96\xbe\x92\xa9") > = 0) { 70 if (face.Find("PMincho") >= 0 || face.Find("\x82\x6f\x96\xbe\x92\xa9") > = 0) {
71 return 2; 71 return 2;
72 } 72 }
73 return 3; 73 return 3;
74 } 74 }
75 if (!(picth_family & FXFONT_FF_ROMAN) && weight > 400) { 75 if (!(picth_family & FXFONT_FF_ROMAN) && weight > 400) {
76 return 0; 76 return 0;
77 } 77 }
78 return 2; 78 return 2;
79 } 79 }
80 void* CFX_LinuxFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int p itch_family, const FX_CHAR* cstr_face, FX_BOOL& bExact) 80 void* CFX_LinuxFontInfo::MapFont(int weight, FX_BOOL bItalic, int charset, int p itch_family, const FX_CHAR* cstr_face, int& iExact)
81 { 81 {
82 CFX_ByteString face = cstr_face; 82 CFX_ByteString face = cstr_face;
83 int iBaseFont; 83 int iBaseFont;
84 for (iBaseFont = 0; iBaseFont < 12; iBaseFont ++) 84 for (iBaseFont = 0; iBaseFont < 12; iBaseFont ++)
85 if (face == CFX_ByteStringC(Base14Substs[iBaseFont].m_pName)) { 85 if (face == CFX_ByteStringC(Base14Substs[iBaseFont].m_pName)) {
86 face = Base14Substs[iBaseFont].m_pSubstName; 86 face = Base14Substs[iBaseFont].m_pSubstName;
87 bExact = TRUE; 87 iExact = 1;
88 break; 88 break;
89 } 89 }
90 if (iBaseFont < 12) { 90 if (iBaseFont < 12) {
91 return GetFont(face); 91 return GetFont(face);
92 } 92 }
93 void* p = NULL; 93 void* p = NULL;
94 FX_BOOL bCJK = TRUE; 94 FX_BOOL bCJK = TRUE;
95 switch (charset) { 95 switch (charset) {
96 case FXFONT_SHIFTJIS_CHARSET: { 96 case FXFONT_SHIFTJIS_CHARSET: {
97 int32_t index = GetJapanesePreference(cstr_face, weight, pitch_f amily); 97 int32_t index = GetJapanesePreference(cstr_face, weight, pitch_f amily);
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 return FALSE; 222 return FALSE;
223 } 223 }
224 void CFX_GEModule::InitPlatform() 224 void CFX_GEModule::InitPlatform()
225 { 225 {
226 m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault()); 226 m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault());
227 } 227 }
228 void CFX_GEModule::DestroyPlatform() 228 void CFX_GEModule::DestroyPlatform()
229 { 229 {
230 } 230 }
231 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_ 231 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_
OLDNEW
« no previous file with comments | « core/src/fxge/ge/fx_ge_fontmap.cpp ('k') | fpdfsdk/src/fpdf_sysfontinfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698