Chromium Code Reviews| Index: src/ports/SkFontHost_FreeType.cpp |
| diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp |
| index 6448beb89b2d265786bc15d19f6ad30b2cd54bfe..33137b7eaddc62b37d44d7e60ba38edb1439fda8 100644 |
| --- a/src/ports/SkFontHost_FreeType.cpp |
| +++ b/src/ports/SkFontHost_FreeType.cpp |
| @@ -1670,11 +1670,12 @@ size_t SkTypeface_FreeType::onGetTableData(SkFontTableTag tag, size_t offset, |
| /////////////////////////////////////////////////////////////////////////////// |
| /////////////////////////////////////////////////////////////////////////////// |
| -/* Export this so that other parts of our FonttHost port can make use of our |
| - ability to extract the name+style from a stream, using FreeType's api. |
| -*/ |
| -bool find_name_and_attributes(SkStream* stream, SkString* name, |
| - SkTypeface::Style* style, bool* isFixedPitch) { |
| +/* Exported so that SkFontMgrs can make use of our ability to extract |
| + * name and style from a stream, using FreeType's API. |
| + */ |
| +bool find_name_and_attributes(SkStream* stream, int ttcIndex, |
|
tomhudson
2014/07/11 13:30:21
If we're exporting this, shouldn't it have an SkCa
bungeman-skia
2014/07/11 14:33:26
Sure, why not. It wasn't static to begin with, so
|
| + SkString* name, SkTypeface::Style* style, bool* isFixedPitch) |
| +{ |
| FT_Library library; |
| if (FT_Init_FreeType(&library)) { |
| return false; |
| @@ -1702,7 +1703,7 @@ bool find_name_and_attributes(SkStream* stream, SkString* name, |
| } |
| FT_Face face; |
| - if (FT_Open_Face(library, &args, 0, &face)) { |
| + if (FT_Open_Face(library, &args, ttcIndex, &face)) { |
| FT_Done_FreeType(library); |
| return false; |
| } |