Diff
Modified: branches/safari-601-branch/LayoutTests/ChangeLog (193679 => 193680)
--- branches/safari-601-branch/LayoutTests/ChangeLog 2015-12-08 02:14:29 UTC (rev 193679)
+++ branches/safari-601-branch/LayoutTests/ChangeLog 2015-12-08 02:38:24 UTC (rev 193680)
@@ -1,3 +1,13 @@
+2015-11-22 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ Font selection should not consult font-variant property
+ https://bugs.webkit.org/show_bug.cgi?id=151537
+
+ Reviewed by Simon Fraser.
+
+ * fast/text/font-selection-font-variant-expected.html: Added.
+ * fast/text/font-selection-font-variant.html: Added.
+
2015-10-17 Myles C. Maxfield <mmaxfi...@apple.com>
Delete FontPlatformData::allowsLigatures()
Added: branches/safari-601-branch/LayoutTests/fast/text/font-selection-font-variant-expected.html (0 => 193680)
--- branches/safari-601-branch/LayoutTests/fast/text/font-selection-font-variant-expected.html (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/text/font-selection-font-variant-expected.html 2015-12-08 02:38:24 UTC (rev 193680)
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+ font-family: "Test1";
+ src: url("../writing-mode/resources/MakibaFont13.ttf") format("truetype");
+}
+@font-face {
+ font-family: "Test2";
+ src: url("../../resources/Ahem.ttf") format("truetype");
+}
+.test {
+ display: inline-block;
+ font-size: 40px;
+}
+</style>
+</head>
+<body>
+<p>This test makes sure that font-variant is not consulted when performing font selection.</p>
+<div class="test" style="font-family: Test2;">Hello</div>
+<div class="test" style="font-family: Test2;">Hello</div>
+<div class="test" style="font-family: Test2; font-variant: small-caps;">Hello</div>
+<div class="test" style="font-family: Test2; font-variant: small-caps;">Hello</div>
+<div class="test" style="font-family: Test2;">Hello</div>
+<div class="test" style="font-family: Test2;">Hello</div>
+<div class="test" style="font-family: Test2; font-variant: small-caps;">Hello</div>
+<div class="test" style="font-family: Test2; font-variant: small-caps;">Hello</div>
+<div class="test" style="font-family: Test1;">Hello</div>
+<div class="test" style="font-family: Test1;">Hello</div>
+<div class="test" style="font-family: Test1; font-variant: small-caps;">Hello</div>
+<div class="test" style="font-family: Test1; font-variant: small-caps;">Hello</div>
+<div class="test" style="font-family: Times;">Hello</div>
+<div class="test" style="font-family: Times; font-variant: small-caps;">Hello</div>
+</body>
+</html>
\ No newline at end of file
Added: branches/safari-601-branch/LayoutTests/fast/text/font-selection-font-variant.html (0 => 193680)
--- branches/safari-601-branch/LayoutTests/fast/text/font-selection-font-variant.html (rev 0)
+++ branches/safari-601-branch/LayoutTests/fast/text/font-selection-font-variant.html 2015-12-08 02:38:24 UTC (rev 193680)
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+@font-face {
+ font-family: "Test1";
+ src: url("../writing-mode/resources/MakibaFont13.ttf") format("truetype");
+}
+@font-face {
+ font-family: "Test1";
+ src: url("../../resources/Ahem.ttf") format("truetype");
+ font-variant: small-caps;
+}
+@font-face {
+ font-family: "Test2";
+ src: url("../writing-mode/resources/MakibaFont13.ttf") format("truetype");
+ font-variant: small-caps;
+}
+@font-face {
+ font-family: "Test2";
+ src: url("../../resources/Ahem.ttf") format("truetype");
+}
+@font-face {
+ font-family: "Test3";
+ src: url("../writing-mode/resources/MakibaFont13.ttf") format("truetype");
+}
+@font-face {
+ font-family: "Test3SmallCaps";
+ src: url("../writing-mode/resources/MakibaFont13.ttf") format("truetype");
+ font-variant: small-caps;
+}
+.test {
+ display: inline-block;
+ font-size: 40px;
+}
+</style>
+</head>
+<body>
+<p>This test makes sure that font-variant is not consulted when performing font selection.</p>
+<div class="test" style="font-family: Test1;">Hello</div>
+<div class="test" style="font-family: Test1;">Hello</div>
+<div class="test" style="font-family: Test1; font-variant: small-caps;">Hello</div>
+<div class="test" style="font-family: Test1; font-variant: small-caps;">Hello</div>
+<div class="test" style="font-family: Test2;">Hello</div>
+<div class="test" style="font-family: Test2;">Hello</div>
+<div class="test" style="font-family: Test2; font-variant: small-caps;">Hello</div>
+<div class="test" style="font-family: Test2; font-variant: small-caps;">Hello</div>
+<div class="test" style="font-family: Test3;">Hello</div>
+<div class="test" style="font-family: Test3SmallCaps;">Hello</div>
+<div class="test" style="font-family: Test3; font-variant: small-caps;">Hello</div>
+<div class="test" style="font-family: Test3SmallCaps; font-variant: small-caps;">Hello</div>
+<div class="test" style="font-family: Times;">Hello</div>
+<div class="test" style="font-family: Times; font-variant: small-caps;">Hello</div>
+</body>
+</html>
\ No newline at end of file
Modified: branches/safari-601-branch/Source/WebCore/ChangeLog (193679 => 193680)
--- branches/safari-601-branch/Source/WebCore/ChangeLog 2015-12-08 02:14:29 UTC (rev 193679)
+++ branches/safari-601-branch/Source/WebCore/ChangeLog 2015-12-08 02:38:24 UTC (rev 193680)
@@ -1,3 +1,43 @@
+2015-11-22 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ Font selection should not consult font-variant property
+ https://bugs.webkit.org/show_bug.cgi?id=151537
+
+ Reviewed by Simon Fraser.
+
+ In section 4.7 of the CSS Fonts Level 3 spec, it says "[The font-variant and
+ font-feature-settings] do not affect font selection."
+
+ All the other browsers (Chrome, Firefox, and Edge) all obey the spec here. We
+ are the only one who misbehaves. This patch aligns our behavior with the other
+ browsers.
+
+ Test: fast/text/font-selection-font-variant.html
+
+ * css/CSSFontSelector.cpp:
+ (WebCore::computeTraitsMask): Deleted.
+ (WebCore::compareFontFaces): Deleted.
+ (WebCore::CSSFontSelector::getFontFace): Deleted.
+ * css/CSSParser.cpp:
+ (WebCore::isValidKeywordPropertyAndValue):
+ (WebCore::isKeywordPropertyID):
+ (WebCore::CSSParser::createFontFaceRule):
+ (WebCore::CSSParser::CSSParser): Deleted.
+ (WebCore::CSSParser::parseValue): Deleted.
+ (WebCore::CSSParser::parseDeclaration): Deleted.
+ (WebCore::CSSParser::clearProperties): Deleted.
+ (WebCore::CSSParser::parseFontVariant): Deleted.
+ (WebCore::CSSParser::createStyleRule): Deleted.
+ (WebCore::CSSParser::deleteFontFaceOnlyValues): Deleted.
+ * css/CSSParser.h:
+ * platform/graphics/FontDescription.cpp:
+ (WebCore::FontDescription::traitsMask): Deleted.
+ * platform/graphics/win/FontCacheWin.cpp:
+ (WebCore::traitsInFamilyEnumProc):
+ * platform/graphics/cocoa/FontCacheCoreText.cpp:
+ (WebCore::toTraitsMask):
+ * platform/text/TextFlags.h:
+
2015-12-07 Matthew Hanson <matthew_han...@apple.com>
Follow-up merge of r191014. rdar://problem/23769801
Modified: branches/safari-601-branch/Source/WebCore/css/CSSFontSelector.cpp (193679 => 193680)
--- branches/safari-601-branch/Source/WebCore/css/CSSFontSelector.cpp 2015-12-08 02:14:29 UTC (rev 193679)
+++ branches/safari-601-branch/Source/WebCore/css/CSSFontSelector.cpp 2015-12-08 02:38:24 UTC (rev 193680)
@@ -174,35 +174,6 @@
} else
traitsMask |= FontWeight400Mask;
- if (RefPtr<CSSValue> fontVariant = style.getPropertyCSSValue(CSSPropertyFontVariant)) {
- // font-variant descriptor can be a value list.
- if (fontVariant->isPrimitiveValue()) {
- RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
- list->append(fontVariant.releaseNonNull());
- fontVariant = list.releaseNonNull();
- } else if (!is<CSSValueList>(*fontVariant))
- return;
-
- CSSValueList& variantList = downcast<CSSValueList>(*fontVariant);
- unsigned numVariants = variantList.length();
- if (!numVariants)
- return;
-
- for (unsigned i = 0; i < numVariants; ++i) {
- switch (downcast<CSSPrimitiveValue>(variantList.itemWithoutBoundsCheck(i))->getValueID()) {
- case CSSValueNormal:
- traitsMask |= FontVariantNormalMask;
- break;
- case CSSValueSmallCaps:
- traitsMask |= FontVariantSmallCapsMask;
- break;
- default:
- break;
- }
- }
- } else
- traitsMask |= FontVariantMask;
-
// Each item in the src property's list is a single CSSFontFaceSource. Put them all into a CSSFontFace.
RefPtr<CSSFontFace> fontFace;
@@ -418,22 +389,6 @@
FontTraitsMask firstTraitsMask = first->traitsMask();
FontTraitsMask secondTraitsMask = second->traitsMask();
- bool firstHasDesiredVariant = firstTraitsMask & desiredTraitsMaskForComparison & FontVariantMask;
- bool secondHasDesiredVariant = secondTraitsMask & desiredTraitsMaskForComparison & FontVariantMask;
-
- if (firstHasDesiredVariant != secondHasDesiredVariant)
- return firstHasDesiredVariant;
-
- // We need to check font-variant css property for CSS2.1 compatibility.
- if ((desiredTraitsMaskForComparison & FontVariantSmallCapsMask) && !first->isLocalFallback() && !second->isLocalFallback()) {
- // Prefer a font that has indicated that it can only support small-caps to a font that claims to support
- // all variants. The specialized font is more likely to be true small-caps and not require synthesis.
- bool firstRequiresSmallCaps = (firstTraitsMask & FontVariantSmallCapsMask) && !(firstTraitsMask & FontVariantNormalMask);
- bool secondRequiresSmallCaps = (secondTraitsMask & FontVariantSmallCapsMask) && !(secondTraitsMask & FontVariantNormalMask);
- if (firstRequiresSmallCaps != secondRequiresSmallCaps)
- return firstRequiresSmallCaps;
- }
-
bool firstHasDesiredStyle = firstTraitsMask & desiredTraitsMaskForComparison & FontStyleMask;
bool secondHasDesiredStyle = secondTraitsMask & desiredTraitsMaskForComparison & FontStyleMask;
@@ -532,14 +487,6 @@
unsigned candidateTraitsMask = candidate->traitsMask();
if ((traitsMask & FontStyleNormalMask) && !(candidateTraitsMask & FontStyleNormalMask))
continue;
- if ((traitsMask & FontVariantNormalMask) && !(candidateTraitsMask & FontVariantNormalMask))
- continue;
-#if ENABLE(SVG_FONTS)
- // For SVG Fonts that specify that they only support the "normal" variant, we will assume they are incapable
- // of small-caps synthesis and just ignore the font face as a candidate.
- if (candidate->hasSVGFontFaceSource() && (traitsMask & FontVariantSmallCapsMask) && !(candidateTraitsMask & FontVariantSmallCapsMask))
- continue;
-#endif
candidateFontFaces.append(candidate);
}
@@ -550,8 +497,6 @@
unsigned candidateTraitsMask = candidate->traitsMask();
if ((traitsMask & FontStyleNormalMask) && !(candidateTraitsMask & FontStyleNormalMask))
continue;
- if ((traitsMask & FontVariantNormalMask) && !(candidateTraitsMask & FontVariantNormalMask))
- continue;
candidateFontFaces.append(candidate);
}
}
Modified: branches/safari-601-branch/Source/WebCore/css/CSSParser.cpp (193679 => 193680)
--- branches/safari-601-branch/Source/WebCore/css/CSSParser.cpp 2015-12-08 02:14:29 UTC (rev 193679)
+++ branches/safari-601-branch/Source/WebCore/css/CSSParser.cpp 2015-12-08 02:38:24 UTC (rev 193680)
@@ -320,7 +320,6 @@
, m_inParseShorthand(0)
, m_currentShorthand(CSSPropertyInvalid)
, m_implicitShorthand(false)
- , m_hasFontFaceOnlyValues(false)
, m_hadSyntacticallyValidCSSRule(false)
, m_logErrors(false)
, m_ignoreErrorsInDeclaration(false)
@@ -1055,6 +1054,10 @@
if (valueID == CSSValueNormal || valueID == CSSValueHistoricalForms)
return true;
break;
+ case CSSPropertyFontVariant: // normal | small-caps
+ if (valueID == CSSValueNormal || valueID == CSSValueSmallCaps)
+ return true;
+ break;
default:
ASSERT_NOT_REACHED();
return false;
@@ -1185,6 +1188,7 @@
case CSSPropertyFontVariantPosition:
case CSSPropertyFontVariantCaps:
case CSSPropertyFontVariantAlternates:
+ case CSSPropertyFontVariant:
return true;
default:
return false;
@@ -1387,8 +1391,6 @@
m_rule = nullptr;
ParseResult result = ParseResult::Error;
- if (m_hasFontFaceOnlyValues)
- deleteFontFaceOnlyValues();
if (!m_parsedProperties.isEmpty()) {
result = declaration->addParsedProperties(m_parsedProperties) ? ParseResult::Changed : ParseResult::Unchanged;
@@ -1478,9 +1480,6 @@
cssyyparse(this);
m_rule = nullptr;
- if (m_hasFontFaceOnlyValues)
- deleteFontFaceOnlyValues();
-
Ref<ImmutableStyleProperties> style = createStyleProperties();
clearProperties();
return style;
@@ -1505,8 +1504,6 @@
m_rule = nullptr;
bool ok = false;
- if (m_hasFontFaceOnlyValues)
- deleteFontFaceOnlyValues();
if (!m_parsedProperties.isEmpty()) {
ok = true;
declaration->addParsedProperties(m_parsedProperties);
@@ -1683,7 +1680,6 @@
{
m_parsedProperties.clear();
m_numParsedPropertiesBeforeMarginBox = INVALID_NUM_PARSED_PROPERTIES;
- m_hasFontFaceOnlyValues = false;
}
URL CSSParser::completeURL(const CSSParserContext& context, const String& url)
@@ -2354,9 +2350,6 @@
case CSSPropertyFontSize:
return parseFontSize(important);
- case CSSPropertyFontVariant: // normal | small-caps | inherit
- return parseFontVariant(important);
-
case CSSPropertyVerticalAlign:
// baseline | sub | super | top | text-top | middle | bottom | text-bottom |
// <percentage> | <length> | inherit
@@ -6924,53 +6917,6 @@
return validPrimitive;
}
-bool CSSParser::parseFontVariant(bool important)
-{
- RefPtr<CSSValueList> values;
- if (m_valueList->size() > 1)
- values = CSSValueList::createCommaSeparated();
- CSSParserValue* val;
- bool expectComma = false;
- while ((val = m_valueList->current())) {
- RefPtr<CSSPrimitiveValue> parsedValue;
- if (!expectComma) {
- expectComma = true;
- if (val->id == CSSValueNormal || val->id == CSSValueSmallCaps)
- parsedValue = cssValuePool().createIdentifierValue(val->id);
- else if (val->id == CSSValueAll && !values) {
- // 'all' is only allowed in @font-face and with no other values. Make a value list to
- // indicate that we are in the @font-face case.
- values = CSSValueList::createCommaSeparated();
- parsedValue = cssValuePool().createIdentifierValue(val->id);
- }
- } else if (val->unit == CSSParserValue::Operator && val->iValue == ',') {
- expectComma = false;
- m_valueList->next();
- continue;
- }
-
- if (!parsedValue)
- return false;
-
- m_valueList->next();
-
- if (values)
- values->append(parsedValue.releaseNonNull());
- else {
- addProperty(CSSPropertyFontVariant, parsedValue.release(), important);
- return true;
- }
- }
-
- if (values && values->length()) {
- m_hasFontFaceOnlyValues = true;
- addProperty(CSSPropertyFontVariant, values.release(), important);
- return true;
- }
-
- return false;
-}
-
static CSSValueID createFontWeightValueKeyword(int weight)
{
ASSERT(!(weight % 100) && weight >= 100 && weight <= 900);
@@ -12532,8 +12478,6 @@
if (selectors) {
m_allowImportRules = false;
m_allowNamespaceDeclarations = false;
- if (m_hasFontFaceOnlyValues)
- deleteFontFaceOnlyValues();
rule = StyleRule::create(m_lastSelectorLineNumber, createStyleProperties());
rule->parserAdoptSelectorVector(*selectors);
processAndAddNewRuleToSourceTreeIfNeeded();
@@ -12548,9 +12492,7 @@
m_allowImportRules = m_allowNamespaceDeclarations = false;
for (unsigned i = 0; i < m_parsedProperties.size(); ++i) {
CSSProperty& property = m_parsedProperties[i];
- if (property.id() == CSSPropertyFontVariant && property.value()->isPrimitiveValue())
- property.wrapValueInCommaSeparatedList();
- else if (property.id() == CSSPropertyFontFamily && (!is<CSSValueList>(*property.value()) || downcast<CSSValueList>(*property.value()).length() != 1)) {
+ if (property.id() == CSSPropertyFontFamily && (!is<CSSValueList>(*property.value()) || downcast<CSSValueList>(*property.value()).length() != 1)) {
// Unlike font-family property, font-family descriptor in @font-face rule
// has to be a value list with exactly one family name. It cannot have a
// have 'initial' value and cannot 'inherit' from parent.
@@ -12708,14 +12650,6 @@
m_numParsedPropertiesBeforeMarginBox = INVALID_NUM_PARSED_PROPERTIES;
}
-void CSSParser::deleteFontFaceOnlyValues()
-{
- ASSERT(m_hasFontFaceOnlyValues);
- m_parsedProperties.removeAllMatching([] (const CSSProperty& property) {
- return property.id() == CSSPropertyFontVariant && property.value()->isValueList();
- });
-}
-
PassRefPtr<StyleKeyframe> CSSParser::createKeyframe(CSSParserValueList& keys)
{
// Create a key string from the passed keys
Modified: branches/safari-601-branch/Source/WebCore/css/CSSParser.h (193679 => 193680)
--- branches/safari-601-branch/Source/WebCore/css/CSSParser.h 2015-12-08 02:14:29 UTC (rev 193679)
+++ branches/safari-601-branch/Source/WebCore/css/CSSParser.h 2015-12-08 02:38:24 UTC (rev 193680)
@@ -262,7 +262,6 @@
bool parseLineHeight(bool important);
bool parseFontSize(bool important);
- bool parseFontVariant(bool important);
bool parseFontWeight(bool important);
bool parseFontSynthesis(bool important);
bool parseFontFaceSrc();
@@ -414,7 +413,6 @@
CSSPropertyID m_currentShorthand;
bool m_implicitShorthand;
- bool m_hasFontFaceOnlyValues;
bool m_hadSyntacticallyValidCSSRule;
bool m_logErrors;
bool m_ignoreErrorsInDeclaration;
@@ -562,8 +560,6 @@
bool isValidSize(ValueWithCalculation&);
- void deleteFontFaceOnlyValues();
-
bool isGeneratedImageValue(CSSParserValue&) const;
bool parseGeneratedImage(CSSParserValueList&, RefPtr<CSSValue>&);
Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/FontDescription.cpp (193679 => 193680)
--- branches/safari-601-branch/Source/WebCore/platform/graphics/FontDescription.cpp 2015-12-08 02:14:29 UTC (rev 193679)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/FontDescription.cpp 2015-12-08 02:38:24 UTC (rev 193680)
@@ -87,7 +87,6 @@
FontTraitsMask FontDescription::traitsMask() const
{
return static_cast<FontTraitsMask>((m_italic ? FontStyleItalicMask : FontStyleNormalMask)
- | (m_smallCaps ? FontVariantSmallCapsMask : FontVariantNormalMask)
| (FontWeight100Mask << (m_weight - FontWeight100)));
}
Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm (193679 => 193680)
--- branches/safari-601-branch/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm 2015-12-08 02:14:29 UTC (rev 193679)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/ios/FontCacheIOS.mm 2015-12-08 02:38:24 UTC (rev 193680)
@@ -551,7 +551,6 @@
static inline FontTraitsMask toTraitsMask(CTFontSymbolicTraits ctFontTraits)
{
return static_cast<FontTraitsMask>(((ctFontTraits & kCTFontTraitItalic) ? FontStyleItalicMask : FontStyleNormalMask)
- | FontVariantNormalMask
// FontWeight600 or higher is bold for CTFonts, so choose middle values for
// bold (600-900) and non-bold (100-500)
| ((ctFontTraits & kCTFontTraitBold) ? FontWeight700Mask : FontWeight300Mask));
Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCacheMac.mm (193679 => 193680)
--- branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCacheMac.mm 2015-12-08 02:14:29 UTC (rev 193679)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/mac/FontCacheMac.mm 2015-12-08 02:38:24 UTC (rev 193680)
@@ -117,7 +117,6 @@
static inline FontTraitsMask toTraitsMask(NSFontTraitMask appKitTraits, NSInteger appKitWeight)
{
return static_cast<FontTraitsMask>(((appKitTraits & NSFontItalicTrait) ? FontStyleItalicMask : FontStyleNormalMask)
- | FontVariantNormalMask
| (appKitWeight == 1 ? FontWeight100Mask :
appKitWeight == 2 ? FontWeight200Mask :
appKitWeight <= 4 ? FontWeight300Mask :
Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/win/FontCacheWin.cpp (193679 => 193680)
--- branches/safari-601-branch/Source/WebCore/platform/graphics/win/FontCacheWin.cpp 2015-12-08 02:14:29 UTC (rev 193679)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/win/FontCacheWin.cpp 2015-12-08 02:38:24 UTC (rev 193680)
@@ -528,7 +528,6 @@
unsigned traitsMask = 0;
traitsMask |= logFont->lfItalic ? FontStyleItalicMask : FontStyleNormalMask;
- traitsMask |= FontVariantNormalMask;
LONG weight = adjustedGDIFontWeight(logFont->lfWeight, procData->m_familyName);
traitsMask |= weight == FW_THIN ? FontWeight100Mask :
weight == FW_EXTRALIGHT ? FontWeight200Mask :
Modified: branches/safari-601-branch/Source/WebCore/platform/text/TextFlags.h (193679 => 193680)
--- branches/safari-601-branch/Source/WebCore/platform/text/TextFlags.h 2015-12-08 02:14:29 UTC (rev 193679)
+++ branches/safari-601-branch/Source/WebCore/platform/text/TextFlags.h 2015-12-08 02:38:24 UTC (rev 193680)
@@ -277,8 +277,6 @@
enum {
FontStyleNormalBit = 0,
FontStyleItalicBit,
- FontVariantNormalBit,
- FontVariantSmallCapsBit,
FontWeight100Bit,
FontWeight200Bit,
FontWeight300Bit,
@@ -296,10 +294,6 @@
FontStyleItalicMask = 1 << FontStyleItalicBit,
FontStyleMask = FontStyleNormalMask | FontStyleItalicMask,
- FontVariantNormalMask = 1 << FontVariantNormalBit,
- FontVariantSmallCapsMask = 1 << FontVariantSmallCapsBit,
- FontVariantMask = FontVariantNormalMask | FontVariantSmallCapsMask,
-
FontWeight100Mask = 1 << FontWeight100Bit,
FontWeight200Mask = 1 << FontWeight200Bit,
FontWeight300Mask = 1 << FontWeight300Bit,