summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/bytecode/SamplingTool.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2013-09-27 14:45:02 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-01 19:37:11 +0200
commit2c4ff38a22a2d6d13ab4a833082cc76f65af3b4f (patch)
treefd45094b1832e2210c35a4b9beaa1455778fba4c /Source/JavaScriptCore/bytecode/SamplingTool.cpp
parente4dcbab26b8b25df40b7d8937ac1306f4e19c84e (diff)
downloadqtwebkit-2c4ff38a22a2d6d13ab4a833082cc76f65af3b4f.tar.gz
Support kerning with SVG web fonts
https://bugs.webkit.org/show_bug.cgi?id=117540 Reviewed by Stephen Chenney. Adds the glue to WidthIterator to take advantage of kerning in SVG web fonts. To supply SVG font kerning with its required text input, the signature of applyFontTransforms has been extended. Since SVG font kerning was extremely slow, it has been sped up by replacing the iteration over all possible kerning definitions with a hash-map based lookup of the leading symbol to be kerned. The new algorithm provides a roughly 100x speed-up in SVG font kerning. Test: fast/text/svg-font-face-with-kerning.html * platform/graphics/TextRun.h: (WebCore::TextRun::string): * platform/graphics/WidthIterator.cpp: (WebCore::applyFontTransforms): (WebCore::WidthIterator::advanceInternal): * rendering/svg/SVGTextRunRenderingContext.cpp: (WebCore::SVGTextRunRenderingContext::applySVGKerning): * rendering/svg/SVGTextRunRenderingContext.h: * svg/SVGFontElement.cpp: (WebCore::SVGFontElement::invalidateGlyphCache): (WebCore::SVGFontElement::ensureGlyphCache): (WebCore::SVGKerningMap::clear): (WebCore::SVGKerningMap::insert): (WebCore::stringMatchesUnicodeRange): (WebCore::stringMatchesGlyphName): (WebCore::stringMatchesUnicodeName): (WebCore::matches): (WebCore::kerningForPairOfStringsAndGlyphs): (WebCore::SVGFontElement::horizontalKerningForPairOfStringsAndGlyphs): (WebCore::SVGFontElement::verticalKerningForPairOfStringsAndGlyphs): * svg/SVGFontElement.h: (WebCore::SVGKerning::SVGKerning): (WebCore::SVGKerningMap::isEmpty): * svg/SVGHKernElement.cpp: (WebCore::SVGHKernElement::buildHorizontalKerningPair): * svg/SVGHKernElement.h: * svg/SVGVKernElement.cpp: (WebCore::SVGVKernElement::buildVerticalKerningPair): * svg/SVGVKernElement.h: Change-Id: I309d05b57df3a85fa9720e56f4ace53d5d1d8cf5 git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156393 268f45cc-cd09-0410-ab3c-d52691b4dbfc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source/JavaScriptCore/bytecode/SamplingTool.cpp')
0 files changed, 0 insertions, 0 deletions