Bug 15571

Summary: SVG text needs to support textLength/lengthAdjust properties & 'kerning'
Product: WebKit Reporter: Nikolas Zimmermann <zimmermann>
Component: SVGAssignee: Nikolas Zimmermann <zimmermann>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
Initial patch oliver: review+

Description Nikolas Zimmermann 2007-10-20 01:53:39 PDT
Advanced SVG text support defines a way to expand/contract text (normal text as well as textPath) based on the textLength property. lengthAdjust="spacing" and ie. textLength="200" forces the text to be exactly 200px wide, while this is achieved through the letter-spacing modification. For lengthAdjust="spacingAndGlyphs" the whole set of glyphs is expanded/contracted.

This requires that our SVG text implementation handles letter & word spacing, as well as 'kerning' before - so our absolute positioned SVG glyphs take the spacing into account at layout time, instead of paint time (basically SVG needs to disable spacing functionality of platform/Font.cpp) to be able to properly take into account spacing when implementing lengthAdjust.
Comment 1 Nikolas Zimmermann 2007-10-20 02:05:47 PDT
Created attachment 16741 [details]
Initial patch

Support all textLength/lengthAdjust combinations on normal text & textPaths.
Comment 2 Nikolas Zimmermann 2007-10-20 03:48:20 PDT
Landed in r26819.