← All bug reports

FS#191SVG PG export text vertical and horizontal alignment

Type
Bug
Status
Closed
Resolution
Fixed
Category
QCAD (main)
Severity
Low
Priority
Low
Reported version
Development
Operating system
All
Reported
2011-08-26 by hungerburg
Closed
2011-09-13 by andrew

QCAD offers horizontal and vertical alignment choices for text. This is not carried over to PG exported SVGs. Currently QCAD sets the "dy" attribute on text nodes in a way, such that any text in SVG will look like the QCAD vertical alignment was set to "Top" and the horizontal one to "Left".

Naively one can just omit the "dy" attribute and in SVG this will look like the QCAD vertical alignment was set to "bottom". At least for single line texts that should be good.

The horizontal alignments can be recreated in SVG with the "text-anchor" attribute for text nodes. The values "start", "middle" and "end" correspond to the QCAD "left", "center" and "right" choices.

Closure comment

r18996