Dear All, when rendering a single middle aligned character on path with startOffset=0% it may not render if the center of the glyph (= font design) is shifted slightly to the left. In this case the final path position is negative hence the related path coordinates cannot be found and that character is suppressed.
This logic can be found in org.apache.batik.bridge.GlyphLayout.doPathLayout() I am not sure if this is the correct behaviour as same case is rendered correctly in all major browsers. I'd rather expect retrieving the coordinates for the startOffset without glyph position correction and applying that shift after rotating and placing the text box along the path. It can be tested with this example: <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 600 600"> <g transform="translate(300, 300)"> <path id="textPath" d="M0 0 h100" stroke="red"/> <text><textPath xlink:href="#textPath" startOffset="0.0%" text-anchor="middle" font-size="60px">8</textPath></text> </g> </svg> SVG 1.1 spec is IMHO vague at this point. https://www.w3.org/TR/SVG/text.html#TextPathElement Is the current behaviour bug or feature? Thanks, Jan --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
