Chromium Code Reviews| Index: trunk/src/core/SkTypeface.cpp |
| =================================================================== |
| --- trunk/src/core/SkTypeface.cpp (revision 8112) |
| +++ trunk/src/core/SkTypeface.cpp (working copy) |
| @@ -49,6 +49,12 @@ |
| return gDefaultTypeface; |
| } |
| +SkTypeface* SkTypeface::RefDefault() { |
| + SkTypeface* face = GetDefaultTypeface(); |
|
bungeman-skia
2013/03/12 21:07:23
Any reason not to
return SkRef(GetDefaultTypeface
reed1
2013/03/13 21:18:17
Done.
|
| + face->ref(); |
| + return face; |
| +} |
| + |
| uint32_t SkTypeface::UniqueID(const SkTypeface* face) { |
| if (NULL == face) { |
| face = GetDefaultTypeface(); |
| @@ -121,6 +127,15 @@ |
| return SkFontHost::GetTableData(fUniqueID, tag, offset, length, data); |
| } |
| +SkStream* SkTypeface::openStream(int* ttcIndex) const { |
| + if (ttcIndex) { |
| + int32_t ndx = 0; |
| + (void)SkFontHost::GetFileName(fUniqueID, NULL, 0, &ndx); |
|
bungeman-skia
2013/03/12 21:07:23
Still using that hack, are we :-)
reed1
2013/03/13 21:18:17
Only temporarily. Once I can land this, I can star
|
| + *ttcIndex = (int)ndx; |
| + } |
| + return SkFontHost::OpenStream(fUniqueID); |
| +} |
| + |
| int SkTypeface::getUnitsPerEm() const { |
| int upem = 0; |