| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 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 "SkBitmap.h" | 9 #include "SkBitmap.h" |
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
| (...skipping 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1689 { "light", SkFontStyle::kLight_Weight }, | 1689 { "light", SkFontStyle::kLight_Weight }, |
| 1690 { "medium", SkFontStyle::kMedium_Weight }, | 1690 { "medium", SkFontStyle::kMedium_Weight }, |
| 1691 { "normal", SkFontStyle::kNormal_Weight }, | 1691 { "normal", SkFontStyle::kNormal_Weight }, |
| 1692 { "plain", SkFontStyle::kNormal_Weight }, | 1692 { "plain", SkFontStyle::kNormal_Weight }, |
| 1693 { "regular", SkFontStyle::kNormal_Weight }, | 1693 { "regular", SkFontStyle::kNormal_Weight }, |
| 1694 { "roman", SkFontStyle::kNormal_Weight }, | 1694 { "roman", SkFontStyle::kNormal_Weight }, |
| 1695 { "semibold", SkFontStyle::kSemiBold_Weight }, | 1695 { "semibold", SkFontStyle::kSemiBold_Weight }, |
| 1696 { "standard", SkFontStyle::kNormal_Weight }, | 1696 { "standard", SkFontStyle::kNormal_Weight }, |
| 1697 { "thin", SkFontStyle::kThin_Weight }, | 1697 { "thin", SkFontStyle::kThin_Weight }, |
| 1698 { "ultra", SkFontStyle::kExtraBold_Weight }, | 1698 { "ultra", SkFontStyle::kExtraBold_Weight }, |
| 1699 { "ultrablack", 1000 }, | 1699 { "ultrablack", SkFontStyle::kExtraBlack_Weight }, |
| 1700 { "ultrabold", SkFontStyle::kExtraBold_Weight }, | 1700 { "ultrabold", SkFontStyle::kExtraBold_Weight }, |
| 1701 { "ultraheavy", 1000 }, | 1701 { "ultraheavy", SkFontStyle::kExtraBlack_Weight }, |
| 1702 { "ultralight", SkFontStyle::kExtraLight_Weight }, | 1702 { "ultralight", SkFontStyle::kExtraLight_Weight }, |
| 1703 }; | 1703 }; |
| 1704 int const index = SkStrLCSearch(&commonWeights[0].name, SK_ARRAY_COUNT(c
ommonWeights), | 1704 int const index = SkStrLCSearch(&commonWeights[0].name, SK_ARRAY_COUNT(c
ommonWeights), |
| 1705 psFontInfo.weight, sizeof(commonWeights[
0])); | 1705 psFontInfo.weight, sizeof(commonWeights[
0])); |
| 1706 if (index >= 0) { | 1706 if (index >= 0) { |
| 1707 weight = commonWeights[index].weight; | 1707 weight = commonWeights[index].weight; |
| 1708 } else { | 1708 } else { |
| 1709 SkDEBUGF(("Do not know weight for: %s (%s) \n", face->family_name, p
sFontInfo.weight)); | 1709 SkDEBUGF(("Do not know weight for: %s (%s) \n", face->family_name, p
sFontInfo.weight)); |
| 1710 } | 1710 } |
| 1711 } | 1711 } |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1792 SkDEBUGF(("Requested font axis not found: %s '%c%c%c%c'\n", | 1792 SkDEBUGF(("Requested font axis not found: %s '%c%c%c%c'\n", |
| 1793 name.c_str(), | 1793 name.c_str(), |
| 1794 (skTag >> 24) & 0xFF, | 1794 (skTag >> 24) & 0xFF, |
| 1795 (skTag >> 16) & 0xFF, | 1795 (skTag >> 16) & 0xFF, |
| 1796 (skTag >> 8) & 0xFF, | 1796 (skTag >> 8) & 0xFF, |
| 1797 (skTag) & 0xFF)); | 1797 (skTag) & 0xFF)); |
| 1798 } | 1798 } |
| 1799 } | 1799 } |
| 1800 ) | 1800 ) |
| 1801 } | 1801 } |
| OLD | NEW |