| 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 "SkAdvancedTypefaceMetrics.h" | 9 #include "SkAdvancedTypefaceMetrics.h" |
| 10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
| (...skipping 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1334 | 1334 |
| 1335 emboldenIfNeeded(fFace, fFace->glyph); | 1335 emboldenIfNeeded(fFace, fFace->glyph); |
| 1336 generateGlyphImage(fFace, glyph); | 1336 generateGlyphImage(fFace, glyph); |
| 1337 } | 1337 } |
| 1338 | 1338 |
| 1339 | 1339 |
| 1340 void SkScalerContext_FreeType::generatePath(const SkGlyph& glyph, | 1340 void SkScalerContext_FreeType::generatePath(const SkGlyph& glyph, |
| 1341 SkPath* path) { | 1341 SkPath* path) { |
| 1342 SkAutoMutexAcquire ac(gFTMutex); | 1342 SkAutoMutexAcquire ac(gFTMutex); |
| 1343 | 1343 |
| 1344 SkASSERT(&glyph && path); | 1344 SkASSERT(path); |
| 1345 | 1345 |
| 1346 if (this->setupSize()) { | 1346 if (this->setupSize()) { |
| 1347 path->reset(); | 1347 path->reset(); |
| 1348 return; | 1348 return; |
| 1349 } | 1349 } |
| 1350 | 1350 |
| 1351 uint32_t flags = fLoadGlyphFlags; | 1351 uint32_t flags = fLoadGlyphFlags; |
| 1352 flags |= FT_LOAD_NO_BITMAP; // ignore embedded bitmaps so we're sure to get
the outline | 1352 flags |= FT_LOAD_NO_BITMAP; // ignore embedded bitmaps so we're sure to get
the outline |
| 1353 flags &= ~FT_LOAD_RENDER; // don't scan convert (we just want the outline) | 1353 flags &= ~FT_LOAD_RENDER; // don't scan convert (we just want the outline) |
| 1354 | 1354 |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1717 *style = (SkTypeface::Style) tempStyle; | 1717 *style = (SkTypeface::Style) tempStyle; |
| 1718 } | 1718 } |
| 1719 if (isFixedPitch) { | 1719 if (isFixedPitch) { |
| 1720 *isFixedPitch = FT_IS_FIXED_WIDTH(face); | 1720 *isFixedPitch = FT_IS_FIXED_WIDTH(face); |
| 1721 } | 1721 } |
| 1722 | 1722 |
| 1723 FT_Done_Face(face); | 1723 FT_Done_Face(face); |
| 1724 FT_Done_FreeType(library); | 1724 FT_Done_FreeType(library); |
| 1725 return true; | 1725 return true; |
| 1726 } | 1726 } |
| OLD | NEW |