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/fxge/fx_ge.h" | 7 #include "../../../include/fxge/fx_ge.h" |
8 #include "../../../include/fxge/fx_freetype.h" | 8 #include "../../../include/fxge/fx_freetype.h" |
9 #include "text_int.h" | 9 #include "text_int.h" |
10 #define EM_ADJUST(em, a) (em == 0 ? (a) : (a)*1000 / em) | 10 #define EM_ADJUST(em, a) (em == 0 ? (a) : (a)*1000 / em) |
11 extern void _FPDFAPI_GetInternalFontData(int id1, | |
12 const uint8_t*& data, | |
13 FX_DWORD& size); | |
14 CFX_Font::CFX_Font() { | 11 CFX_Font::CFX_Font() { |
15 m_pSubstFont = NULL; | 12 m_pSubstFont = NULL; |
16 m_Face = NULL; | 13 m_Face = NULL; |
17 m_bEmbedded = FALSE; | 14 m_bEmbedded = FALSE; |
18 m_bVertical = FALSE; | 15 m_bVertical = FALSE; |
19 m_pFontData = NULL; | 16 m_pFontData = NULL; |
20 m_pFontDataAllocation = NULL; | 17 m_pFontDataAllocation = NULL; |
21 m_dwSize = 0; | 18 m_dwSize = 0; |
22 m_pGsubData = NULL; | 19 m_pGsubData = NULL; |
23 m_pPlatformFont = NULL; | 20 m_pPlatformFont = NULL; |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 | 337 |
341 if (m_pFont->GetSubstFont() && m_pFont->GetSubstFont()->m_Charset == 2) { | 338 if (m_pFont->GetSubstFont() && m_pFont->GetSubstFont()->m_Charset == 2) { |
342 FX_DWORD index = 0; | 339 FX_DWORD index = 0; |
343 if (FXFT_Select_Charmap(face, FXFT_ENCODING_MS_SYMBOL) == 0) | 340 if (FXFT_Select_Charmap(face, FXFT_ENCODING_MS_SYMBOL) == 0) |
344 index = FXFT_Get_Char_Index(face, charcode); | 341 index = FXFT_Get_Char_Index(face, charcode); |
345 if (!index && !FXFT_Select_Charmap(face, FXFT_ENCODING_APPLE_ROMAN)) | 342 if (!index && !FXFT_Select_Charmap(face, FXFT_ENCODING_APPLE_ROMAN)) |
346 return FXFT_Get_Char_Index(face, charcode); | 343 return FXFT_Get_Char_Index(face, charcode); |
347 } | 344 } |
348 return charcode; | 345 return charcode; |
349 } | 346 } |
OLD | NEW |