| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 The Android Open Source Project | 2 * Copyright 2011 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkAdvancedTypefaceMetrics.h" | 8 #include "SkAdvancedTypefaceMetrics.h" |
| 9 #include "SkFontDescriptor.h" | 9 #include "SkFontDescriptor.h" |
| 10 #include "SkFontHost.h" | 10 #include "SkFontHost.h" |
| 11 #include "SkStream.h" | 11 #include "SkStream.h" |
| 12 #include "SkTypeface.h" | 12 #include "SkTypeface.h" |
| 13 | 13 |
| 14 SK_DEFINE_INST_COUNT(SkTypeface) | |
| 15 | |
| 16 //#define TRACE_LIFECYCLE | 14 //#define TRACE_LIFECYCLE |
| 17 | 15 |
| 18 #ifdef TRACE_LIFECYCLE | 16 #ifdef TRACE_LIFECYCLE |
| 19 static int32_t gTypefaceCounter; | 17 static int32_t gTypefaceCounter; |
| 20 #endif | 18 #endif |
| 21 | 19 |
| 22 SkTypeface::SkTypeface(Style style, SkFontID fontID, bool isFixedPitch) | 20 SkTypeface::SkTypeface(Style style, SkFontID fontID, bool isFixedPitch) |
| 23 : fUniqueID(fontID), fStyle(style), fIsFixedPitch(isFixedPitch) { | 21 : fUniqueID(fontID), fStyle(style), fIsFixedPitch(isFixedPitch) { |
| 24 #ifdef TRACE_LIFECYCLE | 22 #ifdef TRACE_LIFECYCLE |
| 25 SkDebugf("SkTypeface: create %p fontID %d total %d\n", | 23 SkDebugf("SkTypeface: create %p fontID %d total %d\n", |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 uint32_t glyphIDsCount) const { | 261 uint32_t glyphIDsCount) const { |
| 264 return this->onGetAdvancedTypefaceMetrics(info, glyphIDs, glyphIDsCount); | 262 return this->onGetAdvancedTypefaceMetrics(info, glyphIDs, glyphIDsCount); |
| 265 } | 263 } |
| 266 | 264 |
| 267 /////////////////////////////////////////////////////////////////////////////// | 265 /////////////////////////////////////////////////////////////////////////////// |
| 268 | 266 |
| 269 bool SkTypeface::onGetKerningPairAdjustments(const uint16_t glyphs[], int count, | 267 bool SkTypeface::onGetKerningPairAdjustments(const uint16_t glyphs[], int count, |
| 270 int32_t adjustments[]) const { | 268 int32_t adjustments[]) const { |
| 271 return false; | 269 return false; |
| 272 } | 270 } |
| OLD | NEW |