aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/device/xps/SkXPSDevice.cpp
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-21 21:43:51 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-21 21:43:51 +0000
commit398de9ad9cb1ed3aa97aaf023d7f8287b8e62601 (patch)
treec0733c82584958fb6ca150bbabb7ecc8bb484b93 /src/device/xps/SkXPSDevice.cpp
parentb7636d3fadeceb803de58441bffb0448fba69fda (diff)
switch to typeface api for tables
git-svn-id: http://skia.googlecode.com/svn/trunk@8317 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/device/xps/SkXPSDevice.cpp')
-rw-r--r--src/device/xps/SkXPSDevice.cpp7
1 files changed, 4 insertions, 3 deletions
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<IStream> fontStream;
- SkStream* fontData = SkFontHost::OpenStream(typefaceID);
+ SkStream* fontData = typeface->openStream(NULL);
HRM(SkIStream::CreateFromSkStream(fontData, true, &fontStream),
"Could not create font stream.");