Bug 15571 - SVG text needs to support textLength/lengthAdjust properties & 'kerning'
Summary: SVG text needs to support textLength/lengthAdjust properties & 'kerning'
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nikolas Zimmermann
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-20 01:53 PDT by Nikolas Zimmermann
Modified: 2008-09-25 08:47 PDT (History)
0 users

See Also:


Attachments
Initial patch (31.25 KB, patch)
2007-10-20 02:05 PDT, Nikolas Zimmermann
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.