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

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

Issue 276573010: Adding Locale (language attribute) information to font and using the (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updating Test Expectation file due to recent commits Created 6 years, 7 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/FontBuilder.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 528479e88cbc27a0c9172f43ab7e48d7acefec02..2be16aef50ec8e992db4abd873d92c4393d603d3 100644
--- a/Source/platform/fonts/FontDescription.h
+++ b/Source/platform/fonts/FontDescription.h
@@ -54,7 +54,8 @@ public:
enum LigaturesState { NormalLigaturesState, DisabledLigaturesState, EnabledLigaturesState };
FontDescription()
- : m_specifiedSize(0)
+ : m_locale("en")
+ , m_specifiedSize(0)
, m_computedSize(0)
, m_letterSpacing(0)
, m_wordSpacing(0)
@@ -111,6 +112,7 @@ public:
FontSmoothingMode fontSmoothing() const { return static_cast<FontSmoothingMode>(m_fontSmoothing); }
TextRenderingMode textRendering() const { return static_cast<TextRenderingMode>(m_textRendering); }
UScriptCode script() const { return static_cast<UScriptCode>(m_script); }
+ const String& locale() const { return m_locale; }
bool isSyntheticBold() const { return m_syntheticBold; }
bool isSyntheticItalic() const { return m_syntheticItalic; }
bool useSubpixelPositioning() const { return m_subpixelTextPosition; }
@@ -148,6 +150,7 @@ public:
void setNonCJKGlyphOrientation(NonCJKGlyphOrientation orientation) { m_nonCJKGlyphOrientation = orientation; }
void setWidthVariant(FontWidthVariant widthVariant) { m_widthVariant = widthVariant; }
void setScript(UScriptCode s) { m_script = s; }
+ void setLocale(const String& locale) { m_locale = locale; }
void setSyntheticBold(bool syntheticBold) { m_syntheticBold = syntheticBold; }
void setSyntheticItalic(bool syntheticItalic) { m_syntheticItalic = syntheticItalic; }
void setFeatureSettings(PassRefPtr<FontFeatureSettings> settings) { m_featureSettings = settings; }
@@ -166,6 +169,7 @@ public:
private:
FontFamily m_familyList; // The list of font families to be used.
RefPtr<FontFeatureSettings> m_featureSettings;
+ String m_locale;
void updateTypesettingFeatures() const;
« no previous file with comments | « Source/core/css/resolver/FontBuilder.cpp ('k') | Source/platform/fonts/FontDescription.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698