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 "xfa/src/fgas/src/fgas_base.h" | 7 #include "xfa/src/fgas/src/fgas_base.h" |
| 8 #include "xfa/src/fgas/src/font/fx_fontutils.h" |
8 #include "xfa/src/fgas/src/font/fx_gefont.h" | 9 #include "xfa/src/fgas/src/font/fx_gefont.h" |
9 #include "xfa/src/fgas/src/font/fx_fontutils.h" | |
10 #ifndef _FXPLUS | 10 #ifndef _FXPLUS |
11 IFX_Font* IFX_Font::LoadFont(const FX_WCHAR* pszFontFamily, | 11 IFX_Font* IFX_Font::LoadFont(const FX_WCHAR* pszFontFamily, |
12 FX_DWORD dwFontStyles, | 12 FX_DWORD dwFontStyles, |
13 FX_WORD wCodePage, | 13 FX_WORD wCodePage, |
14 IFX_FontMgr* pFontMgr) { | 14 IFX_FontMgr* pFontMgr) { |
15 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ | 15 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ |
16 if (NULL != pFontMgr) { | 16 if (NULL != pFontMgr) { |
17 return pFontMgr->GetFontByCodePage(wCodePage, dwFontStyles, pszFontFamily); | 17 return pFontMgr->GetFontByCodePage(wCodePage, dwFontStyles, pszFontFamily); |
18 } | 18 } |
19 return NULL; | 19 return NULL; |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 if (m_pRectArray != NULL) { | 563 if (m_pRectArray != NULL) { |
564 m_pRectArray->RemoveAll(); | 564 m_pRectArray->RemoveAll(); |
565 } | 565 } |
566 } | 566 } |
567 IFX_Font* CFX_GEFont::GetSubstFont(int32_t iGlyphIndex) const { | 567 IFX_Font* CFX_GEFont::GetSubstFont(int32_t iGlyphIndex) const { |
568 iGlyphIndex = ((FX_DWORD)iGlyphIndex) >> 24; | 568 iGlyphIndex = ((FX_DWORD)iGlyphIndex) >> 24; |
569 return iGlyphIndex == 0 ? (IFX_Font*)this | 569 return iGlyphIndex == 0 ? (IFX_Font*)this |
570 : (IFX_Font*)m_SubstFonts[iGlyphIndex - 1]; | 570 : (IFX_Font*)m_SubstFonts[iGlyphIndex - 1]; |
571 } | 571 } |
572 #endif | 572 #endif |
OLD | NEW |