Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Unified Diff: core/src/fxge/ge/fx_ge_fontmap.cpp

Issue 1298393003: Extern in .cpp file is a code smell, part 2. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rename, remove dead fn. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fxge/ge/fx_ge_font.cpp ('k') | core/src/fxge/ge/text_int.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxge/ge/fx_ge_fontmap.cpp
diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp
index 15f7bc34d09c805ef0387ec1ce7a4086a850c220..561b7d9b6633c5df3bb597e55f5cef0583ee62d1 100644
--- a/core/src/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/src/fxge/ge/fx_ge_fontmap.cpp
@@ -409,11 +409,6 @@ const FoxitFonts g_FoxitFonts[14] = {
{g_FoxitSymbolFontData, 16729},
{g_FoxitDingbatsFontData, 29513},
};
-void _FPDFAPI_GetInternalFontData(int id,
- const uint8_t*& data,
- FX_DWORD& size) {
- CFX_GEModule::Get()->GetFontMgr()->GetStandardFont(data, size, id);
-}
FX_BOOL CFX_FontMgr::GetStandardFont(const uint8_t*& pFontData,
FX_DWORD& size,
int index) {
@@ -481,8 +476,7 @@ static CFX_ByteString _TT_NormalizeName(const FX_CHAR* family) {
norm.MakeLower();
return norm;
}
-CFX_ByteString _FPDF_GetNameFromTT(const uint8_t* name_table,
- FX_DWORD name_id) {
+CFX_ByteString GetNameFromTT(const uint8_t* name_table, FX_DWORD name_id) {
const uint8_t* ptr = name_table + 2;
int name_count = GET_TT_SHORT(ptr);
int string_offset = GET_TT_SHORT(ptr + 2);
@@ -550,7 +544,7 @@ CFX_ByteString CFX_FontMapper::GetPSNameFromTT(void* hFont) {
if (size) {
uint8_t* buffer = FX_Alloc(uint8_t, size);
m_pFontInfo->GetFontData(hFont, 0x6e616d65, buffer, size);
- result = _FPDF_GetNameFromTT(buffer, 6);
+ result = GetNameFromTT(buffer, 6);
FX_Free(buffer);
}
return result;
@@ -1249,10 +1243,6 @@ CFontFileFaceInfo::~CFontFileFaceInfo() {
}
m_Face = NULL;
}
-extern FX_BOOL _LoadFile(FXFT_Library library,
- FXFT_Face* Face,
- IFX_FileRead* pFile,
- FXFT_Stream* stream);
#if _FX_OS_ == _FX_ANDROID_
IFX_SystemFontInfo* IFX_SystemFontInfo::CreateDefault(const char** pUnused) {
return NULL;
@@ -1366,8 +1356,8 @@ void CFX_FolderFontInfo::ReportFace(CFX_ByteString& path,
}
CFX_ByteString names =
_FPDF_LoadTableFromTT(pFile, tables, nTables, 0x6e616d65);
- CFX_ByteString facename = _FPDF_GetNameFromTT(names, 1);
- CFX_ByteString style = _FPDF_GetNameFromTT(names, 2);
+ CFX_ByteString facename = GetNameFromTT(names, 1);
+ CFX_ByteString style = GetNameFromTT(names, 2);
if (style != "Regular") {
facename += " " + style;
}
« no previous file with comments | « core/src/fxge/ge/fx_ge_font.cpp ('k') | core/src/fxge/ge/text_int.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698