Index: src/ports/SkFontHost_linux.cpp |
diff --git a/src/ports/SkFontHost_linux.cpp b/src/ports/SkFontHost_linux.cpp |
index 90141f9374eb563ecd59b8c94ad0360f22eb2541..a4202aabd21d9ce4b728e6719451f51bb7130c90 100644 |
--- a/src/ports/SkFontHost_linux.cpp |
+++ b/src/ports/SkFontHost_linux.cpp |
@@ -30,7 +30,7 @@ |
/** The base SkTypeface implementation for the custom font manager. */ |
class SkTypeface_Custom : public SkTypeface_FreeType { |
public: |
- SkTypeface_Custom(const SkFontStyle& style, bool isFixedPitch, |
+ SkTypeface_Custom(Style style, bool isFixedPitch, |
bool sysFont, const SkString familyName, int index) |
: INHERITED(style, SkTypefaceCache::NewFontID(), isFixedPitch) |
, fIsSysFont(sysFont), fFamilyName(familyName), fIndex(index) |
@@ -67,7 +67,7 @@ |
*/ |
class SkTypeface_Empty : public SkTypeface_Custom { |
public: |
- SkTypeface_Empty() : INHERITED(SkFontStyle(), false, true, SkString(), 0) {} |
+ SkTypeface_Empty() : INHERITED(SkTypeface::kNormal, false, true, SkString(), 0) {} |
virtual const char* getUniqueString() const SK_OVERRIDE { return NULL; } |
@@ -81,9 +81,9 @@ |
/** The stream SkTypeface implementation for the custom font manager. */ |
class SkTypeface_Stream : public SkTypeface_Custom { |
public: |
- SkTypeface_Stream(const SkFontStyle& style, bool isFixedPitch, bool sysFont, |
- const SkString familyName, SkStream* stream, int index) |
- : INHERITED(style, isFixedPitch, sysFont, familyName, index) |
+ SkTypeface_Stream(Style style, bool isFixedPitch, bool sysFont, const SkString familyName, |
+ SkStream* stream, int ttcIndex) |
+ : INHERITED(style, isFixedPitch, sysFont, familyName, ttcIndex) |
, fStream(SkRef(stream)) |
{ } |
@@ -104,8 +104,8 @@ |
/** The file SkTypeface implementation for the custom font manager. */ |
class SkTypeface_File : public SkTypeface_Custom { |
public: |
- SkTypeface_File(const SkFontStyle& style, bool isFixedPitch, bool sysFont, |
- const SkString familyName, const char path[], int index) |
+ SkTypeface_File(Style style, bool isFixedPitch, bool sysFont, const SkString familyName, |
+ const char path[], int index) |
: INHERITED(style, isFixedPitch, sysFont, familyName, index) |
, fPath(path) |
{ } |
@@ -273,7 +273,7 @@ |
} |
bool isFixedPitch; |
- SkFontStyle style; |
+ SkTypeface::Style style; |
SkString name; |
if (SkTypeface_FreeType::ScanFont(stream, ttcIndex, &name, &style, &isFixedPitch)) { |
return SkNEW_ARGS(SkTypeface_Stream, (style, isFixedPitch, false, name, |
@@ -315,7 +315,7 @@ |
private: |
static bool get_name_and_style(const char path[], SkString* name, |
- SkFontStyle* style, bool* isFixedPitch) { |
+ SkTypeface::Style* style, bool* isFixedPitch) { |
SkAutoTUnref<SkStream> stream(SkStream::NewFromFile(path)); |
if (stream.get()) { |
return SkTypeface_FreeType::ScanFont(stream, 0, name, style, isFixedPitch); |
@@ -335,7 +335,8 @@ |
bool isFixedPitch; |
SkString realname; |
- SkFontStyle style = SkFontStyle(); // avoid uninitialized warning |
+ SkTypeface::Style style = SkTypeface::kNormal; // avoid uninitialized warning |
+ |
if (!get_name_and_style(filename.c_str(), &realname, &style, &isFixedPitch)) { |
SkDebugf("------ can't load <%s> as a font\n", filename.c_str()); |
continue; |