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

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: Comment fix and reverting to Old code 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
Index: Source/platform/fonts/FontDescription.h
diff --git a/Source/platform/fonts/FontDescription.h b/Source/platform/fonts/FontDescription.h
index 4a12367cdb11457652c846caa5cf31bacd3dea73..7b725fd478179fd61a5d77020e6b5b142f47c6a9 100644
--- a/Source/platform/fonts/FontDescription.h
+++ b/Source/platform/fonts/FontDescription.h
@@ -81,6 +81,7 @@ public:
, m_syntheticItalic(false)
, m_subpixelTextPosition(s_useSubpixelTextPositioning)
, m_typesettingFeatures(s_defaultTypesettingFeatures)
+ , m_locale(String("en"))
Inactive 2014/05/23 19:34:26 nit: unnecessary String().
h.joshi 2014/05/24 01:27:00 We need m_locale to have some default value else w
{
}
@@ -116,6 +117,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); }
+ String locale() const { return m_locale; }
Inactive 2014/05/23 19:34:26 nit: could return a const ref.
h.joshi 2014/05/24 01:27:00 Okey, will make changes. In previous comment "Not
bool isSyntheticBold() const { return m_syntheticBold; }
bool isSyntheticItalic() const { return m_syntheticItalic; }
bool useSubpixelPositioning() const { return m_subpixelTextPosition; }
@@ -154,6 +156,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; }
@@ -219,6 +222,7 @@ private:
static TypesettingFeatures s_defaultTypesettingFeatures;
static bool s_useSubpixelTextPositioning;
+ String m_locale;
Inactive 2014/05/23 19:34:26 Please move this up before the bitfield, preferabl
h.joshi 2014/05/24 01:27:00 Okey, it is now String object that was the reason
};
inline bool FontDescription::operator==(const FontDescription& other) const

Powered by Google App Engine
This is Rietveld 408576698