Index: src/fonts/SkGScalerContext.cpp |
diff --git a/src/fonts/SkGScalerContext.cpp b/src/fonts/SkGScalerContext.cpp |
index ab0dce56870141623a29e3514adc2b0826ca5540..882c70b1214b0750ca0537d3ecafadb36cb559f5 100644 |
--- a/src/fonts/SkGScalerContext.cpp |
+++ b/src/fonts/SkGScalerContext.cpp |
@@ -211,6 +211,15 @@ size_t SkGTypeface::onGetTableData(SkFontTableTag tag, size_t offset, |
return fProxy->getTableData(tag, offset, length, data); |
} |
+SkTypeface* SkGTypeface::onRefMatchingStyle(Style style) const { |
+ if (this->style() == style) { |
+ return const_cast<SkGTypeface*>(SkRef(this)); |
+ } |
+ |
+ SkAutoTUnref<SkTypeface> other(fProxy->refMatchingStyle(style)); |
+ return SkNEW_ARGS(SkGTypeface, (other, fPaint)); |
+} |
+ |
/////////////////////////////////////////////////////////////////////////////// |
#if 0 |