Chromium Code Reviews| Index: src/core/SkFontDescriptor.h |
| diff --git a/src/core/SkFontDescriptor.h b/src/core/SkFontDescriptor.h |
| index 13f9cb7257d8abdc023685face5dac6f4ed0004d..b297df6d7752e2a39e76304cd1909f5f13226352 100644 |
| --- a/src/core/SkFontDescriptor.h |
| +++ b/src/core/SkFontDescriptor.h |
| @@ -12,6 +12,13 @@ |
| #include "SkString.h" |
| #include "SkTypeface.h" |
| +class SkFontParameters { |
|
bungeman-skia
2015/03/23 21:59:05
So this class is pragmatic, but also represents th
|
| +public: |
| + SkFontParameters() : fIndex(0) { } |
| + int fIndex; |
| + SkAutoSTArray<4, SkFixed> fAxis; |
| +}; |
| + |
| class SkFontDescriptor { |
| public: |
| SkFontDescriptor(SkTypeface::Style = SkTypeface::kNormal); |
| @@ -30,7 +37,7 @@ public: |
| bool hasFontData() const { return fFontData.get() != NULL; } |
| // Transfers ownership to the caller. |
| SkStreamAsset* transferFontData() { return fFontData.detach(); } |
| - int getFontIndex() const { return fFontIndex; } |
| + SkFontParameters& getFontParameters() { return fFontParameters; } |
| void setFamilyName(const char* name) { fFamilyName.set(name); } |
| void setFullName(const char* name) { fFullName.set(name); } |
| @@ -40,7 +47,6 @@ public: |
| * This method takes ownership of the stream (both reference and cursor). |
| */ |
| void setFontData(SkStreamAsset* stream) { fFontData.reset(stream); } |
| - void setFontIndex(int index) { fFontIndex = index; } |
| private: |
| SkString fFamilyName; |
| @@ -48,7 +54,7 @@ private: |
| SkString fPostscriptName; |
| SkString fFontFileName; |
| SkAutoTDelete<SkStreamAsset> fFontData; |
| - int fFontIndex; |
| + SkFontParameters fFontParameters; |
| SkTypeface::Style fStyle; |
| }; |