OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
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 #ifdef SK_BUILD_FOR_MAC | 9 #ifdef SK_BUILD_FOR_MAC |
10 #import <ApplicationServices/ApplicationServices.h> | 10 #import <ApplicationServices/ApplicationServices.h> |
(...skipping 1722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1733 entry->tag = SkEndian_SwapBE32(tableTags[tableIndex]); | 1733 entry->tag = SkEndian_SwapBE32(tableTags[tableIndex]); |
1734 entry->checksum = SkEndian_SwapBE32(SkOTUtils::CalcTableChecksum((SK_OT_
ULONG*)dataPtr, | 1734 entry->checksum = SkEndian_SwapBE32(SkOTUtils::CalcTableChecksum((SK_OT_
ULONG*)dataPtr, |
1735 tableSi
ze)); | 1735 tableSi
ze)); |
1736 entry->offset = SkEndian_SwapBE32(SkToU32(dataPtr - dataStart)); | 1736 entry->offset = SkEndian_SwapBE32(SkToU32(dataPtr - dataStart)); |
1737 entry->logicalLength = SkEndian_SwapBE32(SkToU32(tableSize)); | 1737 entry->logicalLength = SkEndian_SwapBE32(SkToU32(tableSize)); |
1738 | 1738 |
1739 dataPtr += (tableSize + 3) & ~3; | 1739 dataPtr += (tableSize + 3) & ~3; |
1740 ++entry; | 1740 ++entry; |
1741 } | 1741 } |
1742 | 1742 |
| 1743 *ttcIndex = 0; |
1743 return stream; | 1744 return stream; |
1744 } | 1745 } |
1745 | 1746 |
1746 /////////////////////////////////////////////////////////////////////////////// | 1747 /////////////////////////////////////////////////////////////////////////////// |
1747 /////////////////////////////////////////////////////////////////////////////// | 1748 /////////////////////////////////////////////////////////////////////////////// |
1748 | 1749 |
1749 int SkTypeface_Mac::onGetUPEM() const { | 1750 int SkTypeface_Mac::onGetUPEM() const { |
1750 AutoCFRelease<CGFontRef> cgFont(CTFontCopyGraphicsFont(fFontRef, NULL)); | 1751 AutoCFRelease<CGFontRef> cgFont(CTFontCopyGraphicsFont(fFontRef, NULL)); |
1751 return CGFontGetUnitsPerEm(cgFont); | 1752 return CGFontGetUnitsPerEm(cgFont); |
1752 } | 1753 } |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2280 } | 2281 } |
2281 return face; | 2282 return face; |
2282 } | 2283 } |
2283 }; | 2284 }; |
2284 | 2285 |
2285 /////////////////////////////////////////////////////////////////////////////// | 2286 /////////////////////////////////////////////////////////////////////////////// |
2286 | 2287 |
2287 SkFontMgr* SkFontMgr::Factory() { | 2288 SkFontMgr* SkFontMgr::Factory() { |
2288 return SkNEW(SkFontMgr_Mac); | 2289 return SkNEW(SkFontMgr_Mac); |
2289 } | 2290 } |
OLD | NEW |