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

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

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/platform/fonts/FontDescription.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/FontDescription.cpp
diff --git a/Source/platform/fonts/FontDescription.cpp b/Source/platform/fonts/FontDescription.cpp
index d5fad42b525a26d057f6288d25ea6649b66da1a9..829d815d24a66b92979278a8484d180831b93b64 100644
--- a/Source/platform/fonts/FontDescription.cpp
+++ b/Source/platform/fonts/FontDescription.cpp
@@ -101,6 +101,18 @@ FontTraits FontDescription::traits() const
return FontTraits(style(), variant(), weight(), stretch());
}
+FontDescription::VariantLigatures FontDescription::variantLigatures() const
+{
+ VariantLigatures ligatures;
+
+ ligatures.common = commonLigaturesState();
+ ligatures.discretionary = discretionaryLigaturesState();
+ ligatures.historical = historicalLigaturesState();
+ ligatures.contextual = contextualLigaturesState();
+
+ return ligatures;
+}
+
void FontDescription::setTraits(FontTraits traits)
{
setStyle(traits.style());
@@ -109,6 +121,16 @@ void FontDescription::setTraits(FontTraits traits)
setStretch(traits.stretch());
}
+void FontDescription::setVariantLigatures(const VariantLigatures& ligatures)
+{
+ m_commonLigaturesState = ligatures.common;
+ m_discretionaryLigaturesState = ligatures.discretionary;
+ m_historicalLigaturesState = ligatures.historical;
+ m_contextualLigaturesState = ligatures.contextual;
+
+ updateTypesettingFeatures();
+}
+
FontDescription FontDescription::makeNormalFeatureSettings() const
{
FontDescription normalDescription(*this);
« no previous file with comments | « Source/platform/fonts/FontDescription.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698