aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2015-04-16 14:22:46 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-16 14:22:46 -0700
commitd803cdad725b6db07b6df0ae7f390f5dbef46475 (patch)
tree37687cdd5be81105c024855afaa86b24fab90f0a
parentea6075e3ea92d6fa0970f89f7532c55eb140a9b3 (diff)
Add PS 'all' weight name to scanFont.
Multiple Master fonts often list their weight as 'all'. However, they usually default to normal weight. State explicitly that we know about this weight string. Review URL: https://codereview.chromium.org/1092793002
-rw-r--r--src/ports/SkFontHost_FreeType.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp
index 5a4b75579b..4b8345a94c 100644
--- a/src/ports/SkFontHost_FreeType.cpp
+++ b/src/ports/SkFontHost_FreeType.cpp
@@ -1681,6 +1681,7 @@ bool SkTypeface_FreeType::Scanner::scanFont(
int const weight;
} commonWeights [] = {
// There are probably more common names, but these are known to exist.
+ { "all", SkFontStyle::kNormal_Weight }, // Multiple Masters usually default to normal.
{ "black", SkFontStyle::kBlack_Weight },
{ "bold", SkFontStyle::kBold_Weight },
{ "book", (SkFontStyle::kNormal_Weight + SkFontStyle::kLight_Weight)/2 },