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

Side by Side Diff: core/fxge/android/fpf_skiafontmgr.cpp

Issue 1881043004: Cleanup IFPF_* interfaces. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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 "core/fxcrt/include/fx_system.h" 7 #include "core/fxcrt/include/fx_system.h"
8 8
9 #if _FX_OS_ == _FX_ANDROID_ 9 #if _FX_OS_ == _FX_ANDROID_
10 10
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 if (m_bLoaded) { 243 if (m_bLoaded) {
244 return; 244 return;
245 } 245 }
246 ScanPath("/system/fonts"); 246 ScanPath("/system/fonts");
247 OutputSystemFonts(); 247 OutputSystemFonts();
248 m_bLoaded = TRUE; 248 m_bLoaded = TRUE;
249 } 249 }
250 void CFPF_SkiaFontMgr::LoadPrivateFont(IFX_FileRead* pFontFile) {} 250 void CFPF_SkiaFontMgr::LoadPrivateFont(IFX_FileRead* pFontFile) {}
251 void CFPF_SkiaFontMgr::LoadPrivateFont(const CFX_ByteStringC& bsFileName) {} 251 void CFPF_SkiaFontMgr::LoadPrivateFont(const CFX_ByteStringC& bsFileName) {}
252 void CFPF_SkiaFontMgr::LoadPrivateFont(void* pBuffer, size_t szBuffer) {} 252 void CFPF_SkiaFontMgr::LoadPrivateFont(void* pBuffer, size_t szBuffer) {}
253 IFPF_Font* CFPF_SkiaFontMgr::CreateFont(const CFX_ByteStringC& bsFamilyname, 253 CFPF_SkiaFont* CFPF_SkiaFontMgr::CreateFont(const CFX_ByteStringC& bsFamilyname,
254 uint8_t uCharset, 254 uint8_t uCharset,
255 uint32_t dwStyle, 255 uint32_t dwStyle,
256 uint32_t dwMatch) { 256 uint32_t dwMatch) {
257 uint32_t dwHash = FPF_SKIAGetFamilyHash(bsFamilyname, dwStyle, uCharset); 257 uint32_t dwHash = FPF_SKIAGetFamilyHash(bsFamilyname, dwStyle, uCharset);
258 auto it = m_FamilyFonts.find(dwHash); 258 auto it = m_FamilyFonts.find(dwHash);
259 if (it != m_FamilyFonts.end() && it->second) 259 if (it != m_FamilyFonts.end() && it->second)
260 return it->second->Retain(); 260 return it->second->Retain();
261 261
262 uint32_t dwFaceName = FPF_SKIANormalizeFontName(bsFamilyname); 262 uint32_t dwFaceName = FPF_SKIANormalizeFontName(bsFamilyname);
263 uint32_t dwSubst = FPF_SkiaGetSubstFont(dwFaceName); 263 uint32_t dwSubst = FPF_SkiaGetSubstFont(dwFaceName);
264 uint32_t dwSubstSans = FPF_SkiaGetSansFont(dwFaceName); 264 uint32_t dwSubstSans = FPF_SkiaGetSansFont(dwFaceName);
265 FX_BOOL bMaybeSymbol = FPF_SkiaMaybeSymbol(bsFamilyname); 265 FX_BOOL bMaybeSymbol = FPF_SkiaMaybeSymbol(bsFamilyname);
266 if (uCharset != FXFONT_ARABIC_CHARSET && FPF_SkiaMaybeArabic(bsFamilyname)) { 266 if (uCharset != FXFONT_ARABIC_CHARSET && FPF_SkiaMaybeArabic(bsFamilyname)) {
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 } 515 }
516 if (pOS2 && (pOS2->ulCodePageRange1 & (1 << 31))) { 516 if (pOS2 && (pOS2->ulCodePageRange1 & (1 << 31))) {
517 pFontDesc->m_dwStyle |= FXFONT_SYMBOLIC; 517 pFontDesc->m_dwStyle |= FXFONT_SYMBOLIC;
518 } 518 }
519 pFontDesc->m_dwCharsets = FPF_SkiaGetFaceCharset(pOS2); 519 pFontDesc->m_dwCharsets = FPF_SkiaGetFaceCharset(pOS2);
520 pFontDesc->m_iFaceIndex = face->face_index; 520 pFontDesc->m_iFaceIndex = face->face_index;
521 pFontDesc->m_iGlyphNum = face->num_glyphs; 521 pFontDesc->m_iGlyphNum = face->num_glyphs;
522 } 522 }
523 void CFPF_SkiaFontMgr::OutputSystemFonts() {} 523 void CFPF_SkiaFontMgr::OutputSystemFonts() {}
524 #endif 524 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698