diff options
Diffstat (limited to 'xfa/fwl')
-rw-r--r-- | xfa/fwl/basewidget/fwl_barcodeimp.cpp | 3 | ||||
-rw-r--r-- | xfa/fwl/basewidget/fwl_editimp.cpp | 5 | ||||
-rw-r--r-- | xfa/fwl/theme/cfwl_widgettp.cpp | 15 | ||||
-rw-r--r-- | xfa/fwl/theme/cfwl_widgettp.h | 22 |
4 files changed, 24 insertions, 21 deletions
diff --git a/xfa/fwl/basewidget/fwl_barcodeimp.cpp b/xfa/fwl/basewidget/fwl_barcodeimp.cpp index 1c55f5a9f0..1789f9f075 100644 --- a/xfa/fwl/basewidget/fwl_barcodeimp.cpp +++ b/xfa/fwl/basewidget/fwl_barcodeimp.cpp @@ -6,6 +6,7 @@ #include "xfa/fwl/basewidget/fwl_barcodeimp.h" +#include "xfa/fgas/font/fgas_gefont.h" #include "xfa/fwl/basewidget/fwl_editimp.h" #include "xfa/fwl/basewidget/fxmath_barcodeimp.h" #include "xfa/fwl/core/cfwl_themepart.h" @@ -111,7 +112,7 @@ void CFWL_BarcodeImp::GenerateBarcodeImageCache() { CFWL_ThemePart part; part.m_pWidget = m_pInterface; IFWL_ThemeProvider* pTheme = GetAvailableTheme(); - IFGAS_Font* pFont = static_cast<IFGAS_Font*>( + CFGAS_GEFont* pFont = static_cast<CFGAS_GEFont*>( pTheme->GetCapacity(&part, CFWL_WidgetCapacity::Font)); CFX_Font* pCXFont = pFont ? pFont->GetDevFont() : nullptr; if (pCXFont) { diff --git a/xfa/fwl/basewidget/fwl_editimp.cpp b/xfa/fwl/basewidget/fwl_editimp.cpp index e1b82a07c6..bf1d19f294 100644 --- a/xfa/fwl/basewidget/fwl_editimp.cpp +++ b/xfa/fwl/basewidget/fwl_editimp.cpp @@ -15,6 +15,7 @@ #include "xfa/fde/fde_gedevice.h" #include "xfa/fde/fde_render.h" #include "xfa/fde/ifde_txtedtpage.h" +#include "xfa/fgas/font/fgas_gefont.h" #include "xfa/fwl/basewidget/fwl_caretimp.h" #include "xfa/fwl/basewidget/fwl_comboboximp.h" #include "xfa/fwl/basewidget/fwl_scrollbarimp.h" @@ -1194,8 +1195,8 @@ void CFWL_EditImp::UpdateEditParams() { if (!pLineHeight) return; params.fLineSpace = *pLineHeight; - IFGAS_Font* pFont = - static_cast<IFGAS_Font*>(GetThemeCapacity(CFWL_WidgetCapacity::Font)); + CFGAS_GEFont* pFont = + static_cast<CFGAS_GEFont*>(GetThemeCapacity(CFWL_WidgetCapacity::Font)); if (!pFont) return; params.pFont = pFont; diff --git a/xfa/fwl/theme/cfwl_widgettp.cpp b/xfa/fwl/theme/cfwl_widgettp.cpp index 1b437ebe9b..867e908a0e 100644 --- a/xfa/fwl/theme/cfwl_widgettp.cpp +++ b/xfa/fwl/theme/cfwl_widgettp.cpp @@ -9,6 +9,7 @@ #include <algorithm> #include "xfa/fde/tto/fde_textout.h" +#include "xfa/fgas/font/fgas_gefont.h" #include "xfa/fgas/font/fgas_stdfontmgr.h" #include "xfa/fwl/core/cfwl_themebackground.h" #include "xfa/fwl/core/cfwl_themepart.h" @@ -201,7 +202,7 @@ FWL_Error CFWL_WidgetTP::SetFont(IFWL_Widget* pWidget, return FWL_Error::Succeeded; } FWL_Error CFWL_WidgetTP::SetFont(IFWL_Widget* pWidget, - IFGAS_Font* pFont, + CFGAS_GEFont* pFont, FX_FLOAT fFontSize, FX_ARGB rgbFont) { if (!m_pTextOut) @@ -212,7 +213,7 @@ FWL_Error CFWL_WidgetTP::SetFont(IFWL_Widget* pWidget, m_pTextOut->SetTextColor(rgbFont); return FWL_Error::Succeeded; } -IFGAS_Font* CFWL_WidgetTP::GetFont(IFWL_Widget* pWidget) { +CFGAS_GEFont* CFWL_WidgetTP::GetFont(IFWL_Widget* pWidget) { return m_pFDEFont; } @@ -711,8 +712,8 @@ FX_BOOL CFWL_FontData::LoadFont(const CFX_WideStringC& wsFontFamily, m_pFontMgr = IFGAS_FontMgr::Create(m_pFontSource); #endif } - m_pFont = IFGAS_Font::LoadFont(wsFontFamily.c_str(), dwFontStyles, dwCodePage, - m_pFontMgr); + m_pFont = CFGAS_GEFont::LoadFont(wsFontFamily.c_str(), dwFontStyles, + dwCodePage, m_pFontMgr); return m_pFont != NULL; } @@ -728,9 +729,9 @@ void CFWL_FontManager::DestroyInstance() { } CFWL_FontManager::CFWL_FontManager() {} CFWL_FontManager::~CFWL_FontManager() {} -IFGAS_Font* CFWL_FontManager::FindFont(const CFX_WideStringC& wsFontFamily, - uint32_t dwFontStyles, - uint16_t wCodePage) { +CFGAS_GEFont* CFWL_FontManager::FindFont(const CFX_WideStringC& wsFontFamily, + uint32_t dwFontStyles, + uint16_t wCodePage) { for (const auto& pData : m_FontsArray) { if (pData->Equal(wsFontFamily, dwFontStyles, wCodePage)) return pData->GetFont(); diff --git a/xfa/fwl/theme/cfwl_widgettp.h b/xfa/fwl/theme/cfwl_widgettp.h index 971b6f09b1..20be62619e 100644 --- a/xfa/fwl/theme/cfwl_widgettp.h +++ b/xfa/fwl/theme/cfwl_widgettp.h @@ -91,14 +91,14 @@ enum class CFWL_WidgetCapacity { Width }; -class IFWL_Widget; class CFDE_TextOut; -class IFGAS_Font; -class IFGAS_FontMgr; +class CFGAS_GEFont; class CFWL_ArrowData; class CFWL_ThemeBackground; class CFWL_ThemePart; class CFWL_ThemeText; +class IFGAS_FontMgr; +class IFWL_Widget; #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ class CFX_FontSourceEnum_File; @@ -135,10 +135,10 @@ class CFWL_WidgetTP { FX_FLOAT fFontSize, FX_ARGB rgbFont); FWL_Error SetFont(IFWL_Widget* pWidget, - IFGAS_Font* pFont, + CFGAS_GEFont* pFont, FX_FLOAT fFontSize, FX_ARGB rgbFont); - IFGAS_Font* GetFont(IFWL_Widget* pWidget); + CFGAS_GEFont* GetFont(IFWL_Widget* pWidget); protected: CFWL_WidgetTP(); @@ -221,7 +221,7 @@ class CFWL_WidgetTP { CFX_Matrix* pMatrix = NULL); uint32_t m_dwRefCount; std::unique_ptr<CFDE_TextOut> m_pTextOut; - IFGAS_Font* m_pFDEFont; + CFGAS_GEFont* m_pFDEFont; FX_FLOAT m_fValue; uint32_t m_dwValue; CFX_RectF m_rtMargin; @@ -264,13 +264,13 @@ class CFWL_FontData { FX_BOOL LoadFont(const CFX_WideStringC& wsFontFamily, uint32_t dwFontStyles, uint16_t wCodePage); - IFGAS_Font* GetFont() const { return m_pFont; } + CFGAS_GEFont* GetFont() const { return m_pFont; } protected: CFX_WideString m_wsFamily; uint32_t m_dwStyles; uint32_t m_dwCodePage; - IFGAS_Font* m_pFont; + CFGAS_GEFont* m_pFont; IFGAS_FontMgr* m_pFontMgr; #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ CFX_FontSourceEnum_File* m_pFontSource; @@ -282,9 +282,9 @@ class CFWL_FontManager { static CFWL_FontManager* GetInstance(); static void DestroyInstance(); - IFGAS_Font* FindFont(const CFX_WideStringC& wsFontFamily, - uint32_t dwFontStyles, - uint16_t dwCodePage); + CFGAS_GEFont* FindFont(const CFX_WideStringC& wsFontFamily, + uint32_t dwFontStyles, + uint16_t dwCodePage); protected: CFWL_FontManager(); |