Skip to content

Commit

Permalink
Merge ef6a79e into d6ed4e0
Browse files Browse the repository at this point in the history
  • Loading branch information
krcook committed May 17, 2020
2 parents d6ed4e0 + ef6a79e commit 65897ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gizeh/gizeh.py
Expand Up @@ -580,7 +580,7 @@ def draw(ctx):
ctx.set_font_size(fontsize)
xbear, ybear, w, h, xadvance, yadvance = ctx.text_extents(txt)
xshift = {"left": 0, "center": -w / 2, "right": -w}[h_align] - xbear
yshift = {"bottom": 0, "center": -h / 2, "top": -h}[v_align] - ybear
yshift = {"top": 0, "center": -h / 2, "bottom": -h}[v_align] - ybear
new_xy = np.array(xy) + np.array([xshift, yshift])
ctx.move_to(*new_xy)
ctx.text_path(txt)
Expand Down

0 comments on commit 65897ea

Please sign in to comment.