| 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/fwl/theme/cfwl_widgettp.h" | 7 #include "xfa/fwl/theme/cfwl_widgettp.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 m_dwStyles = dwFontStyles; | 729 m_dwStyles = dwFontStyles; |
| 730 m_dwCodePage = dwCodePage; | 730 m_dwCodePage = dwCodePage; |
| 731 if (!m_pFontMgr) { | 731 if (!m_pFontMgr) { |
| 732 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 732 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
| 733 m_pFontMgr = IFX_FontMgr::Create(FX_GetDefFontEnumerator()); | 733 m_pFontMgr = IFX_FontMgr::Create(FX_GetDefFontEnumerator()); |
| 734 #else | 734 #else |
| 735 m_pFontSource = FX_CreateDefaultFontSourceEnum(); | 735 m_pFontSource = FX_CreateDefaultFontSourceEnum(); |
| 736 m_pFontMgr = IFX_FontMgr::Create(m_pFontSource); | 736 m_pFontMgr = IFX_FontMgr::Create(m_pFontSource); |
| 737 #endif | 737 #endif |
| 738 } | 738 } |
| 739 m_pFont = IFX_Font::LoadFont(wsFontFamily.GetPtr(), dwFontStyles, dwCodePage, | 739 m_pFont = IFX_Font::LoadFont(wsFontFamily.raw_str(), dwFontStyles, dwCodePage, |
| 740 m_pFontMgr); | 740 m_pFontMgr); |
| 741 return m_pFont != NULL; | 741 return m_pFont != NULL; |
| 742 } | 742 } |
| 743 | 743 |
| 744 CFWL_FontManager* CFWL_FontManager::s_FontManager = nullptr; | 744 CFWL_FontManager* CFWL_FontManager::s_FontManager = nullptr; |
| 745 CFWL_FontManager* CFWL_FontManager::GetInstance() { | 745 CFWL_FontManager* CFWL_FontManager::GetInstance() { |
| 746 if (!s_FontManager) | 746 if (!s_FontManager) |
| 747 s_FontManager = new CFWL_FontManager; | 747 s_FontManager = new CFWL_FontManager; |
| 748 return s_FontManager; | 748 return s_FontManager; |
| 749 } | 749 } |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 837 m_pColorData->clrEnd[0] = ArgbEncode(255, 175, 204, 251); | 837 m_pColorData->clrEnd[0] = ArgbEncode(255, 175, 204, 251); |
| 838 m_pColorData->clrEnd[1] = ArgbEncode(255, 185, 218, 251); | 838 m_pColorData->clrEnd[1] = ArgbEncode(255, 185, 218, 251); |
| 839 m_pColorData->clrEnd[2] = ArgbEncode(255, 210, 222, 235); | 839 m_pColorData->clrEnd[2] = ArgbEncode(255, 210, 222, 235); |
| 840 m_pColorData->clrEnd[3] = ArgbEncode(255, 243, 241, 236); | 840 m_pColorData->clrEnd[3] = ArgbEncode(255, 243, 241, 236); |
| 841 m_pColorData->clrSign[0] = ArgbEncode(255, 77, 97, 133); | 841 m_pColorData->clrSign[0] = ArgbEncode(255, 77, 97, 133); |
| 842 m_pColorData->clrSign[1] = ArgbEncode(255, 77, 97, 133); | 842 m_pColorData->clrSign[1] = ArgbEncode(255, 77, 97, 133); |
| 843 m_pColorData->clrSign[2] = ArgbEncode(255, 77, 97, 133); | 843 m_pColorData->clrSign[2] = ArgbEncode(255, 77, 97, 133); |
| 844 m_pColorData->clrSign[3] = ArgbEncode(255, 128, 128, 128); | 844 m_pColorData->clrSign[3] = ArgbEncode(255, 128, 128, 128); |
| 845 } | 845 } |
| 846 } | 846 } |
| OLD | NEW |