Index: trunk/tests/FontHostStreamTest.cpp |
=================================================================== |
--- trunk/tests/FontHostStreamTest.cpp (revision 8138) |
+++ trunk/tests/FontHostStreamTest.cpp (working copy) |
@@ -91,8 +91,13 @@ |
origCanvas.drawText("A", 1, point.fX, point.fY, paint); |
SkTypeface* origTypeface = paint.getTypeface(); |
- const SkFontID typefaceID = SkTypeface::UniqueID(origTypeface); |
- SkStream* fontData = SkFontHost::OpenStream(typefaceID); |
+ SkAutoTUnref<SkTypeface> aur; |
+ if (NULL == origTypeface) { |
+ origTypeface = aur.reset(SkTypeface::RefDefault()); |
bungeman-skia
2013/03/14 03:47:34
I see that you checked in https://code.google.com/
reed1
2013/03/14 14:22:42
I'm not sure which pattern I like better yet, so I
|
+ } |
+ |
+ int ttcIndex; |
+ SkStream* fontData = origTypeface->openStream(&ttcIndex); |
SkTypeface* streamTypeface = SkTypeface::CreateFromStream(fontData); |
SkSafeUnref(paint.setTypeface(streamTypeface)); |
drawBG(&streamCanvas); |