From 398de9ad9cb1ed3aa97aaf023d7f8287b8e62601 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Thu, 21 Mar 2013 21:43:51 +0000 Subject: switch to typeface api for tables git-svn-id: http://skia.googlecode.com/svn/trunk@8317 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/device/xps/SkXPSDevice.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/device/xps/SkXPSDevice.cpp') diff --git a/src/device/xps/SkXPSDevice.cpp b/src/device/xps/SkXPSDevice.cpp index f0afe69d8a..ddd4a0d107 100644 --- a/src/device/xps/SkXPSDevice.cpp +++ b/src/device/xps/SkXPSDevice.cpp @@ -37,6 +37,7 @@ #include "SkTDArray.h" #include "SkTLazy.h" #include "SkTScopedComPtr.h" +#include "SkTypefacePriv.h" #include "SkUtils.h" #include "SkXPSDevice.h" @@ -2013,10 +2014,10 @@ void SkXPSDevice::drawSprite(const SkDraw&, const SkBitmap& bitmap, HRESULT SkXPSDevice::CreateTypefaceUse(const SkPaint& paint, TypefaceUse** typefaceUse) { - const SkTypeface* typeface = paint.getTypeface(); + SkAutoResolveDefaultTypeface typeface(paint.getTypeface()); //Check cache. - const SkFontID typefaceID = SkTypeface::UniqueID(typeface); + const SkFontID typefaceID = typeface->uniqueID(); if (!this->fTypefaces.empty()) { TypefaceUse* current = &this->fTypefaces.front(); const TypefaceUse* last = &this->fTypefaces.back(); @@ -2033,7 +2034,7 @@ HRESULT SkXPSDevice::CreateTypefaceUse(const SkPaint& paint, XPS_FONT_EMBEDDING embedding = XPS_FONT_EMBEDDING_RESTRICTED; SkTScopedComPtr fontStream; - SkStream* fontData = SkFontHost::OpenStream(typefaceID); + SkStream* fontData = typeface->openStream(NULL); HRM(SkIStream::CreateFromSkStream(fontData, true, &fontStream), "Could not create font stream."); -- cgit v1.2.3