summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/fxge/cfx_folderfontinfo.cpp25
-rw-r--r--core/fxge/cfx_folderfontinfo.h19
-rw-r--r--core/fxge/fx_font.h17
-rw-r--r--core/fxge/fx_ge_fontmap.cpp13
4 files changed, 37 insertions, 37 deletions
diff --git a/core/fxge/cfx_folderfontinfo.cpp b/core/fxge/cfx_folderfontinfo.cpp
index f2a19a4c4f..3087552fb8 100644
--- a/core/fxge/cfx_folderfontinfo.cpp
+++ b/core/fxge/cfx_folderfontinfo.cpp
@@ -220,8 +220,8 @@ void CFX_FolderFontInfo::ReportFace(const ByteString& path,
if (pdfium::ContainsKey(m_FontList, facename))
return;
- auto pInfo = pdfium::MakeUnique<CFX_FontFaceInfo>(path, facename, tables,
- offset, filesize);
+ auto pInfo = pdfium::MakeUnique<FontFaceInfo>(path, facename, tables, offset,
+ filesize);
ByteString os2 =
FPDF_LoadTableFromTT(pFile, tables.raw_str(), nTables, 0x4f532f32);
if (os2.GetLength() >= 86) {
@@ -276,7 +276,7 @@ void* CFX_FolderFontInfo::FindFont(int weight,
int pitch_family,
const char* family,
bool bMatchName) {
- CFX_FontFaceInfo* pFind = nullptr;
+ FontFaceInfo* pFind = nullptr;
if (charset == FX_CHARSET_ANSI && (pitch_family & FXFONT_FF_FIXEDPITCH))
return GetFont("Courier New");
@@ -284,7 +284,7 @@ void* CFX_FolderFontInfo::FindFont(int weight,
int32_t iBestSimilar = 0;
for (const auto& it : m_FontList) {
const ByteString& bsName = it.first;
- CFX_FontFaceInfo* pFont = it.second.get();
+ FontFaceInfo* pFont = it.second.get();
if (!(pFont->m_Charsets & charset_flag) && charset != FX_CHARSET_Default)
continue;
@@ -331,7 +331,7 @@ uint32_t CFX_FolderFontInfo::GetFontData(void* hFont,
if (!hFont)
return 0;
- const CFX_FontFaceInfo* pFont = static_cast<CFX_FontFaceInfo*>(hFont);
+ const FontFaceInfo* pFont = static_cast<FontFaceInfo*>(hFont);
uint32_t datasize = 0;
uint32_t offset = 0;
if (table == 0) {
@@ -369,10 +369,23 @@ void CFX_FolderFontInfo::DeleteFont(void* hFont) {}
bool CFX_FolderFontInfo::GetFaceName(void* hFont, ByteString* name) {
if (!hFont)
return false;
- *name = static_cast<CFX_FontFaceInfo*>(hFont)->m_FaceName;
+ *name = static_cast<FontFaceInfo*>(hFont)->m_FaceName;
return true;
}
bool CFX_FolderFontInfo::GetFontCharset(void* hFont, int* charset) {
return false;
}
+
+CFX_FolderFontInfo::FontFaceInfo::FontFaceInfo(ByteString filePath,
+ ByteString faceName,
+ ByteString fontTables,
+ uint32_t fontOffset,
+ uint32_t fileSize)
+ : m_FilePath(filePath),
+ m_FaceName(faceName),
+ m_FontTables(fontTables),
+ m_FontOffset(fontOffset),
+ m_FileSize(fileSize),
+ m_Styles(0),
+ m_Charsets(0) {}
diff --git a/core/fxge/cfx_folderfontinfo.h b/core/fxge/cfx_folderfontinfo.h
index 1123185d69..23c20d52d2 100644
--- a/core/fxge/cfx_folderfontinfo.h
+++ b/core/fxge/cfx_folderfontinfo.h
@@ -47,6 +47,23 @@ class CFX_FolderFontInfo : public IFX_SystemFontInfo {
bool GetFontCharset(void* hFont, int* charset) override;
protected:
+ class FontFaceInfo {
+ public:
+ FontFaceInfo(ByteString filePath,
+ ByteString faceName,
+ ByteString fontTables,
+ uint32_t fontOffset,
+ uint32_t fileSize);
+
+ const ByteString m_FilePath;
+ const ByteString m_FaceName;
+ const ByteString m_FontTables;
+ const uint32_t m_FontOffset;
+ const uint32_t m_FileSize;
+ uint32_t m_Styles;
+ uint32_t m_Charsets;
+ };
+
void ScanPath(const ByteString& path);
void ScanFile(const ByteString& path);
void ReportFace(const ByteString& path,
@@ -61,7 +78,7 @@ class CFX_FolderFontInfo : public IFX_SystemFontInfo {
const char* family,
bool bMatchName);
- std::map<ByteString, std::unique_ptr<CFX_FontFaceInfo>> m_FontList;
+ std::map<ByteString, std::unique_ptr<FontFaceInfo>> m_FontList;
std::vector<ByteString> m_PathList;
UnownedPtr<CFX_FontMapper> m_pMapper;
};
diff --git a/core/fxge/fx_font.h b/core/fxge/fx_font.h
index 634429e2f6..d55160aef5 100644
--- a/core/fxge/fx_font.h
+++ b/core/fxge/fx_font.h
@@ -78,23 +78,6 @@ class ScopedFontTransform {
FT_Face m_Face;
};
-class CFX_FontFaceInfo {
- public:
- CFX_FontFaceInfo(ByteString filePath,
- ByteString faceName,
- ByteString fontTables,
- uint32_t fontOffset,
- uint32_t fileSize);
-
- const ByteString m_FilePath;
- const ByteString m_FaceName;
- const ByteString m_FontTables;
- const uint32_t m_FontOffset;
- const uint32_t m_FileSize;
- uint32_t m_Styles;
- uint32_t m_Charsets;
-};
-
class CFX_GlyphBitmap {
public:
CFX_GlyphBitmap();
diff --git a/core/fxge/fx_ge_fontmap.cpp b/core/fxge/fx_ge_fontmap.cpp
index b11ee9c6f3..6e3d8abea3 100644
--- a/core/fxge/fx_ge_fontmap.cpp
+++ b/core/fxge/fx_ge_fontmap.cpp
@@ -78,16 +78,3 @@ std::unique_ptr<IFX_SystemFontInfo> IFX_SystemFontInfo::CreateDefault(
return nullptr;
}
#endif
-
-CFX_FontFaceInfo::CFX_FontFaceInfo(ByteString filePath,
- ByteString faceName,
- ByteString fontTables,
- uint32_t fontOffset,
- uint32_t fileSize)
- : m_FilePath(filePath),
- m_FaceName(faceName),
- m_FontTables(fontTables),
- m_FontOffset(fontOffset),
- m_FileSize(fileSize),
- m_Styles(0),
- m_Charsets(0) {}