SVG Font kerning can take an early out if the font has no kerning information
[WebKit-https.git] / Source / WebCore / rendering / svg / SVGTextRunRenderingContext.cpp
index 61773863c7cf4332e2d439c11dfa9e77fdb7d874..e928f1b6a8d857737fe47ed607bd5dd6776f5904 100644 (file)
@@ -72,6 +72,9 @@ bool SVGTextRunRenderingContext::applySVGKerning(const SimpleFontData* fontData,
     if (!fontElement || !fontFaceElement)
         return false;
 
+    if (fontElement->horizontalKerningMapIsEmpty())
+        return true;
+
     float scale = scaleEmToUnits(fontData->platformData().size(), fontFaceElement->unitsPerEm());
 
     String lastGlyphName;