remove unused ptr/len parameters from CreateTypeface
Review URL: https://codereview.appspot.com/6201056
git-svn-id: http://skia.googlecode.com/svn/trunk@3862 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/core/SkFontHost.h b/include/core/SkFontHost.h
index 7015ee9..732de5c 100644
--- a/include/core/SkFontHost.h
+++ b/include/core/SkFontHost.h
@@ -50,15 +50,13 @@
public:
/** Return a new, closest matching typeface given either an existing family
(specified by a typeface in that family) or by a familyName and a
- requested style, or by a set of Unicode codepoitns to cover in a given
- style.
+ requested style.
1) If familyFace is null, use familyName.
2) If familyName is null, use data (UTF-16 to cover).
3) If all are null, return the default font that best matches style
*/
static SkTypeface* CreateTypeface(const SkTypeface* familyFace,
const char familyName[],
- const void* data, size_t bytelength,
SkTypeface::Style style);
/** Return a new typeface given the data buffer. If the data does not
diff --git a/include/core/SkTypeface.h b/include/core/SkTypeface.h
index 0476f78..bfa7d83 100644
--- a/include/core/SkTypeface.h
+++ b/include/core/SkTypeface.h
@@ -85,18 +85,6 @@
*/
static SkTypeface* CreateFromName(const char familyName[], Style style);
- /** Return a new reference to the typeface that covers a set of Unicode
- code points with the specified Style. Use this call if you want to
- pick any font that covers a given string of text.
-
- @param data UTF-16 characters
- @param bytelength length of data, in bytes
- @return reference to the closest-matching typeface. Call must call
- unref() when they are done.
- */
- static SkTypeface* CreateForChars(const void* data, size_t bytelength,
- Style s);
-
/** Return a new reference to the typeface that most closely matches the
requested typeface and specified Style. Use this call if you want to
pick a new style from the same family of the existing typeface.
diff --git a/src/core/SkTypeface.cpp b/src/core/SkTypeface.cpp
index 798099c..77ad9ce 100644
--- a/src/core/SkTypeface.cpp
+++ b/src/core/SkTypeface.cpp
@@ -42,8 +42,7 @@
if (NULL == gDefaultTypeface) {
gDefaultTypeface =
- SkFontHost::CreateTypeface(NULL, NULL, NULL, 0,
- SkTypeface::kNormal);
+ SkFontHost::CreateTypeface(NULL, NULL, SkTypeface::kNormal);
}
return gDefaultTypeface;
}
@@ -62,16 +61,11 @@
///////////////////////////////////////////////////////////////////////////////
SkTypeface* SkTypeface::CreateFromName(const char name[], Style style) {
- return SkFontHost::CreateTypeface(NULL, name, NULL, 0, style);
-}
-
-SkTypeface* SkTypeface::CreateForChars(const void* data, size_t bytelength,
- Style s) {
- return SkFontHost::CreateTypeface(NULL, NULL, data, bytelength, s);
+ return SkFontHost::CreateTypeface(NULL, name, style);
}
SkTypeface* SkTypeface::CreateFromTypeface(const SkTypeface* family, Style s) {
- return SkFontHost::CreateTypeface(family, NULL, NULL, 0, s);
+ return SkFontHost::CreateTypeface(family, NULL, s);
}
SkTypeface* SkTypeface::CreateFromStream(SkStream* stream) {
diff --git a/src/ports/SkFontHost_FONTPATH.cpp b/src/ports/SkFontHost_FONTPATH.cpp
index ba1c823..04e4934 100644
--- a/src/ports/SkFontHost_FONTPATH.cpp
+++ b/src/ports/SkFontHost_FONTPATH.cpp
@@ -233,7 +233,6 @@
SkTypeface* SkFontHost::CreateTypeface(const SkTypeface* familyFace,
const char familyName[],
- const void* data, size_t bytelength,
SkTypeface::Style style)
{
const FontFamilyRec* family;
diff --git a/src/ports/SkFontHost_android.cpp b/src/ports/SkFontHost_android.cpp
index 6ee9943..df240ab 100644
--- a/src/ports/SkFontHost_android.cpp
+++ b/src/ports/SkFontHost_android.cpp
@@ -813,7 +813,7 @@
for (int j = i; j >= 0; --j) {
if (rec[j].fNames != NULL) {
return SkFontHost::CreateTypeface(NULL,
- rec[j].fNames[0], NULL, 0,
+ rec[j].fNames[0],
(SkTypeface::Style)style);
}
}
@@ -828,7 +828,6 @@
SkTypeface* SkFontHost::CreateTypeface(const SkTypeface* familyFace,
const char familyName[],
- const void* data, size_t bytelength,
SkTypeface::Style style) {
SkAutoMutexAcquire ac(gFamilyHeadAndNameListMutex);
diff --git a/src/ports/SkFontHost_fontconfig.cpp b/src/ports/SkFontHost_fontconfig.cpp
index 775a7c7..e028a01 100644
--- a/src/ports/SkFontHost_fontconfig.cpp
+++ b/src/ports/SkFontHost_fontconfig.cpp
@@ -208,7 +208,6 @@
// static
SkTypeface* SkFontHost::CreateTypeface(const SkTypeface* familyFace,
const char familyName[],
- const void* data, size_t bytelength,
SkTypeface::Style style)
{
const char* resolved_family_name = NULL;
diff --git a/src/ports/SkFontHost_freetype_mac.cpp b/src/ports/SkFontHost_freetype_mac.cpp
index e51f802..8b1272a 100644
--- a/src/ports/SkFontHost_freetype_mac.cpp
+++ b/src/ports/SkFontHost_freetype_mac.cpp
@@ -51,7 +51,6 @@
SkTypeface* SkFontHost::CreateTypeface(const SkTypeface* familyFace,
const char familyName[],
- const void* data, size_t bytelength,
SkTypeface::Style style) {
return ref_default_typeface();
}
diff --git a/src/ports/SkFontHost_linux.cpp b/src/ports/SkFontHost_linux.cpp
index be99576..805dc22 100644
--- a/src/ports/SkFontHost_linux.cpp
+++ b/src/ports/SkFontHost_linux.cpp
@@ -500,14 +500,14 @@
// backup until we hit the fNames
for (int j = i; j >= 0; --j) {
if (rec[j].fNames != NULL) {
- return SkFontHost::CreateTypeface(NULL, rec[j].fNames[0], NULL, 0,
+ return SkFontHost::CreateTypeface(NULL, rec[j].fNames[0],
(SkTypeface::Style)style);
}
}
}
}
}
- return SkFontHost::CreateTypeface(NULL, NULL, NULL, 0, (SkTypeface::Style)style);
+ return SkFontHost::CreateTypeface(NULL, NULL, (SkTypeface::Style)style);
#endif
sk_throw();
return NULL;
@@ -517,7 +517,6 @@
SkTypeface* SkFontHost::CreateTypeface(const SkTypeface* familyFace,
const char familyName[],
- const void* data, size_t bytelength,
SkTypeface::Style style) {
load_system_fonts();
diff --git a/src/ports/SkFontHost_mac_atsui.cpp b/src/ports/SkFontHost_mac_atsui.cpp
index ae32036..f8251ab 100644
--- a/src/ports/SkFontHost_mac_atsui.cpp
+++ b/src/ports/SkFontHost_mac_atsui.cpp
@@ -494,7 +494,6 @@
SkTypeface* SkFontHost::CreateTypeface(const SkTypeface* familyFace,
const char familyName[],
- const void* data, size_t bytelength,
SkTypeface::Style style) {
// todo: we don't know how to respect style bits
if (NULL == familyName && NULL != familyFace) {
diff --git a/src/ports/SkFontHost_mac_coretext.cpp b/src/ports/SkFontHost_mac_coretext.cpp
index 1e308e4..c43d1a6 100644
--- a/src/ports/SkFontHost_mac_coretext.cpp
+++ b/src/ports/SkFontHost_mac_coretext.cpp
@@ -526,7 +526,6 @@
SkTypeface* SkFontHost::CreateTypeface(const SkTypeface* familyFace,
const char familyName[],
- const void* data, size_t bytelength,
SkTypeface::Style style) {
if (familyName) {
familyName = map_css_names(familyName);
diff --git a/src/ports/SkFontHost_none.cpp b/src/ports/SkFontHost_none.cpp
index cea7e90..5bee4d6 100644
--- a/src/ports/SkFontHost_none.cpp
+++ b/src/ports/SkFontHost_none.cpp
@@ -11,7 +11,6 @@
SkTypeface* SkFontHost::CreateTypeface(const SkTypeface* familyFace,
const char famillyName[],
- const void* data, size_t bytelength,
SkTypeface::Style style) {
SkDEBUGFAIL("SkFontHost::FindTypeface unimplemented");
return NULL;
diff --git a/src/ports/SkFontHost_simple.cpp b/src/ports/SkFontHost_simple.cpp
index 733b0cc..ac3c713 100644
--- a/src/ports/SkFontHost_simple.cpp
+++ b/src/ports/SkFontHost_simple.cpp
@@ -519,7 +519,7 @@
for (int j = i; j >= 0; --j) {
if (rec[j].fNames != NULL) {
return SkFontHost::CreateTypeface(NULL,
- rec[j].fNames[0], NULL, 0, (SkTypeface::Style)style);
+ rec[j].fNames[0], (SkTypeface::Style)style);
}
}
}
@@ -532,7 +532,6 @@
SkTypeface* SkFontHost::CreateTypeface(const SkTypeface* familyFace,
const char familyName[],
- const void* data, size_t bytelength,
SkTypeface::Style style) {
load_system_fonts();
diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp
index 21a2d3c..20c54a3 100755
--- a/src/ports/SkFontHost_win.cpp
+++ b/src/ports/SkFontHost_win.cpp
@@ -1350,7 +1350,6 @@
SkTypeface* SkFontHost::CreateTypeface(const SkTypeface* familyFace,
const char familyName[],
- const void* data, size_t bytelength,
SkTypeface::Style style) {
LOGFONT lf;
if (NULL == familyFace && NULL == familyName) {