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

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

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/platform/graphics/Font.h ('k') | Source/core/rendering/style/RenderStyle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/graphics/Font.cpp
diff --git a/Source/core/platform/graphics/Font.cpp b/Source/core/platform/graphics/Font.cpp
index 4d610de1a0b08d8fd66710d57ead6e32a703636b..f948c7e8c9de9c02fc4e0ea40e31a48f61e23e9a 100644
--- a/Source/core/platform/graphics/Font.cpp
+++ b/Source/core/platform/graphics/Font.cpp
@@ -76,7 +76,7 @@ Font::Font()
{
}
-Font::Font(const FontDescription& fd, short letterSpacing, short wordSpacing)
+Font::Font(const FontDescription& fd, float letterSpacing, float wordSpacing)
: m_fontDescription(fd)
, m_letterSpacing(letterSpacing)
, m_wordSpacing(wordSpacing)
@@ -201,7 +201,7 @@ float Font::width(const TextRun& run, HashSet<const SimpleFontData*>* fallbackFo
}
bool hasKerningOrLigatures = typesettingFeatures() & (Kerning | Ligatures);
- bool hasWordSpacingOrLetterSpacing = wordSpacing() | letterSpacing();
+ bool hasWordSpacingOrLetterSpacing = wordSpacing() || letterSpacing();
float* cacheEntry = m_fontFallbackList->widthCache().add(run, std::numeric_limits<float>::quiet_NaN(), hasKerningOrLigatures, hasWordSpacingOrLetterSpacing, glyphOverflow);
if (cacheEntry && !std::isnan(*cacheEntry))
return *cacheEntry;
« no previous file with comments | « Source/core/platform/graphics/Font.h ('k') | Source/core/rendering/style/RenderStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698