Index: Source/platform/fonts/FontDescription.h |
diff --git a/Source/platform/fonts/FontDescription.h b/Source/platform/fonts/FontDescription.h |
index 4a12367cdb11457652c846caa5cf31bacd3dea73..720df79bc98c8ff88563e015706ec77a8ee61a81 100644 |
--- a/Source/platform/fonts/FontDescription.h |
+++ b/Source/platform/fonts/FontDescription.h |
@@ -26,6 +26,7 @@ |
#define FontDescription_h |
#include "FontFamilyNames.h" |
+#include "hb.h" |
#include "platform/fonts/FontCacheKey.h" |
#include "platform/fonts/FontFamily.h" |
#include "platform/fonts/FontFeatureSettings.h" |
@@ -81,6 +82,7 @@ public: |
, m_syntheticItalic(false) |
, m_subpixelTextPosition(s_useSubpixelTextPositioning) |
, m_typesettingFeatures(s_defaultTypesettingFeatures) |
+ , m_locale(hb_language_get_default()) |
{ |
} |
@@ -116,6 +118,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 hb_language_t locale() const { return m_locale; } |
Inactive
2014/05/22 13:52:02
Not sure this needs to return a const.
|
bool isSyntheticBold() const { return m_syntheticBold; } |
bool isSyntheticItalic() const { return m_syntheticItalic; } |
bool useSubpixelPositioning() const { return m_subpixelTextPosition; } |
@@ -154,6 +157,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(String localeStr) { m_locale = hb_language_from_string((const char*)(static_cast<const LChar *>(localeStr.characters8())), localeStr.length()); } |
Inactive
2014/05/22 13:52:02
- Please pass the String argument by const referen
|
void setSyntheticBold(bool syntheticBold) { m_syntheticBold = syntheticBold; } |
void setSyntheticItalic(bool syntheticItalic) { m_syntheticItalic = syntheticItalic; } |
void setFeatureSettings(PassRefPtr<FontFeatureSettings> settings) { m_featureSettings = settings; } |
@@ -219,6 +223,7 @@ private: |
static TypesettingFeatures s_defaultTypesettingFeatures; |
static bool s_useSubpixelTextPositioning; |
+ hb_language_t m_locale; |
Inactive
2014/05/22 13:52:02
It looks like hb_language_t is a typedef to a poin
|
}; |
inline bool FontDescription::operator==(const FontDescription& other) const |