Index: Source/platform/fonts/shaping/SimpleShaper.cpp |
diff --git a/Source/platform/fonts/shaping/SimpleShaper.cpp b/Source/platform/fonts/shaping/SimpleShaper.cpp |
index 4c18b3a7c158248c407792eb91f0aefd1ff312c6..1aa396453f5d943ec1e5b26d767095c1d448a11f 100644 |
--- a/Source/platform/fonts/shaping/SimpleShaper.cpp |
+++ b/Source/platform/fonts/shaping/SimpleShaper.cpp |
@@ -30,6 +30,7 @@ |
#include "platform/fonts/SimpleFontData.h" |
#include "platform/text/SurrogatePairAwareTextIterator.h" |
#include "wtf/MathExtras.h" |
+#include "wtf/unicode/CharacterNames.h" |
using namespace WTF; |
using namespace Unicode; |
@@ -77,7 +78,7 @@ float SimpleShaper::characterWidth(UChar32 character, const GlyphData& glyphData |
const SimpleFontData* fontData = glyphData.fontData; |
ASSERT(fontData); |
- if (UNLIKELY(character == '\t' && m_run.allowTabs())) |
+ if (UNLIKELY(character == characterTabulation && m_run.allowTabs())) |
return m_font->tabWidth(*fontData, m_run.tabSize(), m_run.xPos() + m_runWidthSoFar); |
float width = fontData->widthForGlyph(glyphData.glyph); |
@@ -126,7 +127,7 @@ float SimpleShaper::adjustSpacing(float width, const CharacterData& charData) |
// Account for word spacing. |
// We apply additional space between "words" by adding width to the space character. |
- if (isExpansionOpportunity && (charData.character != '\t' || !m_run.allowTabs()) |
+ if (isExpansionOpportunity && (charData.character != characterTabulation || !m_run.allowTabs()) |
&& (charData.characterOffset || charData.character == noBreakSpace) |
&& m_font->fontDescription().wordSpacing()) { |
width += m_font->fontDescription().wordSpacing(); |