mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13: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 */
|
/* Put the human readable text at the bottom */
|
||||||
if (textdone == 0) {
|
if ((textdone == 0) && ustrlen(local_text)) {
|
||||||
textpos = symbol->width / 2.0;
|
textpos = symbol->width / 2.0;
|
||||||
fprintf(fsvg, " <text x=\"%.2f\" y=\"%.2f\" text-anchor=\"middle\"\n", (textpos + xoffset) * scaler, default_text_posn);
|
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);
|
fprintf(fsvg, " font-family=\"Helvetica\" font-size=\"%.1f\" fill=\"#%s\" >\n", 8.0 * scaler, symbol->fgcolour);
|
||||||
|
Loading…
Reference in New Issue
Block a user