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

Unified Diff: Source/core/platform/graphics/Font.h

Issue 18332019: Allow fractional letter- word-spacing values. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: *actually* add the file Created 7 years, 5 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/page/animation/CSSPropertyAnimation.cpp ('k') | Source/core/platform/graphics/Font.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/graphics/Font.h
diff --git a/Source/core/platform/graphics/Font.h b/Source/core/platform/graphics/Font.h
index 1261b64e868999b625ea40319b9cbc64ae65ad82..0d990bf245f2148170bd49b5b652c94277ec96b2 100644
--- a/Source/core/platform/graphics/Font.h
+++ b/Source/core/platform/graphics/Font.h
@@ -79,7 +79,7 @@ struct GlyphOverflow {
class Font {
public:
Font();
- Font(const FontDescription&, short letterSpacing, short wordSpacing);
+ Font(const FontDescription&, float letterSpacing, float wordSpacing);
// This constructor is only used if the platform wants to start with a native font.
Font(const FontPlatformData&, bool isPrinting, FontSmoothingMode = AutoSmoothing);
~Font();
@@ -113,10 +113,10 @@ public:
bool isSmallCaps() const { return m_fontDescription.smallCaps(); }
- short wordSpacing() const { return m_wordSpacing; }
- short letterSpacing() const { return m_letterSpacing; }
- void setWordSpacing(short s) { m_wordSpacing = s; }
- void setLetterSpacing(short s) { m_letterSpacing = s; }
+ float wordSpacing() const { return m_wordSpacing; }
+ float letterSpacing() const { return m_letterSpacing; }
+ void setWordSpacing(float s) { m_wordSpacing = s; }
+ void setLetterSpacing(float s) { m_letterSpacing = s; }
bool isFixedPitch() const;
bool isPrinterFont() const { return m_fontDescription.usePrinterFont(); }
@@ -289,8 +289,8 @@ private:
FontDescription m_fontDescription;
mutable RefPtr<FontFallbackList> m_fontFallbackList;
- short m_letterSpacing;
- short m_wordSpacing;
+ float m_letterSpacing;
+ float m_wordSpacing;
bool m_isPlatformFont;
bool m_needsTranscoding;
mutable TypesettingFeatures m_typesettingFeatures; // Caches values computed from m_fontDescription.
« no previous file with comments | « Source/core/page/animation/CSSPropertyAnimation.cpp ('k') | Source/core/platform/graphics/Font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698