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

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

Issue 1277883004: Add CFX_FontFaceInfo constructor. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Put consts together 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 "../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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 iSimilarValue += 8; 191 iSimilarValue += 8;
192 } 192 }
193 return iSimilarValue; 193 return iSimilarValue;
194 } 194 }
195 void* CFX_LinuxFontInfo::FindFont(int weight, 195 void* CFX_LinuxFontInfo::FindFont(int weight,
196 FX_BOOL bItalic, 196 FX_BOOL bItalic,
197 int charset, 197 int charset,
198 int pitch_family, 198 int pitch_family,
199 const FX_CHAR* family, 199 const FX_CHAR* family,
200 FX_BOOL bMatchName) { 200 FX_BOOL bMatchName) {
201 CFontFaceInfo* pFind = NULL; 201 CFX_FontFaceInfo* pFind = NULL;
202 FX_DWORD charset_flag = _LinuxGetCharset(charset); 202 FX_DWORD charset_flag = _LinuxGetCharset(charset);
203 int32_t iBestSimilar = 0; 203 int32_t iBestSimilar = 0;
204 FX_POSITION pos = m_FontList.GetStartPosition(); 204 FX_POSITION pos = m_FontList.GetStartPosition();
205 while (pos) { 205 while (pos) {
206 CFX_ByteString bsName; 206 CFX_ByteString bsName;
207 CFontFaceInfo* pFont = NULL; 207 CFX_FontFaceInfo* pFont = NULL;
208 m_FontList.GetNextAssoc(pos, bsName, (void*&)pFont); 208 m_FontList.GetNextAssoc(pos, bsName, (void*&)pFont);
209 if (!(pFont->m_Charsets & charset_flag) && 209 if (!(pFont->m_Charsets & charset_flag) &&
210 charset != FXFONT_DEFAULT_CHARSET) { 210 charset != FXFONT_DEFAULT_CHARSET) {
211 continue; 211 continue;
212 } 212 }
213 int32_t iSimilarValue = 0; 213 int32_t iSimilarValue = 0;
214 int32_t index = bsName.Find(family); 214 int32_t index = bsName.Find(family);
215 if (bMatchName && index < 0) { 215 if (bMatchName && index < 0) {
216 continue; 216 continue;
217 } 217 }
(...skipping 20 matching lines...) Expand all
238 return pInfo; 238 return pInfo;
239 } 239 }
240 FX_BOOL CFX_LinuxFontInfo::ParseFontCfg() { 240 FX_BOOL CFX_LinuxFontInfo::ParseFontCfg() {
241 return FALSE; 241 return FALSE;
242 } 242 }
243 void CFX_GEModule::InitPlatform() { 243 void CFX_GEModule::InitPlatform() {
244 m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault()); 244 m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault());
245 } 245 }
246 void CFX_GEModule::DestroyPlatform() {} 246 void CFX_GEModule::DestroyPlatform() {}
247 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_ 247 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698