aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports
diff options
context:
space:
mode:
authorGravatar mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-22 00:47:41 +0000
committerGravatar mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-22 00:47:41 +0000
commit66d831dc74953986fb1eef2e10d5b301213ccd4a (patch)
treeca03d38f369b20b318e3268b13a02795f30385df /src/ports
parent25d5ab0c0e3d158d301c3a7e89d904adbf4864f4 (diff)
remove SkFontHost::GetFileName
All remaining impls were either empty, or always return 0 for ttcIndex (its only value). This functionality is now totally subsumed by SkTypeface::openStream() git-svn-id: http://skia.googlecode.com/svn/trunk@8321 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/ports')
-rw-r--r--src/ports/SkFontHost_android.cpp21
-rw-r--r--src/ports/SkFontHost_fontconfig.cpp6
-rw-r--r--src/ports/SkFontHost_freetype_mac.cpp11
-rw-r--r--src/ports/SkFontHost_linux.cpp6
-rwxr-xr-xsrc/ports/SkFontHost_mac.cpp5
-rw-r--r--src/ports/SkFontHost_none.cpp6
-rw-r--r--src/ports/SkFontHost_simple.cpp21
-rwxr-xr-xsrc/ports/SkFontHost_win.cpp5
-rw-r--r--src/ports/SkFontHost_win_dw.cpp4
9 files changed, 0 insertions, 85 deletions
diff --git a/src/ports/SkFontHost_android.cpp b/src/ports/SkFontHost_android.cpp
index 416d61d661..5d3b583892 100644
--- a/src/ports/SkFontHost_android.cpp
+++ b/src/ports/SkFontHost_android.cpp
@@ -846,27 +846,6 @@ SkStream* SkFontHost::OpenStream(uint32_t fontID) {
return stream;
}
-size_t SkFontHost::GetFileName(SkFontID fontID, char path[], size_t length,
- int32_t* index) {
- SkAutoMutexAcquire ac(gFamilyHeadAndNameListMutex);
-
- FamilyTypeface* tf = (FamilyTypeface*)find_from_uniqueID(fontID);
- const char* src = tf ? tf->getFilePath() : NULL;
-
- if (src) {
- size_t size = strlen(src);
- if (path) {
- memcpy(path, src, SkMin32(size, length));
- }
- if (index) {
- *index = 0; // we don't have collections (yet)
- }
- return size;
- } else {
- return 0;
- }
-}
-
SkTypeface* SkFontHost::NextLogicalTypeface(SkFontID currFontID, SkFontID origFontID) {
#if defined(SK_BUILD_FOR_ANDROID) && !defined(SK_BUILD_FOR_ANDROID_FRAMEWORK)
// Skia does not support font fallback for ndk applications in order to
diff --git a/src/ports/SkFontHost_fontconfig.cpp b/src/ports/SkFontHost_fontconfig.cpp
index 8cdca1e584..872d4e4a16 100644
--- a/src/ports/SkFontHost_fontconfig.cpp
+++ b/src/ports/SkFontHost_fontconfig.cpp
@@ -249,12 +249,6 @@ SkStream* SkFontHost::OpenStream(uint32_t) {
return NULL;
}
-size_t SkFontHost::GetFileName(SkFontID fontID, char path[], size_t length,
- int32_t* index) {
- SkASSERT(!"SkFontHost::GetFileName is DEPRECATED: call SkTypeface::openStream\n");
- return 0;
-}
-
///////////////////////////////////////////////////////////////////////////////
int FontConfigTypeface::onGetTableTags(SkFontTableTag tags[]) const {
diff --git a/src/ports/SkFontHost_freetype_mac.cpp b/src/ports/SkFontHost_freetype_mac.cpp
index fb67993b77..1339ffc6c7 100644
--- a/src/ports/SkFontHost_freetype_mac.cpp
+++ b/src/ports/SkFontHost_freetype_mac.cpp
@@ -76,17 +76,6 @@ SkStream* SkFontHost::OpenStream(uint32_t fontID) {
return NULL;
}
-size_t SkFontHost::GetFileName(SkFontID fontID, char path[], size_t length,
- int32_t* index) {
- if (path) {
- strncpy(path, "font", length);
- }
- if (index) {
- *index = 0;
- }
- return 4;
-}
-
void SkFontHost::Serialize(const SkTypeface*, SkWStream*) {
SkDEBUGFAIL("SkFontHost::Serialize unimplemented");
}
diff --git a/src/ports/SkFontHost_linux.cpp b/src/ports/SkFontHost_linux.cpp
index d4840d863c..b82019159b 100644
--- a/src/ports/SkFontHost_linux.cpp
+++ b/src/ports/SkFontHost_linux.cpp
@@ -540,12 +540,6 @@ SkStream* SkFontHost::OpenStream(uint32_t fontID) {
return stream;
}
-size_t SkFontHost::GetFileName(SkFontID fontID, char path[], size_t length,
- int32_t* index) {
-// SkDebugf("SkFontHost::GetFileName unimplemented\n");
- return 0;
-}
-
SkTypeface* SkFontHost::NextLogicalTypeface(SkFontID currFontID, SkFontID origFontID) {
return NULL;
}
diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp
index 8f93c0e5d3..17117ae5eb 100755
--- a/src/ports/SkFontHost_mac.cpp
+++ b/src/ports/SkFontHost_mac.cpp
@@ -1686,11 +1686,6 @@ SkStream* SkFontHost::OpenStream(SkFontID fontID) {
return NULL;
}
-size_t SkFontHost::GetFileName(SkFontID fontID, char path[], size_t length, int32_t* index) {
- SkASSERT(!"SkFontHost::GetFileName is DEPRECATED\n");
- return 0;
-}
-
///////////////////////////////////////////////////////////////////////////////
#include "SkStream.h"
diff --git a/src/ports/SkFontHost_none.cpp b/src/ports/SkFontHost_none.cpp
index f41951aab2..cbbedfef17 100644
--- a/src/ports/SkFontHost_none.cpp
+++ b/src/ports/SkFontHost_none.cpp
@@ -34,12 +34,6 @@ SkStream* SkFontHost::OpenStream(uint32_t uniqueID) {
return NULL;
}
-size_t SkFontHost::GetFileName(SkFontID fontID, char path[], size_t length,
- int32_t* index) {
- SkDebugf("SkFontHost::GetFileName unimplemented\n");
- return 0;
-}
-
///////////////////////////////////////////////////////////////////////////////
void SkFontHost::Serialize(const SkTypeface* face, SkWStream* stream) {
diff --git a/src/ports/SkFontHost_simple.cpp b/src/ports/SkFontHost_simple.cpp
index 94341c219f..c1208d04e4 100644
--- a/src/ports/SkFontHost_simple.cpp
+++ b/src/ports/SkFontHost_simple.cpp
@@ -560,27 +560,6 @@ SkStream* SkFontHost::OpenStream(uint32_t fontID) {
return stream;
}
-size_t SkFontHost::GetFileName(SkFontID fontID, char path[], size_t length,
- int32_t* index) {
- SkAutoMutexAcquire ac(gFamilyMutex);
-
- FamilyTypeface* tf = (FamilyTypeface*)find_from_uniqueID(fontID);
- const char* src = tf ? tf->getFilePath() : NULL;
-
- if (src) {
- size_t size = strlen(src);
- if (path) {
- memcpy(path, src, SkMin32(size, length));
- }
- if (index) {
- *index = 0; // we don't have collections (yet)
- }
- return size;
- } else {
- return 0;
- }
-}
-
SkTypeface* SkFontHost::NextLogicalTypeface(SkFontID currFontID, SkFontID origFontID) {
load_system_fonts();
diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp
index c6b3591863..8b8635b3d2 100755
--- a/src/ports/SkFontHost_win.cpp
+++ b/src/ports/SkFontHost_win.cpp
@@ -1635,11 +1635,6 @@ SkStream* SkFontHost::OpenStream(SkFontID uniqueID) {
return typeface ? typeface->openStream(NULL) : NULL;
}
-size_t SkFontHost::GetFileName(SkFontID fontID, char path[], size_t length, int32_t* index) {
- SkASSERT(!"SkFontHost::GetFileName is DEPRECATED\n");
- return 0;
-}
-
SkScalerContext* LogFontTypeface::onCreateScalerContext(const SkDescriptor* desc) const {
return SkNEW_ARGS(SkScalerContext_Windows, (const_cast<LogFontTypeface*>(this), desc));
}
diff --git a/src/ports/SkFontHost_win_dw.cpp b/src/ports/SkFontHost_win_dw.cpp
index 76275f20a8..e5ade8f533 100644
--- a/src/ports/SkFontHost_win_dw.cpp
+++ b/src/ports/SkFontHost_win_dw.cpp
@@ -1165,10 +1165,6 @@ SkStream* DWriteFontTypeface::onOpenStream(int* ttcIndex) const {
return SkNEW_ARGS(SkDWriteFontFileStream, (fontFileStream.get()));
}
-size_t SkFontHost::GetFileName(SkFontID fontID, char path[], size_t length, int32_t* index) {
- return 0;
-}
-
SkScalerContext* DWriteFontTypeface::onCreateScalerContext(const SkDescriptor* desc) const {
return SkNEW_ARGS(SkScalerContext_Windows, (const_cast<DWriteFontTypeface*>(this), desc));
}