Fix the Java front end's vertical text positioning when
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 22 Feb 2009 12:02:40 +0000 (12:02 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 22 Feb 2009 12:02:40 +0000 (12:02 +0000)
ALIGN_VNORMAL is in use: ALIGN_VNORMAL indicates that the supplied
y-coordinate denotes the _baseline_ of the text, not its top, so
adding on 'asc' to convert to the baseline is wrong.

This only affects Tents, at present.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@8452 cda61777-01e9-0310-a592-d414129be87e

PuzzleApplet.java

index 23eda81..f401ecf 100644 (file)
@@ -382,8 +382,6 @@ public class PuzzleApplet extends JApplet implements Runtime.CallJavaCB {
                     int asc = fm.getAscent(), desc = fm.getDescent();
                     if ((xarg3 & ALIGN_VCENTRE) != 0)
                         xarg2 += asc - (asc+desc)/2;
-                    else
-                        xarg2 += asc;
                     int wid = fm.stringWidth(text);
                     if ((xarg3 & ALIGN_HCENTRE) != 0)
                         xarg1 -= wid / 2;