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