diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-07-12 14:07:37 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-07-17 10:29:26 +0000 |
commit | ec02ee4181c49b61fce1c8fb99292dbb8139cc90 (patch) | |
tree | 25cde714b2b71eb639d1cd53f5a22e9ba76e14ef /chromium/third_party/pdfium/xfa/fgas/font/cfgas_gefont.h | |
parent | bb09965444b5bb20b096a291445170876225268d (diff) | |
download | qtwebengine-chromium-ec02ee4181c49b61fce1c8fb99292dbb8139cc90.tar.gz |
BASELINE: Update Chromium to 59.0.3071.134
Change-Id: Id02ef6fb2204c5fd21668a1c3e6911c83b17585a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/third_party/pdfium/xfa/fgas/font/cfgas_gefont.h')
-rw-r--r-- | chromium/third_party/pdfium/xfa/fgas/font/cfgas_gefont.h | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/chromium/third_party/pdfium/xfa/fgas/font/cfgas_gefont.h b/chromium/third_party/pdfium/xfa/fgas/font/cfgas_gefont.h index 2201721a934..14029be1e08 100644 --- a/chromium/third_party/pdfium/xfa/fgas/font/cfgas_gefont.h +++ b/chromium/third_party/pdfium/xfa/fgas/font/cfgas_gefont.h @@ -13,7 +13,6 @@ #include "core/fxcrt/cfx_retain_ptr.h" #include "core/fxcrt/fx_memory.h" -#include "xfa/fgas/crt/fgas_utils.h" #include "xfa/fgas/font/cfgas_fontmgr.h" #define FXFONT_SUBST_ITALIC 0x02 @@ -29,7 +28,7 @@ class CFGAS_GEFont : public CFX_Retainable { template <typename T, typename... Args> friend CFX_RetainPtr<T> pdfium::MakeRetain(Args&&... args); - static CFX_RetainPtr<CFGAS_GEFont> LoadFont(const FX_WCHAR* pszFontFamily, + static CFX_RetainPtr<CFGAS_GEFont> LoadFont(const wchar_t* pszFontFamily, uint32_t dwFontStyles, uint16_t wCodePage, CFGAS_FontMgr* pFontMgr); @@ -38,24 +37,15 @@ class CFGAS_GEFont : public CFX_Retainable { static CFX_RetainPtr<CFGAS_GEFont> LoadFont( std::unique_ptr<CFX_Font> pInternalFont, CFGAS_FontMgr* pFontMgr); -#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ - static CFX_RetainPtr<CFGAS_GEFont> LoadFont(const uint8_t* pBuffer, - int32_t iLength, - CFGAS_FontMgr* pFontMgr); - static CFX_RetainPtr<CFGAS_GEFont> LoadFont( - const CFX_RetainPtr<IFGAS_Stream>& pFontStream, - CFGAS_FontMgr* pFontMgr, - bool bSaveStream); -#endif CFX_RetainPtr<CFGAS_GEFont> Derive(uint32_t dwFontStyles, uint16_t wCodePage = 0); uint32_t GetFontStyles() const; - bool GetCharWidth(FX_WCHAR wUnicode, int32_t& iWidth, bool bCharCode); - int32_t GetGlyphIndex(FX_WCHAR wUnicode, bool bCharCode = false); + bool GetCharWidth(wchar_t wUnicode, int32_t& iWidth, bool bCharCode); + int32_t GetGlyphIndex(wchar_t wUnicode, bool bCharCode = false); int32_t GetAscent() const; int32_t GetDescent() const; - bool GetCharBBox(FX_WCHAR wUnicode, CFX_Rect* bbox, bool bCharCode = false); + bool GetCharBBox(wchar_t wUnicode, CFX_Rect* bbox, bool bCharCode = false); bool GetBBox(CFX_Rect* bbox); CFX_RetainPtr<CFGAS_GEFont> GetSubstFont(int32_t iGlyphIndex); CFX_Font* GetDevFont() const { return m_pFont; } @@ -73,7 +63,7 @@ class CFGAS_GEFont : public CFX_Retainable { ~CFGAS_GEFont() override; #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ - bool LoadFontInternal(const FX_WCHAR* pszFontFamily, + bool LoadFontInternal(const wchar_t* pszFontFamily, uint32_t dwFontStyles, uint16_t wCodePage); bool LoadFontInternal(const uint8_t* pBuffer, int32_t length); @@ -83,15 +73,15 @@ class CFGAS_GEFont : public CFX_Retainable { bool LoadFontInternal(CFX_Font* pExternalFont); bool LoadFontInternal(std::unique_ptr<CFX_Font> pInternalFont); bool InitFont(); - bool GetCharBBoxInternal(FX_WCHAR wUnicode, + bool GetCharBBoxInternal(wchar_t wUnicode, CFX_Rect* bbox, bool bRecursive, bool bCharCode = false); - bool GetCharWidthInternal(FX_WCHAR wUnicode, + bool GetCharWidthInternal(wchar_t wUnicode, int32_t& iWidth, bool bRecursive, bool bCharCode); - int32_t GetGlyphIndex(FX_WCHAR wUnicode, + int32_t GetGlyphIndex(wchar_t wUnicode, bool bRecursive, CFX_RetainPtr<CFGAS_GEFont>* ppFont, bool bCharCode = false); @@ -108,11 +98,11 @@ class CFGAS_GEFont : public CFX_Retainable { CFX_RetainPtr<IFGAS_Stream> m_pStream; CFX_RetainPtr<IFX_SeekableReadStream> m_pFileRead; std::unique_ptr<CFX_UnicodeEncoding> m_pFontEncoding; - std::unique_ptr<CFX_DiscreteArrayTemplate<uint16_t>> m_pCharWidthMap; - std::map<FX_WCHAR, CFX_Rect> m_BBoxMap; + std::map<wchar_t, int32_t> m_CharWidthMap; + std::map<wchar_t, CFX_Rect> m_BBoxMap; CXFA_PDFFontMgr* m_pProvider; // not owned. std::vector<CFX_RetainPtr<CFGAS_GEFont>> m_SubstFonts; - std::map<FX_WCHAR, CFX_RetainPtr<CFGAS_GEFont>> m_FontMapper; + std::map<wchar_t, CFX_RetainPtr<CFGAS_GEFont>> m_FontMapper; }; #endif // XFA_FGAS_FONT_CFGAS_GEFONT_H_ |