| 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 "SkBase64.h" | 10 #include "SkBase64.h" |
| (...skipping 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1623 } | 1623 } |
| 1624 } | 1624 } |
| 1625 | 1625 |
| 1626 SelectObject(hdc, savefont); | 1626 SelectObject(hdc, savefont); |
| 1627 DeleteObject(font); | 1627 DeleteObject(font); |
| 1628 DeleteDC(hdc); | 1628 DeleteDC(hdc); |
| 1629 | 1629 |
| 1630 return stream; | 1630 return stream; |
| 1631 } | 1631 } |
| 1632 | 1632 |
| 1633 SkStream* SkFontHost::OpenStream(SkFontID uniqueID) { | |
| 1634 SkTypeface* typeface = SkTypefaceCache::FindByID(uniqueID); | |
| 1635 return typeface ? typeface->openStream(NULL) : NULL; | |
| 1636 } | |
| 1637 | |
| 1638 SkScalerContext* LogFontTypeface::onCreateScalerContext(const SkDescriptor* desc
) const { | 1633 SkScalerContext* LogFontTypeface::onCreateScalerContext(const SkDescriptor* desc
) const { |
| 1639 return SkNEW_ARGS(SkScalerContext_Windows, (const_cast<LogFontTypeface*>(thi
s), desc)); | 1634 return SkNEW_ARGS(SkScalerContext_Windows, (const_cast<LogFontTypeface*>(thi
s), desc)); |
| 1640 } | 1635 } |
| 1641 | 1636 |
| 1642 /** Return the closest matching typeface given either an existing family | 1637 /** Return the closest matching typeface given either an existing family |
| 1643 (specified by a typeface in that family) or by a familyName, and a | 1638 (specified by a typeface in that family) or by a familyName, and a |
| 1644 requested style. | 1639 requested style. |
| 1645 1) If familyFace is null, use familyName. | 1640 1) If familyFace is null, use familyName. |
| 1646 2) If familyName is null, use familyFace. | 1641 2) If familyName is null, use familyFace. |
| 1647 3) If both are null, return the default font that best matches style | 1642 3) If both are null, return the default font that best matches style |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1707 if (isLCD(*rec) && !isAxisAligned(*rec)) { | 1702 if (isLCD(*rec) && !isAxisAligned(*rec)) { |
| 1708 rec->fMaskFormat = SkMask::kA8_Format; | 1703 rec->fMaskFormat = SkMask::kA8_Format; |
| 1709 } | 1704 } |
| 1710 #endif | 1705 #endif |
| 1711 | 1706 |
| 1712 if (!fCanBeLCD && isLCD(*rec)) { | 1707 if (!fCanBeLCD && isLCD(*rec)) { |
| 1713 rec->fMaskFormat = SkMask::kA8_Format; | 1708 rec->fMaskFormat = SkMask::kA8_Format; |
| 1714 rec->fFlags &= ~SkScalerContext::kGenA8FromLCD_Flag; | 1709 rec->fFlags &= ~SkScalerContext::kGenA8FromLCD_Flag; |
| 1715 } | 1710 } |
| 1716 } | 1711 } |
| OLD | NEW |