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 "core/include/fxge/fx_freetype.h" |
8 #include "../../../include/fxge/fx_freetype.h" | 8 #include "core/include/fxge/fx_ge.h" |
9 #include "text_int.h" | 9 #include "text_int.h" |
10 | 10 |
11 #define EM_ADJUST(em, a) (em == 0 ? (a) : (a)*1000 / em) | 11 #define EM_ADJUST(em, a) (em == 0 ? (a) : (a)*1000 / em) |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 FXFT_Face FT_LoadFont(const uint8_t* pData, int size) { | 15 FXFT_Face FT_LoadFont(const uint8_t* pData, int size) { |
16 return CFX_GEModule::Get()->GetFontMgr()->GetFixedFace(pData, size, 0); | 16 return CFX_GEModule::Get()->GetFontMgr()->GetFixedFace(pData, size, 0); |
17 } | 17 } |
18 | 18 |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 | 330 |
331 if (m_pFont->GetSubstFont() && m_pFont->GetSubstFont()->m_Charset == 2) { | 331 if (m_pFont->GetSubstFont() && m_pFont->GetSubstFont()->m_Charset == 2) { |
332 FX_DWORD index = 0; | 332 FX_DWORD index = 0; |
333 if (FXFT_Select_Charmap(face, FXFT_ENCODING_MS_SYMBOL) == 0) | 333 if (FXFT_Select_Charmap(face, FXFT_ENCODING_MS_SYMBOL) == 0) |
334 index = FXFT_Get_Char_Index(face, charcode); | 334 index = FXFT_Get_Char_Index(face, charcode); |
335 if (!index && !FXFT_Select_Charmap(face, FXFT_ENCODING_APPLE_ROMAN)) | 335 if (!index && !FXFT_Select_Charmap(face, FXFT_ENCODING_APPLE_ROMAN)) |
336 return FXFT_Get_Char_Index(face, charcode); | 336 return FXFT_Get_Char_Index(face, charcode); |
337 } | 337 } |
338 return charcode; | 338 return charcode; |
339 } | 339 } |
OLD | NEW |