| 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/fgas/font/fgas_gefont.h" | 7 #include "xfa/fgas/font/fgas_gefont.h" |
| 8 | 8 |
| 9 #include "core/fxge/include/cfx_substfont.h" |
| 9 #include "core/fxge/include/cfx_unicodeencoding.h" | 10 #include "core/fxge/include/cfx_unicodeencoding.h" |
| 10 #include "core/fxge/include/cfx_unicodeencodingex.h" | 11 #include "core/fxge/include/cfx_unicodeencodingex.h" |
| 11 #include "xfa/fgas/crt/fgas_codepage.h" | 12 #include "xfa/fgas/crt/fgas_codepage.h" |
| 12 #include "xfa/fgas/font/fgas_fontutils.h" | 13 #include "xfa/fgas/font/fgas_fontutils.h" |
| 13 #include "xfa/fxfa/include/xfa_fontmgr.h" | 14 #include "xfa/fxfa/include/xfa_fontmgr.h" |
| 14 | 15 |
| 15 // static | 16 // static |
| 16 CFGAS_GEFont* CFGAS_GEFont::LoadFont(const FX_WCHAR* pszFontFamily, | 17 CFGAS_GEFont* CFGAS_GEFont::LoadFont(const FX_WCHAR* pszFontFamily, |
| 17 uint32_t dwFontStyles, | 18 uint32_t dwFontStyles, |
| 18 uint16_t wCodePage, | 19 uint16_t wCodePage, |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 } | 451 } |
| 451 if (m_pRectArray) { | 452 if (m_pRectArray) { |
| 452 m_pRectArray->RemoveAll(FALSE); | 453 m_pRectArray->RemoveAll(FALSE); |
| 453 } | 454 } |
| 454 } | 455 } |
| 455 CFGAS_GEFont* CFGAS_GEFont::GetSubstFont(int32_t iGlyphIndex) const { | 456 CFGAS_GEFont* CFGAS_GEFont::GetSubstFont(int32_t iGlyphIndex) const { |
| 456 iGlyphIndex = ((uint32_t)iGlyphIndex) >> 24; | 457 iGlyphIndex = ((uint32_t)iGlyphIndex) >> 24; |
| 457 return iGlyphIndex == 0 ? const_cast<CFGAS_GEFont*>(this) | 458 return iGlyphIndex == 0 ? const_cast<CFGAS_GEFont*>(this) |
| 458 : m_SubstFonts[iGlyphIndex - 1]; | 459 : m_SubstFonts[iGlyphIndex - 1]; |
| 459 } | 460 } |
| OLD | NEW |