| 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 "SkEndian.h" | 9 #include "SkEndian.h" |
| 10 #include "SkFontDescriptor.h" | 10 #include "SkFontDescriptor.h" |
| 11 #include "SkFontMgr.h" | 11 #include "SkFontMgr.h" |
| 12 #include "SkLazyPtr.h" | 12 #include "SkLazyPtr.h" |
| 13 #include "SkMutex.h" | |
| 14 #include "SkOTTable_OS_2.h" | 13 #include "SkOTTable_OS_2.h" |
| 15 #include "SkStream.h" | 14 #include "SkStream.h" |
| 16 #include "SkTypeface.h" | 15 #include "SkTypeface.h" |
| 17 | 16 |
| 18 SkTypeface::SkTypeface(const SkFontStyle& style, SkFontID fontID, bool isFixedPi
tch) | 17 SkTypeface::SkTypeface(const SkFontStyle& style, SkFontID fontID, bool isFixedPi
tch) |
| 19 : fUniqueID(fontID), fStyle(style), fIsFixedPitch(isFixedPitch) { } | 18 : fUniqueID(fontID), fStyle(style), fIsFixedPitch(isFixedPitch) { } |
| 20 | 19 |
| 21 SkTypeface::~SkTypeface() { } | 20 SkTypeface::~SkTypeface() { } |
| 22 | 21 |
| 23 | 22 |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 if (ctx.get()) { | 364 if (ctx.get()) { |
| 366 SkPaint::FontMetrics fm; | 365 SkPaint::FontMetrics fm; |
| 367 ctx->getFontMetrics(&fm); | 366 ctx->getFontMetrics(&fm); |
| 368 bounds->set(fm.fXMin * invTextSize, fm.fTop * invTextSize, | 367 bounds->set(fm.fXMin * invTextSize, fm.fTop * invTextSize, |
| 369 fm.fXMax * invTextSize, fm.fBottom * invTextSize); | 368 fm.fXMax * invTextSize, fm.fBottom * invTextSize); |
| 370 return true; | 369 return true; |
| 371 } | 370 } |
| 372 return false; | 371 return false; |
| 373 } | 372 } |
| 374 | 373 |
| OLD | NEW |