Re: [NTG-context] SVG text alignment issue

2022-06-29 Thread Thangalin via ntg-context
Here's the formal rule: https://www.w3.org/TR/SVG11/coords.html#TransformAttribute rotate( [ ]), which specifies a rotation by degrees about a given point. If optional parameters and are not supplied, the rotation is about the origin of the current user coordinate system. The operation corresp

Re: [NTG-context] SVG text alignment issue

2022-06-29 Thread Hans Hagen via ntg-context
On 6/29/2022 8:48 PM, Thangalin wrote: To me, it looks like the text, after a rotational transform, is being written to the baseline rather than (cap height + descender height) / 2, which seems to be a MetaPost conversion issue? There's another, possibly related issue, which I'll provide in a

Re: [NTG-context] SVG text alignment issue

2022-06-29 Thread Thangalin via ntg-context
Thanks for checking this. Unfortunately, introducing \hbox didn't work; the text is still off-center with respect to the vertical line: https://i.ibb.co/hYGfdgZ/text-align.png For comparison, the SVG file loaded into Inkscape appears similar to: https://i.ibb.co/KF3PBkw/inkscape-alignment.png N

Re: [NTG-context] SVG text alignment issue

2022-06-29 Thread Hans Hagen via ntg-context
On 6/29/2022 4:35 AM, Aditya Mahajan via ntg-context wrote: On Mon, 27 Jun 2022, Thangalin via ntg-context wrote: In the following example, the line and text should be aligned to the middle when LMTX converts the SVG figure using MP. (Note that you may have to install Roboto, but the font isn'

Re: [NTG-context] SVG text alignment issue

2022-06-28 Thread Thangalin via ntg-context
Thanks Aditya, I tried your suggestion, but the result is the same. Here's the XML setup for all images in the document: \startxmlsetups xml:img \starttexcode \placefloat[here,force]{}{% \hbox{\externalfigure[\xmlatt{#1}{src}][conversion=mp]} } \stoptexcode \stopxmlsetups Here'

Re: [NTG-context] SVG text alignment issue

2022-06-28 Thread Aditya Mahajan via ntg-context
On Mon, 27 Jun 2022, Thangalin via ntg-context wrote: > In the following example, the line and text should be aligned to the > middle when LMTX converts the SVG figure using MP. (Note that you may have > to install Roboto, but the font isn't the issue.) > > % SOF > \startbuffer[svg] > width=

[NTG-context] SVG text alignment issue

2022-06-27 Thread Thangalin via ntg-context
In the following example, the line and text should be aligned to the middle when LMTX converts the SVG figure using MP. (Note that you may have to install Roboto, but the font isn't the issue.) % SOF \startbuffer[svg] http://www.w3.org/2000/svg"; xmlns:svg="http://www.w3.org/2000/svg";> 1