diff options
-rw-r--r-- | gyp/core.gyp | 5 | ||||
-rw-r--r-- | src/core/SkAdvancedTypefaceMetrics.cpp | 9 |
2 files changed, 4 insertions, 10 deletions
diff --git a/gyp/core.gyp b/gyp/core.gyp index cc5cfbd388..0a38ede481 100644 --- a/gyp/core.gyp +++ b/gyp/core.gyp @@ -75,11 +75,6 @@ 'config/win', ], }], - [ 'skia_os == "nacl"', { - 'dependencies': [ - 'freetype.gyp:freetype', - ], - }], [ 'skia_os == "android" and skia_arch_type == "arm" and armv7 == 1', { # The code in SkUtilsArm.cpp can be used on an ARM-based Linux system, not only Android. 'sources': [ diff --git a/src/core/SkAdvancedTypefaceMetrics.cpp b/src/core/SkAdvancedTypefaceMetrics.cpp index fb1325cc69..defe68c8a1 100644 --- a/src/core/SkAdvancedTypefaceMetrics.cpp +++ b/src/core/SkAdvancedTypefaceMetrics.cpp @@ -16,9 +16,10 @@ SK_DEFINE_INST_COUNT(SkAdvancedTypefaceMetrics) #include <dwrite.h> #endif -#if defined(SK_BUILD_FOR_NACL) -#include <ft2build.h> -#include FT_FREETYPE_H +#if defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_ANDROID) +// forward declare structs needed for getAdvanceData() template for freetype +struct FT_FaceRec; +typedef struct FT_FaceRec_* FT_Face; #endif #ifdef SK_BUILD_FOR_MAC @@ -268,8 +269,6 @@ template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData( uint32_t subsetGlyphIDsLength, bool (*getAdvance)(IDWriteFontFace* fontFace, int gId, int16_t* data)); #elif defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_ANDROID) -struct FT_FaceRec; -typedef struct FT_FaceRec_* FT_Face; template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData( FT_Face face, int num_glyphs, |