| 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/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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 m_FamilyFonts.clear(); | 227 m_FamilyFonts.clear(); |
| 228 for (auto it = m_FontFaces.rbegin(); it != m_FontFaces.rend(); ++it) { | 228 for (auto it = m_FontFaces.rbegin(); it != m_FontFaces.rend(); ++it) { |
| 229 delete *it; | 229 delete *it; |
| 230 } | 230 } |
| 231 m_FontFaces.clear(); | 231 m_FontFaces.clear(); |
| 232 if (m_FTLibrary) { | 232 if (m_FTLibrary) { |
| 233 FXFT_Done_FreeType(m_FTLibrary); | 233 FXFT_Done_FreeType(m_FTLibrary); |
| 234 } | 234 } |
| 235 } | 235 } |
| 236 FX_BOOL CFPF_SkiaFontMgr::InitFTLibrary() { | 236 FX_BOOL CFPF_SkiaFontMgr::InitFTLibrary() { |
| 237 if (!m_FTLibrary) { | 237 if (!m_FTLibrary) |
| 238 FXFT_Init_FreeType(&m_FTLibrary); | 238 FXFT_Init_FreeType(&m_FTLibrary); |
| 239 } | 239 return !!m_FTLibrary; |
| 240 return m_FTLibrary != NULL; | |
| 241 } | 240 } |
| 242 void CFPF_SkiaFontMgr::LoadSystemFonts() { | 241 void CFPF_SkiaFontMgr::LoadSystemFonts() { |
| 243 if (m_bLoaded) { | 242 if (m_bLoaded) { |
| 244 return; | 243 return; |
| 245 } | 244 } |
| 246 ScanPath("/system/fonts"); | 245 ScanPath("/system/fonts"); |
| 247 OutputSystemFonts(); | 246 OutputSystemFonts(); |
| 248 m_bLoaded = TRUE; | 247 m_bLoaded = TRUE; |
| 249 } | 248 } |
| 250 void CFPF_SkiaFontMgr::LoadPrivateFont(IFX_FileRead* pFontFile) {} | 249 void CFPF_SkiaFontMgr::LoadPrivateFont(IFX_FileRead* pFontFile) {} |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 } | 514 } |
| 516 if (pOS2 && (pOS2->ulCodePageRange1 & (1 << 31))) { | 515 if (pOS2 && (pOS2->ulCodePageRange1 & (1 << 31))) { |
| 517 pFontDesc->m_dwStyle |= FXFONT_SYMBOLIC; | 516 pFontDesc->m_dwStyle |= FXFONT_SYMBOLIC; |
| 518 } | 517 } |
| 519 pFontDesc->m_dwCharsets = FPF_SkiaGetFaceCharset(pOS2); | 518 pFontDesc->m_dwCharsets = FPF_SkiaGetFaceCharset(pOS2); |
| 520 pFontDesc->m_iFaceIndex = face->face_index; | 519 pFontDesc->m_iFaceIndex = face->face_index; |
| 521 pFontDesc->m_iGlyphNum = face->num_glyphs; | 520 pFontDesc->m_iGlyphNum = face->num_glyphs; |
| 522 } | 521 } |
| 523 void CFPF_SkiaFontMgr::OutputSystemFonts() {} | 522 void CFPF_SkiaFontMgr::OutputSystemFonts() {} |
| 524 #endif | 523 #endif |
| OLD | NEW |