Index: tests/PictureTest.cpp |
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp |
index de4d1e3e001593446796bdbf232c9f848f00627a..45edc715efc2b67ce421b8194559469418586141 100644 |
--- a/tests/PictureTest.cpp |
+++ b/tests/PictureTest.cpp |
@@ -1151,7 +1151,20 @@ static void test_gen_id(skiatest::Reporter* reporter) { |
REPORTER_ASSERT(reporter, hasData->uniqueID() != empty->uniqueID()); |
} |
+static void test_typeface(skiatest::Reporter* reporter) { |
+ SkPictureRecorder recorder; |
+ SkCanvas* canvas = recorder.beginRecording(10, 10); |
+ SkPaint paint; |
+ paint.setTypeface(SkTypeface::CreateFromName("Arial", SkTypeface::kItalic)); |
+ canvas->drawText("Q", 1, 0, 10, paint); |
+ SkAutoTUnref<SkPicture> picture(recorder.endRecording()); |
+ REPORTER_ASSERT(reporter, picture->hasText()); |
+ SkDynamicMemoryWStream stream; |
+ picture->serialize(&stream); |
+} |
+ |
DEF_TEST(Picture, reporter) { |
+ test_typeface(reporter); |
#ifdef SK_DEBUG |
test_deleting_empty_picture(); |
test_serializing_empty_picture(); |