create_ps() will also use the temporary X connection for better font metrics if possible

This commit is contained in:
stefan schippers 2024-03-12 03:04:10 +01:00
parent 65ba2e1cc4
commit de4f44fd40
1 changed files with 2 additions and 11 deletions

View File

@ -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)) {