summaryrefslogtreecommitdiff
path: root/core/fxge/android
diff options
context:
space:
mode:
authornpm <npm@chromium.org>2016-10-13 11:10:03 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-13 11:10:03 -0700
commitaeb44f8c4675141e170329d5093b251fbfad8023 (patch)
tree5aa3077a0f03695cbac969588a51756e1bc85a4e /core/fxge/android
parenta4060a324d606d5a8e1d2a16d3b55a6d14a0ddbf (diff)
downloadpdfium-aeb44f8c4675141e170329d5093b251fbfad8023.tar.xz
Clean up fx_basic_util a little
- Nit fixes. - Remove unused methods. - Replace FX_BOOL with bool. Review-Url: https://codereview.chromium.org/2419433004
Diffstat (limited to 'core/fxge/android')
-rw-r--r--core/fxge/android/fpf_skiafontmgr.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/core/fxge/android/fpf_skiafontmgr.cpp b/core/fxge/android/fpf_skiafontmgr.cpp
index 9452c11747..3ecacd387c 100644
--- a/core/fxge/android/fpf_skiafontmgr.cpp
+++ b/core/fxge/android/fpf_skiafontmgr.cpp
@@ -399,36 +399,35 @@ FXFT_Face CFPF_SkiaFontMgr::GetFontFace(const uint8_t* pBuffer,
FXFT_Set_Pixel_Sizes(face, 0, 64);
return face;
}
+
void CFPF_SkiaFontMgr::ScanPath(const CFX_ByteString& path) {
- void* handle = FX_OpenFolder(path.c_str());
+ DIR* handle = FX_OpenFolder(path.c_str());
if (!handle) {
return;
}
CFX_ByteString filename;
- FX_BOOL bFolder = FALSE;
- while (FX_GetNextFile(handle, filename, bFolder)) {
+ bool bFolder = false;
+ while (FX_GetNextFile(handle, &filename, &bFolder)) {
if (bFolder) {
- if (filename == "." || filename == "..") {
+ if (filename == "." || filename == "..")
continue;
- }
} else {
CFX_ByteString ext = filename.Right(4);
ext.MakeLower();
- if (ext != ".ttf" && ext != ".ttc" && ext != ".otf") {
+ if (ext != ".ttf" && ext != ".ttc" && ext != ".otf")
continue;
- }
}
CFX_ByteString fullpath(path);
fullpath += "/";
fullpath += filename;
- if (bFolder) {
+ if (bFolder)
ScanPath(fullpath);
- } else {
+ else
ScanFile(fullpath);
- }
}
FX_CloseFolder(handle);
}
+
void CFPF_SkiaFontMgr::ScanFile(const CFX_ByteString& file) {
FXFT_Face face = GetFontFace(file.AsStringC());
if (face) {
@@ -439,6 +438,7 @@ void CFPF_SkiaFontMgr::ScanFile(const CFX_ByteString& file) {
FXFT_Done_Face(face);
}
}
+
static const uint32_t g_FPFSkiaFontCharsets[] = {
FPF_SKIACHARSET_Ansi,
FPF_SKIACHARSET_EeasternEuropean,
@@ -473,6 +473,7 @@ static const uint32_t g_FPFSkiaFontCharsets[] = {
FPF_SKIACHARSET_OEM,
FPF_SKIACHARSET_Symbol,
};
+
static uint32_t FPF_SkiaGetFaceCharset(TT_OS2* pOS2) {
uint32_t dwCharset = 0;
if (pOS2) {
@@ -485,6 +486,7 @@ static uint32_t FPF_SkiaGetFaceCharset(TT_OS2* pOS2) {
dwCharset |= FPF_SKIACHARSET_Default;
return dwCharset;
}
+
void CFPF_SkiaFontMgr::ReportFace(FXFT_Face face,
CFPF_SkiaFontDescriptor* pFontDesc) {
if (!face || !pFontDesc) {
@@ -519,5 +521,6 @@ void CFPF_SkiaFontMgr::ReportFace(FXFT_Face face,
pFontDesc->m_iFaceIndex = face->face_index;
pFontDesc->m_iGlyphNum = face->num_glyphs;
}
+
void CFPF_SkiaFontMgr::OutputSystemFonts() {}
#endif