| 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 "../../../include/fxcrt/fx_ext.h" | 7 #include "../../../include/fxcrt/fx_ext.h" |
| 8 #include "fx_fpf.h" | 8 #include "fx_fpf.h" |
| 9 #if _FX_OS_ == _FX_ANDROID_ | 9 #if _FX_OS_ == _FX_ANDROID_ |
| 10 #define FPF_SKIAMATCHWEIGHT_NAME1 62 | 10 #define FPF_SKIAMATCHWEIGHT_NAME1 62 |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 } | 330 } |
| 331 } | 331 } |
| 332 if (nItem > -1) { | 332 if (nItem > -1) { |
| 333 CFPF_SkiaFontDescriptor* pFontDes = | 333 CFPF_SkiaFontDescriptor* pFontDes = |
| 334 (CFPF_SkiaFontDescriptor*)m_FontFaces.ElementAt(nItem); | 334 (CFPF_SkiaFontDescriptor*)m_FontFaces.ElementAt(nItem); |
| 335 CFPF_SkiaFont* pFont = new CFPF_SkiaFont; | 335 CFPF_SkiaFont* pFont = new CFPF_SkiaFont; |
| 336 if (pFont->InitFont(this, pFontDes, bsFamilyname, dwStyle, uCharset)) { | 336 if (pFont->InitFont(this, pFontDes, bsFamilyname, dwStyle, uCharset)) { |
| 337 m_FamilyFonts.SetAt((void*)(uintptr_t)dwHash, (void*)pFont); | 337 m_FamilyFonts.SetAt((void*)(uintptr_t)dwHash, (void*)pFont); |
| 338 return pFont->Retain(); | 338 return pFont->Retain(); |
| 339 } | 339 } |
| 340 pFont->Release() | 340 pFont->Release(); |
| 341 } | 341 } |
| 342 return NULL; | 342 return NULL; |
| 343 } | 343 } |
| 344 FXFT_Face CFPF_SkiaFontMgr::GetFontFace(IFX_FileRead* pFileRead, | 344 FXFT_Face CFPF_SkiaFontMgr::GetFontFace(IFX_FileRead* pFileRead, |
| 345 int32_t iFaceIndex) { | 345 int32_t iFaceIndex) { |
| 346 if (!pFileRead) { | 346 if (!pFileRead) { |
| 347 return NULL; | 347 return NULL; |
| 348 } | 348 } |
| 349 if (pFileRead->GetSize() == 0) { | 349 if (pFileRead->GetSize() == 0) { |
| 350 return NULL; | 350 return NULL; |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 } | 521 } |
| 522 if (pOS2 && (pOS2->ulCodePageRange1 & (1 << 31))) { | 522 if (pOS2 && (pOS2->ulCodePageRange1 & (1 << 31))) { |
| 523 pFontDesc->m_dwStyle |= FXFONT_SYMBOLIC; | 523 pFontDesc->m_dwStyle |= FXFONT_SYMBOLIC; |
| 524 } | 524 } |
| 525 pFontDesc->m_dwCharsets = FPF_SkiaGetFaceCharset(pOS2); | 525 pFontDesc->m_dwCharsets = FPF_SkiaGetFaceCharset(pOS2); |
| 526 pFontDesc->m_iFaceIndex = face->face_index; | 526 pFontDesc->m_iFaceIndex = face->face_index; |
| 527 pFontDesc->m_iGlyphNum = face->num_glyphs; | 527 pFontDesc->m_iGlyphNum = face->num_glyphs; |
| 528 } | 528 } |
| 529 void CFPF_SkiaFontMgr::OutputSystemFonts() {} | 529 void CFPF_SkiaFontMgr::OutputSystemFonts() {} |
| 530 #endif | 530 #endif |
| OLD | NEW |