summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/Font.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/graphics/Font.cpp')
-rw-r--r--WebCore/platform/graphics/Font.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/WebCore/platform/graphics/Font.cpp b/WebCore/platform/graphics/Font.cpp
index 7d0e5a9..7bdefba 100644
--- a/WebCore/platform/graphics/Font.cpp
+++ b/WebCore/platform/graphics/Font.cpp
@@ -182,7 +182,7 @@ void Font::drawText(GraphicsContext* context, const TextRun& run, const FloatPoi
return drawComplexText(context, run, point, from, to);
}
-float Font::floatWidth(const TextRun& run, HashSet<const SimpleFontData*>* fallbackFonts) const
+float Font::floatWidth(const TextRun& run, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow) const
{
#if ENABLE(SVG_FONTS)
if (primaryFont()->isSVGFont())
@@ -198,7 +198,7 @@ float Font::floatWidth(const TextRun& run, HashSet<const SimpleFontData*>* fallb
}
#endif
- return floatWidthForComplexText(run, fallbackFonts);
+ return floatWidthForComplexText(run, fallbackFonts, glyphOverflow);
}
float Font::floatWidth(const TextRun& run, int extraCharsAvailable, int& charsConsumed, String& glyphName) const
@@ -267,12 +267,13 @@ FontSelector* Font::fontSelector() const
String Font::normalizeSpaces(const String& string)
{
+ const UChar* characters = string.characters();
unsigned length = string.length();
Vector<UChar, 256> buffer(length);
bool didReplacement = false;
for (unsigned i = 0; i < length; ++i) {
- UChar originalCharacter = string[i];
+ UChar originalCharacter = characters[i];
buffer[i] = normalizeSpaces(originalCharacter);
if (buffer[i] != originalCharacter)
didReplacement = true;