Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #include "SkAdvancedTypefaceMetrics.h" | 10 #include "SkAdvancedTypefaceMetrics.h" |
| 11 #include "SkTypes.h" | 11 #include "SkTypes.h" |
| 12 | 12 |
| 13 SK_DEFINE_INST_COUNT(SkAdvancedTypefaceMetrics) | 13 SK_DEFINE_INST_COUNT(SkAdvancedTypefaceMetrics) |
| 14 | 14 |
| 15 #if defined(SK_BUILD_FOR_WIN) | 15 #if defined(SK_BUILD_FOR_WIN) |
| 16 #include <dwrite.h> | 16 #include <dwrite.h> |
| 17 #endif | 17 #endif |
| 18 | 18 |
| 19 #if defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_ANDROID) | |
| 20 #include <ft2build.h> | |
| 21 #include FT_FREETYPE_H | |
| 22 #endif | |
| 23 | |
| 24 #ifdef SK_BUILD_FOR_MAC | 19 #ifdef SK_BUILD_FOR_MAC |
| 25 #import <ApplicationServices/ApplicationServices.h> | 20 #import <ApplicationServices/ApplicationServices.h> |
| 26 #endif | 21 #endif |
| 27 | 22 |
| 28 #ifdef SK_BUILD_FOR_IOS | 23 #ifdef SK_BUILD_FOR_IOS |
| 29 #include <CoreText/CoreText.h> | 24 #include <CoreText/CoreText.h> |
| 30 #include <CoreGraphics/CoreGraphics.h> | 25 #include <CoreGraphics/CoreGraphics.h> |
| 31 #include <CoreFoundation/CoreFoundation.h> | 26 #include <CoreFoundation/CoreFoundation.h> |
| 32 #endif | 27 #endif |
| 33 | 28 |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 261 const uint32_t* subsetGlyphIDs, | 256 const uint32_t* subsetGlyphIDs, |
| 262 uint32_t subsetGlyphIDsLength, | 257 uint32_t subsetGlyphIDsLength, |
| 263 bool (*getAdvance)(HDC hdc, int gId, int16_t* data)); | 258 bool (*getAdvance)(HDC hdc, int gId, int16_t* data)); |
| 264 template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData( | 259 template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData( |
| 265 IDWriteFontFace* fontFace, | 260 IDWriteFontFace* fontFace, |
| 266 int num_glyphs, | 261 int num_glyphs, |
| 267 const uint32_t* subsetGlyphIDs, | 262 const uint32_t* subsetGlyphIDs, |
| 268 uint32_t subsetGlyphIDsLength, | 263 uint32_t subsetGlyphIDsLength, |
| 269 bool (*getAdvance)(IDWriteFontFace* fontFace, int gId, int16_t* data)); | 264 bool (*getAdvance)(IDWriteFontFace* fontFace, int gId, int16_t* data)); |
| 270 #elif defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_ANDROID) | 265 #elif defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_ANDROID) |
| 266 typedef struct FT_FaceRec_* FT_Face; | |
|
bungeman-skia
2013/04/12 18:16:03
Should forward declare FT_FaceRec. I think you're
| |
| 271 template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData( | 267 template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData( |
| 272 FT_Face face, | 268 FT_Face face, |
| 273 int num_glyphs, | 269 int num_glyphs, |
| 274 const uint32_t* subsetGlyphIDs, | 270 const uint32_t* subsetGlyphIDs, |
| 275 uint32_t subsetGlyphIDsLength, | 271 uint32_t subsetGlyphIDsLength, |
| 276 bool (*getAdvance)(FT_Face face, int gId, int16_t* data)); | 272 bool (*getAdvance)(FT_Face face, int gId, int16_t* data)); |
| 277 #elif defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) | 273 #elif defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) |
| 278 template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData( | 274 template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData( |
| 279 CTFontRef ctFont, | 275 CTFontRef ctFont, |
| 280 int num_glyphs, | 276 int num_glyphs, |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 307 | 303 |
| 308 // additional declaration needed for testing with a face of an unknown type | 304 // additional declaration needed for testing with a face of an unknown type |
| 309 template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData( | 305 template SkAdvancedTypefaceMetrics::WidthRange* getAdvanceData( |
| 310 void* fontData, | 306 void* fontData, |
| 311 int num_glyphs, | 307 int num_glyphs, |
| 312 const uint32_t* subsetGlyphIDs, | 308 const uint32_t* subsetGlyphIDs, |
| 313 uint32_t subsetGlyphIDsLength, | 309 uint32_t subsetGlyphIDsLength, |
| 314 bool (*getAdvance)(void* fontData, int gId, int16_t* data)); | 310 bool (*getAdvance)(void* fontData, int gId, int16_t* data)); |
| 315 | 311 |
| 316 } // namespace skia_advanced_typeface_metrics_utils | 312 } // namespace skia_advanced_typeface_metrics_utils |
| OLD | NEW |