Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(802)

Side by Side Diff: src/ports/SkFontHost_FreeType.cpp

Issue 2171163002: Add test for typeface style round trip. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Name extremes, add comment. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ports/SkFontConfigInterface_direct.cpp ('k') | src/ports/SkFontHost_mac.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « src/ports/SkFontConfigInterface_direct.cpp ('k') | src/ports/SkFontHost_mac.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698