From 515899eb2f6fbcea05b68ff13ff412c20e9e06f4 Mon Sep 17 00:00:00 2001 From: "bungeman@google.com" Date: Thu, 11 Oct 2012 19:03:12 +0000 Subject: CreateTypefaceFromFile for GDI. https://codereview.appspot.com/6658045/ git-svn-id: http://skia.googlecode.com/svn/trunk@5901 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/ports/SkFontHost_win.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/ports') diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp index 46a89cc4cd..015df7835b 100755 --- a/src/ports/SkFontHost_win.cpp +++ b/src/ports/SkFontHost_win.cpp @@ -1664,8 +1664,13 @@ SkTypeface* SkFontHost::CreateTypeface(const SkTypeface* familyFace, } SkTypeface* SkFontHost::CreateTypefaceFromFile(const char path[]) { - printf("SkFontHost::CreateTypefaceFromFile unimplemented"); - return NULL; + SkTypeface* face = NULL; + SkAutoTUnref stream(SkNEW_ARGS(SkFILEStream, (path))); + + if (stream->isValid()) { + face = CreateTypefaceFromStream(stream); + } + return face; } void SkFontHost::FilterRec(SkScalerContext::Rec* rec) { -- cgit v1.2.3