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

Unified Diff: Source/platform/fonts/FontDescription.h

Issue 447443003: Remove custom style building for font-variant-ligatures. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/resolver/StyleBuilderCustom.cpp ('k') | Source/platform/fonts/FontDescription.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/FontDescription.h
diff --git a/Source/platform/fonts/FontDescription.h b/Source/platform/fonts/FontDescription.h
index d5cd20397130c4f20b490a513e5a6c8b15cba6bb..88d2bd7e05ff650705720d1cca0ef1693a7e4b58 100644
--- a/Source/platform/fonts/FontDescription.h
+++ b/Source/platform/fonts/FontDescription.h
@@ -88,6 +88,21 @@ public:
bool operator==(const FontDescription&) const;
bool operator!=(const FontDescription& other) const { return !(*this == other); }
+ struct VariantLigatures {
+ VariantLigatures()
+ : common(NormalLigaturesState)
+ , discretionary(NormalLigaturesState)
+ , historical(NormalLigaturesState)
+ , contextual(NormalLigaturesState)
+ {
+ }
+
+ unsigned common : 2;
+ unsigned discretionary : 2;
+ unsigned historical : 2;
+ unsigned contextual : 2;
+ };
+
const FontFamily& family() const { return m_familyList; }
FontFamily& firstFamily() { return m_familyList; }
float specifiedSize() const { return m_specifiedSize; }
@@ -110,6 +125,7 @@ public:
return NonFixedPitchFont;
}
Kerning kerning() const { return static_cast<Kerning>(m_kerning); }
+ VariantLigatures variantLigatures() const;
LigaturesState commonLigaturesState() const { return static_cast<LigaturesState>(m_commonLigaturesState); }
LigaturesState discretionaryLigaturesState() const { return static_cast<LigaturesState>(m_discretionaryLigaturesState); }
LigaturesState historicalLigaturesState() const { return static_cast<LigaturesState>(m_historicalLigaturesState); }
@@ -140,15 +156,12 @@ public:
void setSpecifiedSize(float s) { m_specifiedSize = clampToFloat(s); }
void setStyle(FontStyle i) { m_style = i; }
void setVariant(FontVariant c) { m_variant = c; }
+ void setVariantLigatures(const VariantLigatures&);
void setIsAbsoluteSize(bool s) { m_isAbsoluteSize = s; }
void setWeight(FontWeight w) { m_weight = w; }
void setStretch(FontStretch s) { m_stretch = s; }
void setGenericFamily(GenericFamilyType genericFamily) { m_genericFamily = genericFamily; }
void setKerning(Kerning kerning) { m_kerning = kerning; updateTypesettingFeatures(); }
- void setCommonLigaturesState(LigaturesState commonLigaturesState) { m_commonLigaturesState = commonLigaturesState; updateTypesettingFeatures(); }
- void setDiscretionaryLigaturesState(LigaturesState discretionaryLigaturesState) { m_discretionaryLigaturesState = discretionaryLigaturesState; updateTypesettingFeatures(); }
- void setHistoricalLigaturesState(LigaturesState historicalLigaturesState) { m_historicalLigaturesState = historicalLigaturesState; updateTypesettingFeatures(); }
- void setContextualLigaturesState(LigaturesState contextualLigaturesState) { m_contextualLigaturesState = contextualLigaturesState; updateTypesettingFeatures(); }
void setKeywordSize(unsigned s) { m_keywordSize = s; }
void setFontSmoothing(FontSmoothingMode smoothing) { m_fontSmoothing = smoothing; }
void setTextRendering(TextRenderingMode rendering) { m_textRendering = rendering; updateTypesettingFeatures(); }
« no previous file with comments | « Source/core/css/resolver/StyleBuilderCustom.cpp ('k') | Source/platform/fonts/FontDescription.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698