# [NTG-context] SVG text alignment issue

Thangalin thangalin at gmail.com
Wed Jun 29 06:55:26 CEST 2022

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's the Markdown source document:

![](dna-02)

The source document is automatically exported as XHTML:

<p>
<img alt="" src="/path/to/images/dna-02.svg"/>
</p>

The XHTML is then passed to ConTeXt, whereupon the XML setup for images is
applied. The result is the same: the alignment for the text is off. Here's
an example where you can see the issue on the 16q24.3 text (far right):

https://i.ibb.co/WGh03Sr/genes.png

When the same SVG file is rendered using Apache Batik, the white text is
aligned to the middle of the black box.

Are there aAny other work-arounds?

Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20220628/8a4b765b/attachment.htm>