aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-03-22 14:07:59 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-03-22 14:07:59 +0000
commitdf49991eb36286bca10d8c3da4ebcecaec187bbf (patch)
tree1b894f3894c05089900c9bef4a53d32dbc1bc56e /samplecode
parent08526c07f4f530e56b70d4b22f5a4af35d9ebcca (diff)
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
Diffstat (limited to 'samplecode')
-rw-r--r--samplecode/SampleTypeface.cpp8
1 files changed, 4 insertions, 4 deletions
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 },