From: Marius Gedminas <marius@gedmin.as>
| ... | ... |
@@ -129,6 +129,8 @@ class TextShape(Shape): |
| 129 | 129 |
width = float(width)/pango.SCALE |
| 130 | 130 |
height = float(height)/pango.SCALE |
| 131 | 131 |
|
| 132 |
+ descent = 2 # XXX get descender from font metrics |
|
| 133 |
+ |
|
| 132 | 134 |
cr.move_to(self.x - self.w/2, self.y) |
| 133 | 135 |
|
| 134 | 136 |
if self.j == self.LEFT: |
| ... | ... |
@@ -140,7 +142,7 @@ class TextShape(Shape): |
| 140 | 142 |
else: |
| 141 | 143 |
assert 0 |
| 142 | 144 |
|
| 143 |
- y = self.y - height |
|
| 145 |
+ y = self.y - height + descent |
|
| 144 | 146 |
|
| 145 | 147 |
cr.move_to(x, y) |
| 146 | 148 |
|