diff options
author | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-16 16:13:40 +0000 |
---|---|---|
committer | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-16 16:13:40 +0000 |
commit | e8f0592ae8b37e94d99f49816eb22e9fafde6d86 (patch) | |
tree | bab72f66f6918bdacd66e14163dce1215a5f26ba /src/core | |
parent | 0557d9ea94d5435a9072c9b4141a05190d648442 (diff) |
DirectWrite font host for skia.
https://codereview.appspot.com/5417063/
git-svn-id: http://skia.googlecode.com/svn/trunk@5128 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkAdvancedTypefaceMetrics.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/core/SkAdvancedTypefaceMetrics.cpp b/src/core/SkAdvancedTypefaceMetrics.cpp index a8a6083b85..c3cb3d8c3e 100644 --- a/src/core/SkAdvancedTypefaceMetrics.cpp +++ b/src/core/SkAdvancedTypefaceMetrics.cpp @@ -12,6 +12,10 @@ SK_DEFINE_INST_COUNT(SkAdvancedTypefaceMetrics) +#if defined(SK_BUILD_FOR_WIN) && defined(SK_FONTHOST_WIN_DW) +#include <DWrite.h> +#endif + #if defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_ANDROID) #include <ft2build.h> #include FT_FREETYPE_H @@ -253,13 +257,20 @@ SkAdvancedTypefaceMetrics::AdvanceMetric<Data>* getAdvanceData( // Make AdvanceMetric template functions available for linking with typename // WidthRange and VerticalAdvanceRange. -#if defined(SK_BUILD_FOR_WIN) +#if defined(SK_BUILD_FOR_WIN) && !defined(SK_FONTHOST_WIN_DW) template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData( HDC hdc, int num_glyphs, const uint32_t* subsetGlyphIDs, uint32_t subsetGlyphIDsLength, bool (*getAdvance)(HDC hdc, int gId, int16_t* data)); +#elif defined(SK_BUILD_FOR_WIN) && defined(SK_FONTHOST_WIN_DW) +template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData( + IDWriteFontFace* fontFace, + int num_glyphs, + const uint32_t* subsetGlyphIDs, + uint32_t subsetGlyphIDsLength, + bool (*getAdvance)(IDWriteFontFace* fontFace, int gId, int16_t* data)); #elif defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_ANDROID) template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData( FT_Face face, |