emf/eps: fix previous gws_left/right_fudge hack

This commit is contained in:
gitlost 2023-12-15 18:52:41 +00:00
parent 40a4bb9da0
commit c9f0e61d78
17 changed files with 296 additions and 81 deletions

View file

@ -485,9 +485,11 @@ INTERNAL int ps_plot(struct zint_symbol *symbol) {
}
/* Unhack the guard whitespace `gws_left_fudge`/`gws_right_fudge` hack */
if (upcean && string->halign == 1 && string->text[0] == '<') {
out_putsf(" ", 2, 0, feps);
const float gws_left_fudge = symbol->scale < 0.1f ? 0.1f : symbol->scale; /* 0.5 * 2 * scale */
out_putsf(" ", 2, string->x + gws_left_fudge, feps);
} else if (upcean && string->halign == 2 && string->text[0] == '>') {
out_putsf(" ", 2, symbol->vector->width, feps);
const float gws_right_fudge = symbol->scale < 0.1f ? 0.1f : symbol->scale; /* 0.5 * 2 * scale */
out_putsf(" ", 2, string->x - gws_right_fudge, feps);
} else {
out_putsf(" ", 2, string->x, feps);
}