summaryrefslogtreecommitdiff
path: root/xfa/fgas/font/cfgas_fontmgr.h
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fgas/font/cfgas_fontmgr.h')
-rw-r--r--xfa/fgas/font/cfgas_fontmgr.h32
1 files changed, 8 insertions, 24 deletions
diff --git a/xfa/fgas/font/cfgas_fontmgr.h b/xfa/fgas/font/cfgas_fontmgr.h
index 6dda338a83..01b96a3595 100644
--- a/xfa/fgas/font/cfgas_fontmgr.h
+++ b/xfa/fgas/font/cfgas_fontmgr.h
@@ -99,6 +99,8 @@ class CFX_FontSourceEnum_File {
~CFX_FontSourceEnum_File();
bool HasStartPosition();
+
+ // <next exists, stream for next>
std::pair<bool, RetainPtr<IFX_SeekableStream>> GetNext();
private:
@@ -148,41 +150,27 @@ class CFGAS_FontMgr final : public Observable<CFGAS_FontMgr> {
uint32_t dwUSB,
wchar_t wUnicode);
- std::deque<FX_FONTDESCRIPTOR> m_FontFaces;
#else // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
bool EnumFontsFromFontMapper();
bool EnumFontsFromFiles();
void RegisterFace(FXFT_Face pFace, const WideString* pFaceName);
void RegisterFaces(const RetainPtr<IFX_SeekableReadStream>& pFontStream,
const WideString* pFaceName);
- void GetNames(const uint8_t* name_table, std::vector<WideString>& Names);
- std::vector<uint16_t> GetCharsets(FXFT_Face pFace) const;
- void GetUSBCSB(FXFT_Face pFace, uint32_t* USB, uint32_t* CSB);
- uint32_t GetFlags(FXFT_Face pFace);
- bool VerifyUnicode(CFX_FontDescriptor* pDesc, wchar_t wcUnicode);
- bool IsPartName(const WideString& name1, const WideString& name2);
void MatchFonts(std::vector<CFX_FontDescriptorInfo>* MatchedFonts,
uint16_t wCodePage,
uint32_t dwFontStyles,
const WideString& FontName,
wchar_t wcUnicode);
- int32_t CalcPenalty(CFX_FontDescriptor* pInstalled,
- uint16_t wCodePage,
- uint32_t dwFontStyles,
- const WideString& FontName,
- wchar_t wcUnicode);
RetainPtr<CFGAS_GEFont> LoadFont(const WideString& wsFaceName,
int32_t iFaceIndex,
int32_t* pFaceCount);
- FXFT_Face LoadFace(const RetainPtr<IFX_SeekableReadStream>& pFontStream,
- int32_t iFaceIndex);
- RetainPtr<IFX_SeekableReadStream> CreateFontStream(
- CFX_FontMapper* pFontMapper,
- SystemFontInfoIface* pSystemFontInfo,
- uint32_t index);
- RetainPtr<IFX_SeekableReadStream> CreateFontStream(
- const ByteString& bsFaceName);
+#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
+
+ std::map<uint32_t, std::vector<RetainPtr<CFGAS_GEFont>>> m_Hash2Fonts;
+#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
+ std::deque<FX_FONTDESCRIPTOR> m_FontFaces;
+#else
std::unique_ptr<CFX_FontSourceEnum_File> m_pFontSource;
std::vector<std::unique_ptr<CFX_FontDescriptor>> m_InstalledFonts;
std::map<uint32_t, std::unique_ptr<std::vector<CFX_FontDescriptorInfo>>>
@@ -191,10 +179,6 @@ class CFGAS_FontMgr final : public Observable<CFGAS_FontMgr> {
m_IFXFont2FileRead;
std::set<wchar_t> m_FailedUnicodesSet;
#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
-
- bool VerifyUnicode(const RetainPtr<CFGAS_GEFont>& pFont, wchar_t wcUnicode);
-
- std::map<uint32_t, std::vector<RetainPtr<CFGAS_GEFont>>> m_Hash2Fonts;
};
#endif // XFA_FGAS_FONT_CFGAS_FONTMGR_H_