From de4f44fd40ff4ed51d9fdcaa3bc54d3c3096ad9b Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Tue, 12 Mar 2024 03:04:10 +0100 Subject: [PATCH] create_ps() will also use the temporary X connection for better font metrics if possible --- src/psprint.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/psprint.c b/src/psprint.c index 56a2bf90..db8d950f 100644 --- a/src/psprint.c +++ b/src/psprint.c @@ -679,17 +679,8 @@ static void ps_draw_string(int layer, const char *str, short rot, short flip, in ascent = size*xctx->mooz * 0.808; /* was 0.908 */ descent = size*xctx->mooz * 0.219; /* was 0.219 */ - #if HAS_CAIRO==1 - if(!has_x) - text_bbox_nocairo(str, xscale, yscale, rot, flip, hcenter, vcenter, - x,y, &textx1,&texty1,&textx2,&texty2, &no_of_lines, &longest_line); - else - text_bbox(str, xscale, yscale, rot, flip, hcenter, vcenter, - x,y, &textx1,&texty1,&textx2,&texty2, &no_of_lines, &longest_line); - #else - text_bbox(str, xscale, yscale, rot, flip, hcenter, vcenter, - x,y, &textx1,&texty1,&textx2,&texty2, &no_of_lines, &longest_line); - #endif + text_bbox(str, xscale, yscale, rot, flip, hcenter, vcenter, + x,y, &textx1,&texty1,&textx2,&texty2, &no_of_lines, &longest_line); if(!textclip(xctx->areax1,xctx->areay1,xctx->areax2, xctx->areay2,textx1,texty1,textx2,texty2)) {