Greetings All,
I am using pango_layout_get_size to get the width
of some text I have layed out (i.e. text, font and font size) this gives me back
(according to the docs) the "logical width." of the text.
What I want to do is convert this to x coordinates
that would then work with SVG markup. I believe that SVG xy coordinates a
fairly similar to html, so I just thought somebody might have thought about this
before.
For example if I had::
<g><text x="2639.1" y="3865.21"
fill="#CF352D" font-weight="normal" font-size="1467" font-family="Aachen
BT">SPORTS CLUB
NAME</text></g>
And I called pango to get the "logic width" of the
text I get 8250. I want to adjust the x attribute by half of the "x-width"
of the text, but obviously 4125 is too large, but something like half of this
would be close. Unfortunately I need it to be exact.
Any suggestions are greatly appreciated
:-)
Z.
|