From df49991eb36286bca10d8c3da4ebcecaec187bbf Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Tue, 22 Mar 2011 14:07:59 +0000 Subject: add SkCreateTypefaceFromCTFont() to create a typeface directly from a CTFontRef Compute the actual style from the returned CTFontRef, rather than assuming the request will always be met. git-svn-id: http://skia.googlecode.com/svn/trunk@979 2bbb7eff-a529-9590-31e7-b0007b416f81 --- samplecode/SampleTypeface.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'samplecode') diff --git a/samplecode/SampleTypeface.cpp b/samplecode/SampleTypeface.cpp index ed5e788c70..b9426b0ef6 100644 --- a/samplecode/SampleTypeface.cpp +++ b/samplecode/SampleTypeface.cpp @@ -48,10 +48,10 @@ static const struct { const char* fName; SkTypeface::Style fStyle; } gFaces[] = { - { NULL, SkTypeface::kNormal }, - { NULL, SkTypeface::kBold }, - { NULL, SkTypeface::kItalic }, - { NULL, SkTypeface::kBoldItalic }, + { "sans-serif", SkTypeface::kNormal }, + { "sans-serif", SkTypeface::kBold }, + { "sans-serif", SkTypeface::kItalic }, + { "sans-serif", SkTypeface::kBoldItalic }, { "serif", SkTypeface::kNormal }, { "serif", SkTypeface::kBold }, { "serif", SkTypeface::kItalic }, -- cgit v1.2.3