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 #include <vector> | 9 #include <vector> |
10 #ifdef SK_BUILD_FOR_MAC | 10 #ifdef SK_BUILD_FOR_MAC |
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 fFBoundingBoxesGlyphOffset = fGlyphCount; // fallback for all fonts | 890 fFBoundingBoxesGlyphOffset = fGlyphCount; // fallback for all fonts |
891 AutoCGTable<SkOTTableHorizontalHeader> hheaTable(fCGFont); | 891 AutoCGTable<SkOTTableHorizontalHeader> hheaTable(fCGFont); |
892 if (hheaTable.fData) { | 892 if (hheaTable.fData) { |
893 fFBoundingBoxesGlyphOffset = SkEndian_SwapBE16(hheaTable->numberOfHMetri
cs); | 893 fFBoundingBoxesGlyphOffset = SkEndian_SwapBE16(hheaTable->numberOfHMetri
cs); |
894 } | 894 } |
895 return fFBoundingBoxesGlyphOffset; | 895 return fFBoundingBoxesGlyphOffset; |
896 } | 896 } |
897 | 897 |
898 bool SkScalerContext_Mac::generateBBoxes() { | 898 bool SkScalerContext_Mac::generateBBoxes() { |
899 if (fGeneratedFBoundingBoxes) { | 899 if (fGeneratedFBoundingBoxes) { |
900 return NULL != fFBoundingBoxes.get(); | 900 return SkToBool(fFBoundingBoxes.get()); |
901 } | 901 } |
902 fGeneratedFBoundingBoxes = true; | 902 fGeneratedFBoundingBoxes = true; |
903 | 903 |
904 AutoCGTable<SkOTTableHead> headTable(fCGFont); | 904 AutoCGTable<SkOTTableHead> headTable(fCGFont); |
905 if (!headTable.fData) { | 905 if (!headTable.fData) { |
906 return false; | 906 return false; |
907 } | 907 } |
908 | 908 |
909 AutoCGTable<SkOTTableIndexToLocation> locaTable(fCGFont); | 909 AutoCGTable<SkOTTableIndexToLocation> locaTable(fCGFont); |
910 if (!locaTable.fData) { | 910 if (!locaTable.fData) { |
(...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2304 return create_typeface(NULL, familyName, (SkTypeface::Style)styleBits); | 2304 return create_typeface(NULL, familyName, (SkTypeface::Style)styleBits); |
2305 } | 2305 } |
2306 }; | 2306 }; |
2307 | 2307 |
2308 /////////////////////////////////////////////////////////////////////////////// | 2308 /////////////////////////////////////////////////////////////////////////////// |
2309 | 2309 |
2310 SkFontMgr* SkFontMgr::Factory() { | 2310 SkFontMgr* SkFontMgr::Factory() { |
2311 return SkNEW(SkFontMgr_Mac); | 2311 return SkNEW(SkFontMgr_Mac); |
2312 } | 2312 } |
2313 #endif | 2313 #endif |
OLD | NEW |