- From: David Storey via GitHub <sysbot+gh@w3.org>
- Date: Sat, 05 May 2018 00:37:00 +0000
- To: public-svg-issues@w3.org
dstorey has just labeled an issue for https://github.com/w3c/svgwg as "Proposal": == Compatibility mid-line rendering attribute to textPath == Specification: SVG 2, Text chapter, 11.8.3. Text on a path layout rules https://svgwg.org/svg2-draft/text.html#GlyphMidline And following list item. Excerpt: > Determine the glyph-midline, which is the vertical line in the glyph's coordinate system that goes through the glyph's x-axis midpoint. (In the picture above, the glyph-midline is shown as a dashed line.) > > Position the glyph such that the glyph-midline passes through the midpoint-on-the-path and is perpendicular to the line through the startpoint-on-the-path and the endpoint-on-the-path. This wording is different from how Chrome, Firefox, Opera etc render text on a path. Only Edge seems to actually implement this. I'm implementing and improving the svg spec conformance of react-native-svg, and have implemented both algorithms almost completely (extending the path for the start to end-point calculation, when midpoint is on the path but either start or end is not, is still missing). https://github.com/react-native-community/react-native-svg/pull/406 I suggest adding a compatibility 'mid-line' attribute for the 'textPath' element, with the values 'sharp | smooth', initial value 'smooth'. The initial value would be the strict interpretation of the spec, and sharp would be the one currently implemented in the wild. ``` Name mid-line Value sharp | smooth initial value smooth Animatable yes ``` The current common behavior is that it doesn't e.g., bend text smoothly along a right angle curve, (like Edge does) but keeps the mid-line orthogonal to the mid-point tangent at all times instead. I've already added this attribute to react-native-svg in my fork: https://github.com/msand/react-native-svg/commit/d08103168a4ee78c163f2614e5f3e8e7cede6b9d Example screenshot: (Smooth on top, sharp below)  See https://github.com/w3c/svgwg/issues/337
Received on Saturday, 5 May 2018 00:37:05 UTC