mirror of
https://github.com/woo-j/zint.git
synced 2024-12-25 09:33:56 +03:00
Don't include empty strings in output SVG
This commit is contained in:
parent
83e368f8c1
commit
54c0a858ea
@ -646,7 +646,7 @@ int svg_plot(struct zint_symbol *symbol) {
|
||||
}
|
||||
|
||||
/* Put the human readable text at the bottom */
|
||||
if (textdone == 0) {
|
||||
if ((textdone == 0) && ustrlen(local_text)) {
|
||||
textpos = symbol->width / 2.0;
|
||||
fprintf(fsvg, " <text x=\"%.2f\" y=\"%.2f\" text-anchor=\"middle\"\n", (textpos + xoffset) * scaler, default_text_posn);
|
||||
fprintf(fsvg, " font-family=\"Helvetica\" font-size=\"%.1f\" fill=\"#%s\" >\n", 8.0 * scaler, symbol->fgcolour);
|
||||
|
Loading…
Reference in New Issue
Block a user