octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #43827] print svg with incorrect font baseline


From: Andreas Weber
Subject: [Octave-bug-tracker] [bug #43827] print svg with incorrect font baseline
Date: Fri, 02 Jan 2015 13:37:38 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.3.0

Follow-up Comment #6, bug #43827 (project octave):

consider the following Octave code:


## verticalalignment middle is default
text (0.2, 0.5, "Z middle");
text (0.5, 0.5, "Z bottom", "verticalalignment", "bottom")
text (0.8, 0.5, "Z top", "verticalalignment", "top")

line([0 1], [0.5 0.5])
axis off
print out.svg


which produces following SVG (snipped header and footer)


<text fill="#000000" x="164.16" y="226.58" font-size="10" text-anchor="start"
baseline-shift="-5" font-family="Helvetica">Z middle</text>
<text fill="#000000" x="298.08" y="226.58" font-size="10" text-anchor="start"
baseline-shift="0" font-family="Helvetica">Z bottom</text>
<text fill="#000000" x="432" y="226.58" font-size="10" text-anchor="start"
baseline-shift="-10" font-family="Helvetica">Z top</text>
<polyline fill="none" stroke="#000000" stroke-width="0.5" points="74.88,226.58
521.28,226.58"/>


As you can see the y position of the line and the text are always the same and
"baseline-shift = font-size/2" is used to vertically center the text, 0 for
bottom and font-size for top.

I also attach the exported PNG from inkscape. I still can't see an error in
Octave, gl2ps and Inkscape

(file #32748)
    _______________________________________________________

Additional Item Attachment:

File name: out.png                        Size:3 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?43827>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]