WebKit isn't getting the right metrics for SVG fonts because it is falling back on default metrics when reading correct SVG font definitions with those metrics supplied. Looking at SVGFontFaceElement::ascent() and SVGFontFaceElement::descent(), the code is attempting to query the 'font' element, when according to the specs here: http://www.w3.org/TR/SVG/fonts.html#FontElement http://www.w3.org/TR/SVG/fonts.html#FontFaceElement the 'ascent' and 'descent' attributes should be defined on the font-face element. This is using code checked out from SVN 2008/02/25.
Created attachment 19450 [details] test file that reproduces bugs # 17541 and 17608 visually.
Created attachment 19451 [details] Screenshot of 17541_17608.html being rendered by WebKit
int SVGFontFaceElement::ascent() const { // Spec: Same syntax and semantics as the 'ascent' descriptor within an @font-face rule. The maximum // unaccented height of the font within the font coordinate system. If the attribute is not specified, // the effect is as if the attribute were set to the difference between the units-per-em value and the // vert-origin-y value for the corresponding font. const AtomicString& ascentValue = fastGetAttribute(ascentAttr); if (!ascentValue.isEmpty()) return static_cast<int>(ceilf(ascentValue.toFloat())); .. This is long resolved in trunk, this bug was forgotten.