From e5f3096ce914c7bebf5d11136a0ba8746630ca90 Mon Sep 17 00:00:00 2001 From: Daniel Kaiser Date: Fri, 23 Sep 2022 12:37:25 +0200 Subject: [PATCH] pgfplugin: fix text alignment for font precision 0 --- lib/gks/plugin/pgfplugin.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/gks/plugin/pgfplugin.c b/lib/gks/plugin/pgfplugin.c index 3a51c8c2d..56c8e913a 100644 --- a/lib/gks/plugin/pgfplugin.c +++ b/lib/gks/plugin/pgfplugin.c @@ -643,14 +643,14 @@ static void text_routine(double x, double y, int nchars, char *chars) pgf_printf(p->stream, "\\begin{scope}[yscale=-1,yshift=-%f]\n" - "\\draw[mycolor, opacity=%f] (%f,%f) node[align=", + "\\draw[mycolor, opacity=%f] (%f,%f) node[anchor=", (ystart * 2), p->transparency, xstart, ystart); if (gkss->txal[0] == GKS_K_TEXT_HALIGN_RIGHT) - pgf_printf(p->stream, "right"); + pgf_printf(p->stream, "south east"); else if (gkss->txal[0] == GKS_K_TEXT_HALIGN_LEFT) - pgf_printf(p->stream, "left"); + pgf_printf(p->stream, "south west"); else - pgf_printf(p->stream, "center"); + pgf_printf(p->stream, "south"); if (p->angle != 0) pgf_printf(p->stream, ", rotate=%f", p->angle);