OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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/fx_system.h" | 7 #include "core/fxge/android/cfpf_skiafontmgr.h" |
8 | 8 |
9 #define FPF_SKIAMATCHWEIGHT_NAME1 62 | 9 #define FPF_SKIAMATCHWEIGHT_NAME1 62 |
10 #define FPF_SKIAMATCHWEIGHT_NAME2 60 | 10 #define FPF_SKIAMATCHWEIGHT_NAME2 60 |
11 #define FPF_SKIAMATCHWEIGHT_1 16 | 11 #define FPF_SKIAMATCHWEIGHT_1 16 |
12 #define FPF_SKIAMATCHWEIGHT_2 8 | 12 #define FPF_SKIAMATCHWEIGHT_2 8 |
13 | 13 |
14 #include <algorithm> | 14 #include <algorithm> |
15 | 15 |
16 #include "core/fxcrt/fx_ext.h" | 16 #include "core/fxcrt/fx_ext.h" |
17 #include "core/fxcrt/fx_memory.h" | 17 #include "core/fxcrt/fx_memory.h" |
18 #include "core/fxge/android/fpf_skiafont.h" | 18 #include "core/fxcrt/fx_system.h" |
19 #include "core/fxge/android/fpf_skiafontmgr.h" | 19 #include "core/fxge/android/cfpf_skiafont.h" |
| 20 #include "core/fxge/android/cfpf_skiafontdescriptor.h" |
| 21 #include "core/fxge/android/cfpf_skiapathfont.h" |
20 #include "core/fxge/fx_freetype.h" | 22 #include "core/fxge/fx_freetype.h" |
21 | 23 |
22 #ifdef __cplusplus | 24 #ifdef __cplusplus |
23 extern "C" { | 25 extern "C" { |
24 #endif | 26 #endif |
25 static unsigned long FPF_SkiaStream_Read(FXFT_Stream stream, | 27 static unsigned long FPF_SkiaStream_Read(FXFT_Stream stream, |
26 unsigned long offset, | 28 unsigned long offset, |
27 unsigned char* buffer, | 29 unsigned char* buffer, |
28 unsigned long count) { | 30 unsigned long count) { |
29 IFX_SeekableReadStream* pFileRead = | 31 IFX_SeekableReadStream* pFileRead = |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 if ((uSerif > 1 && uSerif < 10) || uSerif > 13) | 474 if ((uSerif > 1 && uSerif < 10) || uSerif > 13) |
473 pFontDesc->m_dwStyle |= FXFONT_SERIF; | 475 pFontDesc->m_dwStyle |= FXFONT_SERIF; |
474 } | 476 } |
475 } | 477 } |
476 if (pOS2 && (pOS2->ulCodePageRange1 & (1 << 31))) | 478 if (pOS2 && (pOS2->ulCodePageRange1 & (1 << 31))) |
477 pFontDesc->m_dwStyle |= FXFONT_SYMBOLIC; | 479 pFontDesc->m_dwStyle |= FXFONT_SYMBOLIC; |
478 pFontDesc->m_dwCharsets = FPF_SkiaGetFaceCharset(pOS2); | 480 pFontDesc->m_dwCharsets = FPF_SkiaGetFaceCharset(pOS2); |
479 pFontDesc->m_iFaceIndex = face->face_index; | 481 pFontDesc->m_iFaceIndex = face->face_index; |
480 pFontDesc->m_iGlyphNum = face->num_glyphs; | 482 pFontDesc->m_iGlyphNum = face->num_glyphs; |
481 } | 483 } |
OLD | NEW |