Chromium Code Reviews| 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_unicodeencoding.h" | |
| 10 #include "core/fxge/include/cfx_unicodeencodingex.h" | |
|
dsinclair
2016/08/18 17:43:03
This needs to be inside an #ifdef PDF_ENABLE_XFA b
npm
2016/08/18 17:53:23
Why? The whole xfa directory is under if(pdf_enabl
| |
| 9 #include "xfa/fgas/crt/fgas_codepage.h" | 11 #include "xfa/fgas/crt/fgas_codepage.h" |
| 10 #include "xfa/fgas/font/fgas_fontutils.h" | 12 #include "xfa/fgas/font/fgas_fontutils.h" |
| 11 #include "xfa/fxfa/include/xfa_fontmgr.h" | 13 #include "xfa/fxfa/include/xfa_fontmgr.h" |
| 12 | 14 |
| 13 // static | 15 // static |
| 14 CFGAS_GEFont* CFGAS_GEFont::LoadFont(const FX_WCHAR* pszFontFamily, | 16 CFGAS_GEFont* CFGAS_GEFont::LoadFont(const FX_WCHAR* pszFontFamily, |
| 15 uint32_t dwFontStyles, | 17 uint32_t dwFontStyles, |
| 16 uint16_t wCodePage, | 18 uint16_t wCodePage, |
| 17 IFGAS_FontMgr* pFontMgr) { | 19 IFGAS_FontMgr* pFontMgr) { |
| 18 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ | 20 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 448 } | 450 } |
| 449 if (m_pRectArray) { | 451 if (m_pRectArray) { |
| 450 m_pRectArray->RemoveAll(FALSE); | 452 m_pRectArray->RemoveAll(FALSE); |
| 451 } | 453 } |
| 452 } | 454 } |
| 453 CFGAS_GEFont* CFGAS_GEFont::GetSubstFont(int32_t iGlyphIndex) const { | 455 CFGAS_GEFont* CFGAS_GEFont::GetSubstFont(int32_t iGlyphIndex) const { |
| 454 iGlyphIndex = ((uint32_t)iGlyphIndex) >> 24; | 456 iGlyphIndex = ((uint32_t)iGlyphIndex) >> 24; |
| 455 return iGlyphIndex == 0 ? const_cast<CFGAS_GEFont*>(this) | 457 return iGlyphIndex == 0 ? const_cast<CFGAS_GEFont*>(this) |
| 456 : m_SubstFonts[iGlyphIndex - 1]; | 458 : m_SubstFonts[iGlyphIndex - 1]; |
| 457 } | 459 } |
| OLD | NEW |