Index: src/ports/SkFontHost_win_dw.cpp |
=================================================================== |
--- src/ports/SkFontHost_win_dw.cpp (revision 10083) |
+++ src/ports/SkFontHost_win_dw.cpp (working copy) |
@@ -492,6 +492,8 @@ |
SkAdvancedTypefaceMetrics::PerGlyphInfo, |
const uint32_t*, uint32_t) const SK_OVERRIDE; |
virtual void onGetFontDescriptor(SkFontDescriptor*, bool*) const SK_OVERRIDE; |
+ virtual int onCountGlyphs() const SK_OVERRIDE; |
+ virtual int onGetUPEM() const SK_OVERRIDE; |
}; |
class SkScalerContext_Windows : public SkScalerContext { |
@@ -1071,6 +1073,16 @@ |
*isLocalStream = SkToBool(fDWriteFontFileLoader.get()); |
} |
+int DWriteFontTypeface::onCountGlyphs() const { |
+ return fDWriteFontFace->GetGlyphCount(); |
+} |
+ |
+int DWriteFontTypeface::onGetUPEM() const { |
+ DWRITE_FONT_METRICS metrics; |
+ fDWriteFontFace->GetMetrics(&metrics); |
+ return metrics.designUnitsPerEm; |
+} |
+ |
template <typename T> class SkAutoIDWriteUnregister { |
public: |
SkAutoIDWriteUnregister(IDWriteFactory* factory, T* unregister) |