Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(570)

Side by Side Diff: src/ports/SkFontHost_mac.cpp

Issue 975473002: Set the ttcIndex on Mac onOpenStream. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698