<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.element-name
        {mso-style-name:element-name;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>Darren:<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Send me the SVG off list and I will take a look. It is unclear to me that just because Chrome shows it the way they do, that is correct. The definition of <tspan> says:<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>“</span>Within a <a href="http://www.w3.org/TR/SVG/text.html#TextElement"><span class=element-name>‘text’</span></a> element, text and font properties and the <a href="http://www.w3.org/TR/SVG/text.html#CurrentTextPosition">current text position</a> can be adjusted with absolute or relative coordinate values by including a <span class=element-name>‘tspan’</span> element.”<o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>In my opinion, the “position” at the end location of that text string is 16px of blank space (your font-height) but I could be mistaken. <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Kevin Brown<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><a href="mailto:kevin@renderx.com">kevin@renderx.com</a><o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> xep-support-bounces@renderx.com [mailto:xep-support-bounces@renderx.com] <b>On Behalf Of </b>Darren Munt<br><b>Sent:</b> Tuesday, March 12, 2013 6:07 PM<br><b>To:</b> xep-support@renderx.com<br><b>Subject:</b> [xep-support] dy attribute in tspan ignored when text-anchor != start<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-AU>I tried with this one already but got no reply, perhaps because I included a screenshot of the issue. I’ll try again with text only.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-AU>When a tspan element has the text-anchor attribute set to anything other than ‘start’, the dy attribute appears to be ignored. I am trying to align text within a grid and I have left- and right-aligned labels which must appear on the same y coordinate.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-AU>In order to support web browsers and RenderX from the same code, and because they all use different baselines for text, I am using the dy attribute to apply an offset from the y coordinate of the enclosing text element. This allows all text to be positioned with a common set of coordinates, making allowances for different implementations of SVG. However the issue I am having is that RenderX appears to ignore the dy attribute for tspan elements that are within text elements with a text-anchor attribute set to ‘end’ or ‘center’.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-AU>The upshot is that using the same bit of code to set up a tspan element, I get different y alignment when text-anchor is not ‘start’. For example:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p> </o:p></span></p><p class=MsoNormal style='text-indent:.5in'><span lang=EN-AU><text x="24" y="28" text-anchor="start" stroke="none" stroke-width="0" fill="#5c477a" font-size="16px" font-weight="bold"><o:p></o:p></span></p><p class=MsoNormal style='text-indent:.5in;margin-left:36..0pt'><span lang=EN-AU><tspan dy="16">Change Agent</tspan><o:p></o:p></span></p><p class=MsoNormal style='text-indent:.5in'><span lang=EN-AU></text><o:p></o:p></span></p><p class=MsoNormal style='text-indent:.5in'><span lang=EN-AU><text x="316" y="28" text-anchor="end" stroke="none" stroke-width="0" fill="#5c477a" font-size="16px" font-weight="bold"><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-indent:.5in'><span lang=EN-AU><tspan dy="16">Transformer</tspan><o:p></o:p></span></p><p class=MsoNormal style='text-indent:.5in'><span lang=EN-AU></text><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-AU>According to my understanding, the above should produce two blocks of text which are aligned horizontally on the page. However in RenderX, the second line is 16 pixels (or the equivalent metric in the PDF) higher.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-AU>The same code in Google Chrome produces text that is horizontally aligned as expected..<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-AU>Can you advise if this issue will be resolved, or will I need to build in a workaround?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-AU style='font-size:12.0pt;font-family:"Times New Roman","serif"'>!DSPAM:87,513fd1ef9851322784897! <o:p></o:p></span></p></div></body></html>