class SkEmptyFontMgr : public SkFontMgr {
protected:
- virtual int onCountFamilies() SK_OVERRIDE {
+ virtual int onCountFamilies() const SK_OVERRIDE {
return 0;
}
- virtual void onGetFamilyName(int index, SkString* familyName) SK_OVERRIDE {
+ virtual void onGetFamilyName(int index, SkString* familyName) const SK_OVERRIDE {
SkDEBUGFAIL("onGetFamilyName called with bad index");
}
- virtual SkFontStyleSet* onCreateStyleSet(int index) SK_OVERRIDE {
+ virtual SkFontStyleSet* onCreateStyleSet(int index) const SK_OVERRIDE {
SkDEBUGFAIL("onCreateStyleSet called with bad index");
return NULL;
}
- virtual SkFontStyleSet* onMatchFamily(const char[]) SK_OVERRIDE {
+ virtual SkFontStyleSet* onMatchFamily(const char[]) const SK_OVERRIDE {
return SkFontStyleSet::CreateEmpty();
}
virtual SkTypeface* onMatchFamilyStyle(const char[],
- const SkFontStyle&) SK_OVERRIDE {
+ const SkFontStyle&) const SK_OVERRIDE {
return NULL;
}
virtual SkTypeface* onMatchFaceStyle(const SkTypeface*,
- const SkFontStyle&) SK_OVERRIDE {
+ const SkFontStyle&) const SK_OVERRIDE {
return NULL;
}
- virtual SkTypeface* onCreateFromData(SkData*, int) SK_OVERRIDE {
+ virtual SkTypeface* onCreateFromData(SkData*, int) const SK_OVERRIDE {
return NULL;
}
- virtual SkTypeface* onCreateFromStream(SkStream*, int) SK_OVERRIDE {
+ virtual SkTypeface* onCreateFromStream(SkStream*, int) const SK_OVERRIDE {
return NULL;
}
- virtual SkTypeface* onCreateFromFile(const char[], int) SK_OVERRIDE {
+ virtual SkTypeface* onCreateFromFile(const char[], int) const SK_OVERRIDE {
return NULL;
}
- virtual SkTypeface* onLegacyCreateTypeface(const char [], unsigned) SK_OVERRIDE {
+ virtual SkTypeface* onLegacyCreateTypeface(const char [], unsigned) const SK_OVERRIDE {
return NULL;
}
};
return fsset;
}
-int SkFontMgr::countFamilies() {
+int SkFontMgr::countFamilies() const {
return this->onCountFamilies();
}
-void SkFontMgr::getFamilyName(int index, SkString* familyName) {
+void SkFontMgr::getFamilyName(int index, SkString* familyName) const {
this->onGetFamilyName(index, familyName);
}
-SkFontStyleSet* SkFontMgr::createStyleSet(int index) {
+SkFontStyleSet* SkFontMgr::createStyleSet(int index) const {
return emptyOnNull(this->onCreateStyleSet(index));
}
-SkFontStyleSet* SkFontMgr::matchFamily(const char familyName[]) {
+SkFontStyleSet* SkFontMgr::matchFamily(const char familyName[]) const {
return emptyOnNull(this->onMatchFamily(familyName));
}
SkTypeface* SkFontMgr::matchFamilyStyle(const char familyName[],
- const SkFontStyle& fs) {
+ const SkFontStyle& fs) const {
return this->onMatchFamilyStyle(familyName, fs);
}
SkTypeface* SkFontMgr::matchFaceStyle(const SkTypeface* face,
- const SkFontStyle& fs) {
+ const SkFontStyle& fs) const {
return this->onMatchFaceStyle(face, fs);
}
-SkTypeface* SkFontMgr::createFromData(SkData* data, int ttcIndex) {
+SkTypeface* SkFontMgr::createFromData(SkData* data, int ttcIndex) const {
if (NULL == data) {
return NULL;
}
return this->onCreateFromData(data, ttcIndex);
}
-SkTypeface* SkFontMgr::createFromStream(SkStream* stream, int ttcIndex) {
+SkTypeface* SkFontMgr::createFromStream(SkStream* stream, int ttcIndex) const {
if (NULL == stream) {
return NULL;
}
return this->onCreateFromStream(stream, ttcIndex);
}
-SkTypeface* SkFontMgr::createFromFile(const char path[], int ttcIndex) {
+SkTypeface* SkFontMgr::createFromFile(const char path[], int ttcIndex) const {
if (NULL == path) {
return NULL;
}
}
SkTypeface* SkFontMgr::legacyCreateTypeface(const char familyName[],
- unsigned styleBits) {
+ unsigned styleBits) const {
return this->onLegacyCreateTypeface(familyName, styleBits);
}