diff --git a/backend/library.c b/backend/library.c
index 82b33418..af9edac1 100644
--- a/backend/library.c
+++ b/backend/library.c
@@ -668,6 +668,8 @@ static int reduced_charset(struct zint_symbol *symbol, struct zint_seg segs[], c
if (barcode_src_funcs[symbol->symbology]) {
error_number = barcode_src_funcs[symbol->symbology](symbol, local_segs[0].source, local_segs[0].length);
} else {
+ assert(symbol->symbology >= LIB_SEG_FUNCS_START); /* Suppress clang-tidy-20 warning */
+ assert(barcode_seg_funcs[symbol->symbology - LIB_SEG_FUNCS_START]); /* Suppress clang-tidy-20 warning */
error_number = barcode_seg_funcs[symbol->symbology - LIB_SEG_FUNCS_START](symbol, local_segs, seg_count);
}
} else {
diff --git a/backend/raster.c b/backend/raster.c
index 0742a74d..b90201ed 100644
--- a/backend/raster.c
+++ b/backend/raster.c
@@ -1080,9 +1080,9 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl
addon_text_yposn = yposn_si;
yposn_si += addon_row_adj_si;
addon_row_height_si = row_height_si - addon_row_adj_si;
- if (upceanflag != 12 && upceanflag != 6) { /* UPC-A/E add-ons don't descend */
- addon_row_height_si += guard_descent * si;
- }
+ /* Following ISO/IEC 15420:2009 Figure 5 — UPC-A bar code symbol with 2-digit add-on (contrary to
+ GS1 General Specs v24.0 Figure 5.2.6.6-5) descends for all including UPC-A/E */
+ addon_row_height_si += guard_descent * si;
if (addon_row_height_si == 0) {
addon_row_height_si = 1;
}
@@ -1210,7 +1210,9 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl
text_xposn = 24 * si + xoffset_comp_si;
draw_string(pixelbuf, symbol->text + 1, 6, text_xposn, text_yposn, textflags, image_width,
image_height, si);
- text_xposn = (51 + 3) * si + xoffset_comp_si;
+ /* TODO: GS1 General Specs v24.0 5.2.5 Human readable interpretation says 3X but this could cause
+ digit's righthand to touch any add-on, now that they descend, so use 2X, until clarified */
+ text_xposn = (51 + 2) * si + xoffset_comp_si;
draw_string(pixelbuf, symbol->text + 7, 1, text_xposn, text_yposn + upcea_height_adj,
textflags | SMALL_TEXT | ZFONT_HALIGN_LEFT, image_width, image_height, si);
if (addon_len) {
@@ -1262,7 +1264,9 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl
text_xposn = 67 * si + xoffset_comp_si;
draw_string(pixelbuf, symbol->text + 6, 5, text_xposn, text_yposn, textflags, image_width,
image_height, si);
- text_xposn = (95 + 5) * si + xoffset_comp_si;
+ /* TODO: GS1 General Specs v24.0 5.2.5 Human readable interpretation says 5X but this could cause
+ digit's righthand to touch any add-on, now that they descend, so use 4X, until clarified */
+ text_xposn = (95 + 4) * si + xoffset_comp_si;
draw_string(pixelbuf, symbol->text + 11, 1, text_xposn, text_yposn + upcea_height_adj,
textflags | SMALL_TEXT | ZFONT_HALIGN_LEFT, image_width, image_height, si);
if (addon_len) {
diff --git a/backend/tests/data/emf/upca_2addon_ggs_5.2.6.6-5.emf b/backend/tests/data/emf/upca_2addon_ggs_5.2.6.6-5.emf
index 55f72c8d..c42924e3 100644
Binary files a/backend/tests/data/emf/upca_2addon_ggs_5.2.6.6-5.emf and b/backend/tests/data/emf/upca_2addon_ggs_5.2.6.6-5.emf differ
diff --git a/backend/tests/data/emf/upca_2addon_ggs_5.2.6.6-5_gws.emf b/backend/tests/data/emf/upca_2addon_ggs_5.2.6.6-5_gws.emf
index 409f99b2..ce6fba23 100644
Binary files a/backend/tests/data/emf/upca_2addon_ggs_5.2.6.6-5_gws.emf and b/backend/tests/data/emf/upca_2addon_ggs_5.2.6.6-5_gws.emf differ
diff --git a/backend/tests/data/emf/upca_2addon_ggs_5.2.6.6-5_gws_wsw1h2.emf b/backend/tests/data/emf/upca_2addon_ggs_5.2.6.6-5_gws_wsw1h2.emf
index e4ebaf5b..c1edfd06 100644
Binary files a/backend/tests/data/emf/upca_2addon_ggs_5.2.6.6-5_gws_wsw1h2.emf and b/backend/tests/data/emf/upca_2addon_ggs_5.2.6.6-5_gws_wsw1h2.emf differ
diff --git a/backend/tests/data/emf/upce_2addon.emf b/backend/tests/data/emf/upce_2addon.emf
index 85d9ddd9..56cfff36 100644
Binary files a/backend/tests/data/emf/upce_2addon.emf and b/backend/tests/data/emf/upce_2addon.emf differ
diff --git a/backend/tests/data/emf/upce_2addon_150dpi.emf b/backend/tests/data/emf/upce_2addon_150dpi.emf
index b47ddbe5..004f404f 100644
Binary files a/backend/tests/data/emf/upce_2addon_150dpi.emf and b/backend/tests/data/emf/upce_2addon_150dpi.emf differ
diff --git a/backend/tests/data/emf/upce_2addon_gws.emf b/backend/tests/data/emf/upce_2addon_gws.emf
index 40cc781b..83a539ca 100644
Binary files a/backend/tests/data/emf/upce_2addon_gws.emf and b/backend/tests/data/emf/upce_2addon_gws.emf differ
diff --git a/backend/tests/data/emf/upce_2addon_small_bold.emf b/backend/tests/data/emf/upce_2addon_small_bold.emf
index 829e0429..98625962 100644
Binary files a/backend/tests/data/emf/upce_2addon_small_bold.emf and b/backend/tests/data/emf/upce_2addon_small_bold.emf differ
diff --git a/backend/tests/data/emf/upce_2addon_small_bold_gws.emf b/backend/tests/data/emf/upce_2addon_small_bold_gws.emf
index 28c61e7e..7a4e7875 100644
Binary files a/backend/tests/data/emf/upce_2addon_small_bold_gws.emf and b/backend/tests/data/emf/upce_2addon_small_bold_gws.emf differ
diff --git a/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5.eps b/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5.eps
index 55cbe653..1ed35498 100644
--- a/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5.eps
+++ b/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5.eps
@@ -1,5 +1,5 @@
%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: Zint 2.12.0.9
+%%Creator: Zint 2.13.0.9
%%Title: Zint Generated Symbol
%%Pages: 0
%%BoundingBox: 0 0 276 118
@@ -39,7 +39,7 @@ I 174 6 R
I 194 6 R
I 202 2 R
206 2 R
-82 18 I 226 2 R
+92 8 I 226 2 R
I 230 4 R
I 238 2 R
I 244 4 R
@@ -58,7 +58,7 @@ I 254 2 R
(67890) stringwidth pop -2 div 0 rmoveto
(67890) show
/Helvetica findfont 14.98 scalefont setfont
- 217.3 0.8 moveto
+ 215.3 0.8 moveto
(5) show
/Helvetica findfont 21.4 scalefont setfont
246 102.4 moveto
diff --git a/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5_gws.eps b/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5_gws.eps
index cff1e696..e09c1965 100644
--- a/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5_gws.eps
+++ b/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5_gws.eps
@@ -1,5 +1,5 @@
%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: Zint 2.12.0.9
+%%Creator: Zint 2.13.0.9
%%Title: Zint Generated Symbol
%%Pages: 0
%%BoundingBox: 0 0 276 118
@@ -39,7 +39,7 @@ I 174 6 R
I 194 6 R
I 202 2 R
206 2 R
-82 18 I 226 2 R
+92 8 I 226 2 R
I 230 4 R
I 238 2 R
I 244 4 R
@@ -58,7 +58,7 @@ I 254 2 R
(67890) stringwidth pop -2 div 0 rmoveto
(67890) show
/Helvetica findfont 14.98 scalefont setfont
- 217.3 0.8 moveto
+ 215.3 0.8 moveto
(5) show
/Helvetica findfont 21.4 scalefont setfont
246 102.4 moveto
diff --git a/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5_gws_rotate_180.eps b/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5_gws_rotate_180.eps
index 499dec83..b0899f88 100644
--- a/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5_gws_rotate_180.eps
+++ b/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5_gws_rotate_180.eps
@@ -1,5 +1,5 @@
%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: Zint 2.12.0.9
+%%Creator: Zint 2.13.0.9
%%Title: Zint Generated Symbol
%%Pages: 0
%%BoundingBox: 0 0 276 118
@@ -39,7 +39,7 @@ I 96 6 R
I 76 6 R
I 72 2 R
68 2 R
-82 18 I 48 2 R
+92 18 I 48 2 R
I 42 4 R
I 36 2 R
I 28 4 R
@@ -67,7 +67,7 @@ I 20 2 R
(67890) show
grestore
/Helvetica findfont 14.98 scalefont setfont
- 58.7 117.2 moveto
+ 60.7 117.2 moveto
gsave
180 rotate
(5) show
diff --git a/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5_gws_rotate_270_wsw4.eps b/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5_gws_rotate_270_wsw4.eps
index 8bcfc4de..46f606ca 100644
--- a/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5_gws_rotate_270_wsw4.eps
+++ b/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5_gws_rotate_270_wsw4.eps
@@ -1,5 +1,5 @@
%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: Zint 2.12.0.9
+%%Creator: Zint 2.13.0.9
%%Title: Zint Generated Symbol
%%Pages: 0
%%BoundingBox: 0 0 118 292
@@ -39,13 +39,13 @@
6 202 0 110 R
2 210 0 110 R
2 214 0 110 R
-2 234 18 82 R
-4 238 18 82 R
-2 246 18 82 R
-4 252 18 82 R
-2 258 18 82 R
-2 262 18 82 R
-4 270 18 82 R
+2 234 18 92 R
+4 238 18 92 R
+2 246 18 92 R
+4 252 18 92 R
+2 258 18 92 R
+2 262 18 92 R
+4 270 18 92 R
/Helvetica findfont 14.98 scalefont setfont
117.2 16.7 moveto
gsave
@@ -67,7 +67,7 @@
(67890) show
grestore
/Helvetica findfont 14.98 scalefont setfont
- 117.2 225.3 moveto
+ 117.2 223.3 moveto
gsave
90 rotate
(5) show
diff --git a/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5_gws_wsw1h3.eps b/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5_gws_wsw1h3.eps
index c204b892..e77b2468 100644
--- a/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5_gws_wsw1h3.eps
+++ b/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5_gws_wsw1h3.eps
@@ -1,5 +1,5 @@
%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: Zint 2.12.0.9
+%%Creator: Zint 2.13.0.9
%%Title: Zint Generated Symbol
%%Pages: 0
%%BoundingBox: 0 0 280 130
@@ -39,7 +39,7 @@ I 176 6 R
I 196 6 R
I 204 2 R
208 2 R
-82 24 I 228 2 R
+92 14 I 228 2 R
I 232 4 R
I 240 2 R
I 246 4 R
@@ -58,7 +58,7 @@ I 256 2 R
(67890) stringwidth pop -2 div 0 rmoveto
(67890) show
/Helvetica findfont 14.98 scalefont setfont
- 219.3 6.8 moveto
+ 217.3 6.8 moveto
(5) show
/Helvetica findfont 21.4 scalefont setfont
248 108.4 moveto
diff --git a/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5_rotate_90.eps b/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5_rotate_90.eps
index dd8c4fe8..1e7e557d 100644
--- a/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5_rotate_90.eps
+++ b/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5_rotate_90.eps
@@ -1,5 +1,5 @@
%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: Zint 2.12.0.9
+%%Creator: Zint 2.13.0.9
%%Title: Zint Generated Symbol
%%Pages: 0
%%BoundingBox: 0 0 118 276
@@ -39,13 +39,13 @@
6 76 8 110 R
2 72 8 110 R
2 68 8 110 R
-2 48 18 82 R
-4 42 18 82 R
-2 36 18 82 R
-4 28 18 82 R
-2 24 18 82 R
-2 20 18 82 R
-4 10 18 82 R
+2 48 8 92 R
+4 42 8 92 R
+2 36 8 92 R
+4 28 8 92 R
+2 24 8 92 R
+2 20 8 92 R
+4 10 8 92 R
/Helvetica findfont 14.98 scalefont setfont
0.8 267.3 moveto
gsave
@@ -67,7 +67,7 @@
(67890) show
grestore
/Helvetica findfont 14.98 scalefont setfont
- 0.8 58.7 moveto
+ 0.8 60.7 moveto
gsave
270 rotate
(5) show
diff --git a/backend/tests/data/eps/upce_5addon.eps b/backend/tests/data/eps/upce_5addon.eps
index 115dbfe9..82fbd387 100644
--- a/backend/tests/data/eps/upce_5addon.eps
+++ b/backend/tests/data/eps/upce_5addon.eps
@@ -1,5 +1,5 @@
%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: Zint 2.12.0.9
+%%Creator: Zint 2.13.0.9
%%Title: Zint Generated Symbol
%%Pages: 0
%%BoundingBox: 0 0 238 118
@@ -26,7 +26,7 @@ I 96 2 R
110 8 I 110 2 R
I 114 2 R
118 2 R
-82 18 I 134 2 R
+92 8 I 134 2 R
I 138 4 R
I 144 4 R
I 152 4 R
@@ -51,7 +51,7 @@ I 216 4 R
(123456) stringwidth pop -2 div 0 rmoveto
(123456) show
/Helvetica findfont 14.98 scalefont setfont
- 125.3 0.8 moveto
+ 123.3 0.8 moveto
(5) show
/Helvetica findfont 21.4 scalefont setfont
182 102.4 moveto
diff --git a/backend/tests/data/eps/upce_5addon_gws.eps b/backend/tests/data/eps/upce_5addon_gws.eps
index 23a1ce8a..e2e60402 100644
--- a/backend/tests/data/eps/upce_5addon_gws.eps
+++ b/backend/tests/data/eps/upce_5addon_gws.eps
@@ -1,5 +1,5 @@
%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: Zint 2.12.0.9
+%%Creator: Zint 2.13.0.9
%%Title: Zint Generated Symbol
%%Pages: 0
%%BoundingBox: 0 0 238 118
@@ -26,7 +26,7 @@ I 96 2 R
110 8 I 110 2 R
I 114 2 R
118 2 R
-82 18 I 134 2 R
+92 8 I 134 2 R
I 138 4 R
I 144 4 R
I 152 4 R
@@ -51,7 +51,7 @@ I 216 4 R
(123456) stringwidth pop -2 div 0 rmoveto
(123456) show
/Helvetica findfont 14.98 scalefont setfont
- 125.3 0.8 moveto
+ 123.3 0.8 moveto
(5) show
/Helvetica findfont 21.4 scalefont setfont
182 102.4 moveto
diff --git a/backend/tests/data/eps/upce_5addon_rotate_270.eps b/backend/tests/data/eps/upce_5addon_rotate_270.eps
index bb46eec0..c3d8b754 100644
--- a/backend/tests/data/eps/upce_5addon_rotate_270.eps
+++ b/backend/tests/data/eps/upce_5addon_rotate_270.eps
@@ -1,5 +1,5 @@
%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: Zint 2.12.0.9
+%%Creator: Zint 2.13.0.9
%%Title: Zint Generated Symbol
%%Pages: 0
%%BoundingBox: 0 0 118 238
@@ -26,22 +26,22 @@
2 110 0 110 R
2 114 0 110 R
2 118 0 110 R
-2 134 18 82 R
-4 138 18 82 R
-4 144 18 82 R
-4 152 18 82 R
-2 158 18 82 R
-2 164 18 82 R
-4 170 18 82 R
-2 176 18 82 R
-2 180 18 82 R
-2 190 18 82 R
-2 194 18 82 R
-2 198 18 82 R
-4 206 18 82 R
-2 212 18 82 R
-4 216 18 82 R
-2 226 18 82 R
+2 134 18 92 R
+4 138 18 92 R
+4 144 18 92 R
+4 152 18 92 R
+2 158 18 92 R
+2 164 18 92 R
+4 170 18 92 R
+2 176 18 92 R
+2 180 18 92 R
+2 190 18 92 R
+2 194 18 92 R
+2 198 18 92 R
+4 206 18 92 R
+2 212 18 92 R
+4 216 18 92 R
+2 226 18 92 R
/Helvetica findfont 14.98 scalefont setfont
117.2 8.7 moveto
gsave
@@ -57,7 +57,7 @@
(123456) show
grestore
/Helvetica findfont 14.98 scalefont setfont
- 117.2 125.3 moveto
+ 117.2 123.3 moveto
gsave
90 rotate
(5) show
diff --git a/backend/tests/data/eps/upce_5addon_small_bold.eps b/backend/tests/data/eps/upce_5addon_small_bold.eps
index 86fab196..1003c79f 100644
--- a/backend/tests/data/eps/upce_5addon_small_bold.eps
+++ b/backend/tests/data/eps/upce_5addon_small_bold.eps
@@ -1,5 +1,5 @@
%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: Zint 2.12.0.9
+%%Creator: Zint 2.13.0.9
%%Title: Zint Generated Symbol
%%Pages: 0
%%BoundingBox: 0 0 238 114
@@ -26,7 +26,7 @@ I 96 2 R
110 3.2 I 110 2 R
I 114 2 R
118 2 R
-86.8 13.2 I 134 2 R
+96.8 3.2 I 134 2 R
I 138 4 R
I 144 4 R
I 152 4 R
@@ -51,7 +51,7 @@ I 216 4 R
(123456) stringwidth pop -2 div 0 rmoveto
(123456) show
/Helvetica findfont 12.84 scalefont setfont
- 125.3 0.56 moveto
+ 123.3 0.56 moveto
(5) show
/Helvetica findfont 14.98 scalefont setfont
182 102.28 moveto
diff --git a/backend/tests/data/eps/upce_5addon_small_bold_gws.eps b/backend/tests/data/eps/upce_5addon_small_bold_gws.eps
index e21133dc..cf551032 100644
--- a/backend/tests/data/eps/upce_5addon_small_bold_gws.eps
+++ b/backend/tests/data/eps/upce_5addon_small_bold_gws.eps
@@ -1,5 +1,5 @@
%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: Zint 2.12.0.9
+%%Creator: Zint 2.13.0.9
%%Title: Zint Generated Symbol
%%Pages: 0
%%BoundingBox: 0 0 238 114
@@ -26,7 +26,7 @@ I 96 2 R
110 3.2 I 110 2 R
I 114 2 R
118 2 R
-86.8 13.2 I 134 2 R
+96.8 3.2 I 134 2 R
I 138 4 R
I 144 4 R
I 152 4 R
@@ -51,7 +51,7 @@ I 216 4 R
(123456) stringwidth pop -2 div 0 rmoveto
(123456) show
/Helvetica findfont 12.84 scalefont setfont
- 125.3 0.56 moveto
+ 123.3 0.56 moveto
(5) show
/Helvetica findfont 14.98 scalefont setfont
182 102.28 moveto
diff --git a/backend/tests/data/png/upca_2addon_ggs_5.2.6.6-5.png b/backend/tests/data/png/upca_2addon_ggs_5.2.6.6-5.png
index 470e7c8e..9c835f03 100644
Binary files a/backend/tests/data/png/upca_2addon_ggs_5.2.6.6-5.png and b/backend/tests/data/png/upca_2addon_ggs_5.2.6.6-5.png differ
diff --git a/backend/tests/data/png/upca_2addon_ggs_5.2.6.6-5_gws.png b/backend/tests/data/png/upca_2addon_ggs_5.2.6.6-5_gws.png
index cf9c8d55..e9fb7340 100644
Binary files a/backend/tests/data/png/upca_2addon_ggs_5.2.6.6-5_gws.png and b/backend/tests/data/png/upca_2addon_ggs_5.2.6.6-5_gws.png differ
diff --git a/backend/tests/data/png/upca_5addon.png b/backend/tests/data/png/upca_5addon.png
index 76b4e836..177b6871 100644
Binary files a/backend/tests/data/png/upca_5addon.png and b/backend/tests/data/png/upca_5addon.png differ
diff --git a/backend/tests/data/png/upca_5addon_bind3.png b/backend/tests/data/png/upca_5addon_bind3.png
index 76d9f8dc..cb3adb8d 100644
Binary files a/backend/tests/data/png/upca_5addon_bind3.png and b/backend/tests/data/png/upca_5addon_bind3.png differ
diff --git a/backend/tests/data/png/upca_5addon_gws.png b/backend/tests/data/png/upca_5addon_gws.png
index 024ff1c2..f3afca14 100644
Binary files a/backend/tests/data/png/upca_5addon_gws.png and b/backend/tests/data/png/upca_5addon_gws.png differ
diff --git a/backend/tests/data/png/upca_5addon_notext.png b/backend/tests/data/png/upca_5addon_notext.png
index 12967b5c..1652da1d 100644
Binary files a/backend/tests/data/png/upca_5addon_notext.png and b/backend/tests/data/png/upca_5addon_notext.png differ
diff --git a/backend/tests/data/png/upca_cc_2addon_cca_3x4.png b/backend/tests/data/png/upca_cc_2addon_cca_3x4.png
index 2cde13bb..99a327d6 100644
Binary files a/backend/tests/data/png/upca_cc_2addon_cca_3x4.png and b/backend/tests/data/png/upca_cc_2addon_cca_3x4.png differ
diff --git a/backend/tests/data/png/upca_cc_2addon_cca_3x4_gws.png b/backend/tests/data/png/upca_cc_2addon_cca_3x4_gws.png
index 9c94f855..51f3a855 100644
Binary files a/backend/tests/data/png/upca_cc_2addon_cca_3x4_gws.png and b/backend/tests/data/png/upca_cc_2addon_cca_3x4_gws.png differ
diff --git a/backend/tests/data/png/upca_cc_5addon_ccb_4x4.png b/backend/tests/data/png/upca_cc_5addon_ccb_4x4.png
index ec9c175e..6f33d095 100644
Binary files a/backend/tests/data/png/upca_cc_5addon_ccb_4x4.png and b/backend/tests/data/png/upca_cc_5addon_ccb_4x4.png differ
diff --git a/backend/tests/data/png/upca_cc_5addon_ccb_4x4_bind3.png b/backend/tests/data/png/upca_cc_5addon_ccb_4x4_bind3.png
index bd67e2fb..b75cd359 100644
Binary files a/backend/tests/data/png/upca_cc_5addon_ccb_4x4_bind3.png and b/backend/tests/data/png/upca_cc_5addon_ccb_4x4_bind3.png differ
diff --git a/backend/tests/data/png/upca_cc_5addon_ccb_4x4_notext.png b/backend/tests/data/png/upca_cc_5addon_ccb_4x4_notext.png
index 74d55f4e..d7bc57d1 100644
Binary files a/backend/tests/data/png/upca_cc_5addon_ccb_4x4_notext.png and b/backend/tests/data/png/upca_cc_5addon_ccb_4x4_notext.png differ
diff --git a/backend/tests/data/png/upce_2addon.png b/backend/tests/data/png/upce_2addon.png
index 58679682..49462bfe 100644
Binary files a/backend/tests/data/png/upce_2addon.png and b/backend/tests/data/png/upce_2addon.png differ
diff --git a/backend/tests/data/png/upce_2addon_gws.png b/backend/tests/data/png/upce_2addon_gws.png
index 4d9fa3de..2ac73559 100644
Binary files a/backend/tests/data/png/upce_2addon_gws.png and b/backend/tests/data/png/upce_2addon_gws.png differ
diff --git a/backend/tests/data/png/upce_5addon.png b/backend/tests/data/png/upce_5addon.png
index a43ee44b..a5ea0e7e 100644
Binary files a/backend/tests/data/png/upce_5addon.png and b/backend/tests/data/png/upce_5addon.png differ
diff --git a/backend/tests/data/png/upce_5addon_small.png b/backend/tests/data/png/upce_5addon_small.png
index 5fe5fe84..ff67b900 100644
Binary files a/backend/tests/data/png/upce_5addon_small.png and b/backend/tests/data/png/upce_5addon_small.png differ
diff --git a/backend/tests/data/png/upce_5addon_small_gws.png b/backend/tests/data/png/upce_5addon_small_gws.png
index 8736c345..22f7181c 100644
Binary files a/backend/tests/data/png/upce_5addon_small_gws.png and b/backend/tests/data/png/upce_5addon_small_gws.png differ
diff --git a/backend/tests/data/png/upce_cc_2addon_cca_5x2.png b/backend/tests/data/png/upce_cc_2addon_cca_5x2.png
index 1f420716..a0bfedf6 100644
Binary files a/backend/tests/data/png/upce_cc_2addon_cca_5x2.png and b/backend/tests/data/png/upce_cc_2addon_cca_5x2.png differ
diff --git a/backend/tests/data/png/upce_cc_2addon_cca_5x2_gws.png b/backend/tests/data/png/upce_cc_2addon_cca_5x2_gws.png
index bcdbae96..a5a45d4d 100644
Binary files a/backend/tests/data/png/upce_cc_2addon_cca_5x2_gws.png and b/backend/tests/data/png/upce_cc_2addon_cca_5x2_gws.png differ
diff --git a/backend/tests/data/png/upce_cc_5addon_ccb_8x2.png b/backend/tests/data/png/upce_cc_5addon_ccb_8x2.png
index aba27385..3dcccf6f 100644
Binary files a/backend/tests/data/png/upce_cc_5addon_ccb_8x2.png and b/backend/tests/data/png/upce_cc_5addon_ccb_8x2.png differ
diff --git a/backend/tests/data/png/upce_cc_5addon_ccb_8x2_gws.png b/backend/tests/data/png/upce_cc_5addon_ccb_8x2_gws.png
index 7e8e5a17..6fbbc663 100644
Binary files a/backend/tests/data/png/upce_cc_5addon_ccb_8x2_gws.png and b/backend/tests/data/png/upce_cc_5addon_ccb_8x2_gws.png differ
diff --git a/backend/tests/data/png/upce_cc_5addon_ccb_8x2_notext.png b/backend/tests/data/png/upce_cc_5addon_ccb_8x2_notext.png
index 91074609..6d883e20 100644
Binary files a/backend/tests/data/png/upce_cc_5addon_ccb_8x2_notext.png and b/backend/tests/data/png/upce_cc_5addon_ccb_8x2_notext.png differ
diff --git a/backend/tests/data/svg/upca_2addon_ggs_5.2.6.6-5.svg b/backend/tests/data/svg/upca_2addon_ggs_5.2.6.6-5.svg
index a57da333..54855bf9 100644
--- a/backend/tests/data/svg/upca_2addon_ggs_5.2.6.6-5.svg
+++ b/backend/tests/data/svg/upca_2addon_ggs_5.2.6.6-5.svg
@@ -4,7 +4,7 @@
Zint Generated Symbol
-
+
0
@@ -14,7 +14,7 @@
67890
-
+
5
diff --git a/backend/tests/data/svg/upca_2addon_ggs_5.2.6.6-5_gws.svg b/backend/tests/data/svg/upca_2addon_ggs_5.2.6.6-5_gws.svg
index 905ed9ec..47eb1000 100644
--- a/backend/tests/data/svg/upca_2addon_ggs_5.2.6.6-5_gws.svg
+++ b/backend/tests/data/svg/upca_2addon_ggs_5.2.6.6-5_gws.svg
@@ -4,7 +4,7 @@
Zint Generated Symbol
-
+
0
@@ -14,7 +14,7 @@
67890
-
+
5
diff --git a/backend/tests/data/svg/upca_5addon.svg b/backend/tests/data/svg/upca_5addon.svg
index 1b9d410a..8087eed8 100644
--- a/backend/tests/data/svg/upca_5addon.svg
+++ b/backend/tests/data/svg/upca_5addon.svg
@@ -4,7 +4,7 @@
Zint Generated Symbol
-
+
6
@@ -14,7 +14,7 @@
23441
-
+
7
diff --git a/backend/tests/data/svg/upca_5addon_bind3.svg b/backend/tests/data/svg/upca_5addon_bind3.svg
index 3c4f5c5a..021cb2f6 100644
--- a/backend/tests/data/svg/upca_5addon_bind3.svg
+++ b/backend/tests/data/svg/upca_5addon_bind3.svg
@@ -4,7 +4,7 @@
Zint Generated Symbol
-
+
6
@@ -14,7 +14,7 @@
23441
-
+
7
diff --git a/backend/tests/data/svg/upca_5addon_gws.svg b/backend/tests/data/svg/upca_5addon_gws.svg
index 062d8574..6173102b 100644
--- a/backend/tests/data/svg/upca_5addon_gws.svg
+++ b/backend/tests/data/svg/upca_5addon_gws.svg
@@ -4,7 +4,7 @@
Zint Generated Symbol
-
+
6
@@ -14,7 +14,7 @@
23441
-
+
7
diff --git a/backend/tests/data/svg/upca_5addon_small_bold.svg b/backend/tests/data/svg/upca_5addon_small_bold.svg
index 92c7c76f..7ddbb10f 100644
--- a/backend/tests/data/svg/upca_5addon_small_bold.svg
+++ b/backend/tests/data/svg/upca_5addon_small_bold.svg
@@ -4,7 +4,7 @@
Zint Generated Symbol
-
+
6
@@ -14,7 +14,7 @@
23441
-
+
7
diff --git a/backend/tests/data/svg/upca_cc_2addon_cca_3x4.svg b/backend/tests/data/svg/upca_cc_2addon_cca_3x4.svg
index a145e896..a5c6c9c2 100644
--- a/backend/tests/data/svg/upca_cc_2addon_cca_3x4.svg
+++ b/backend/tests/data/svg/upca_cc_2addon_cca_3x4.svg
@@ -4,7 +4,7 @@
Zint Generated Symbol
-
+
1
@@ -14,7 +14,7 @@
78901
-
+
2
diff --git a/backend/tests/data/svg/upca_cc_2addon_cca_3x4_gws.svg b/backend/tests/data/svg/upca_cc_2addon_cca_3x4_gws.svg
index f232c73a..e4826c98 100644
--- a/backend/tests/data/svg/upca_cc_2addon_cca_3x4_gws.svg
+++ b/backend/tests/data/svg/upca_cc_2addon_cca_3x4_gws.svg
@@ -4,7 +4,7 @@
Zint Generated Symbol
-
+
1
@@ -14,7 +14,7 @@
78901
-
+
2
diff --git a/backend/tests/data/svg/upca_cc_5addon_ccb_4x4.svg b/backend/tests/data/svg/upca_cc_5addon_ccb_4x4.svg
index 9bc64dbf..aa84fdc5 100644
--- a/backend/tests/data/svg/upca_cc_5addon_ccb_4x4.svg
+++ b/backend/tests/data/svg/upca_cc_5addon_ccb_4x4.svg
@@ -4,7 +4,7 @@
Zint Generated Symbol
-
+
1
@@ -14,7 +14,7 @@
78901
-
+
2
diff --git a/backend/tests/data/svg/upca_cc_5addon_ccb_4x4_bind3.svg b/backend/tests/data/svg/upca_cc_5addon_ccb_4x4_bind3.svg
index d7169865..ba20822d 100644
--- a/backend/tests/data/svg/upca_cc_5addon_ccb_4x4_bind3.svg
+++ b/backend/tests/data/svg/upca_cc_5addon_ccb_4x4_bind3.svg
@@ -4,7 +4,7 @@
Zint Generated Symbol
-
+
1
@@ -14,7 +14,7 @@
78901
-
+
2
diff --git a/backend/tests/data/svg/upca_cc_5addon_ccb_4x4_gws.svg b/backend/tests/data/svg/upca_cc_5addon_ccb_4x4_gws.svg
index fcbcb392..04c7ab2a 100644
--- a/backend/tests/data/svg/upca_cc_5addon_ccb_4x4_gws.svg
+++ b/backend/tests/data/svg/upca_cc_5addon_ccb_4x4_gws.svg
@@ -4,7 +4,7 @@
Zint Generated Symbol
-
+
1
@@ -14,7 +14,7 @@
78901
-
+
2
diff --git a/backend/tests/data/svg/upca_cc_5addon_ccb_4x4_notext.svg b/backend/tests/data/svg/upca_cc_5addon_ccb_4x4_notext.svg
index 9a491e10..6291c6c3 100644
--- a/backend/tests/data/svg/upca_cc_5addon_ccb_4x4_notext.svg
+++ b/backend/tests/data/svg/upca_cc_5addon_ccb_4x4_notext.svg
@@ -4,6 +4,6 @@
Zint Generated Symbol
-
+
diff --git a/backend/tests/data/svg/upce_2addon.svg b/backend/tests/data/svg/upce_2addon.svg
index e90e7082..c10df1f9 100644
--- a/backend/tests/data/svg/upce_2addon.svg
+++ b/backend/tests/data/svg/upce_2addon.svg
@@ -4,14 +4,14 @@
Zint Generated Symbol
-
+
1
234567
-
+
0
diff --git a/backend/tests/data/svg/upce_2addon_gws.svg b/backend/tests/data/svg/upce_2addon_gws.svg
index 26cedf27..e2319adc 100644
--- a/backend/tests/data/svg/upce_2addon_gws.svg
+++ b/backend/tests/data/svg/upce_2addon_gws.svg
@@ -4,14 +4,14 @@
Zint Generated Symbol
-
+
1
234567
-
+
0
diff --git a/backend/tests/data/svg/upce_5addon.svg b/backend/tests/data/svg/upce_5addon.svg
index 2386e072..e48aa90d 100644
--- a/backend/tests/data/svg/upce_5addon.svg
+++ b/backend/tests/data/svg/upce_5addon.svg
@@ -4,14 +4,14 @@
Zint Generated Symbol
-
+
1
234567
-
+
0
diff --git a/backend/tests/data/svg/upce_5addon_notext.svg b/backend/tests/data/svg/upce_5addon_notext.svg
index 3f3b3f6f..7e2aa435 100644
--- a/backend/tests/data/svg/upce_5addon_notext.svg
+++ b/backend/tests/data/svg/upce_5addon_notext.svg
@@ -4,6 +4,6 @@
Zint Generated Symbol
-
+
diff --git a/backend/tests/data/svg/upce_5addon_small.svg b/backend/tests/data/svg/upce_5addon_small.svg
index cc2f1161..6f082024 100644
--- a/backend/tests/data/svg/upce_5addon_small.svg
+++ b/backend/tests/data/svg/upce_5addon_small.svg
@@ -4,14 +4,14 @@
Zint Generated Symbol
-
+
1
234567
-
+
0
diff --git a/backend/tests/data/svg/upce_5addon_small_gws.svg b/backend/tests/data/svg/upce_5addon_small_gws.svg
index 79769d7b..fb07180b 100644
--- a/backend/tests/data/svg/upce_5addon_small_gws.svg
+++ b/backend/tests/data/svg/upce_5addon_small_gws.svg
@@ -4,14 +4,14 @@
Zint Generated Symbol
-
+
1
234567
-
+
0
diff --git a/backend/tests/data/svg/upce_cc_2addon_cca_5x2.svg b/backend/tests/data/svg/upce_cc_2addon_cca_5x2.svg
index 27c8a404..bb1597c3 100644
--- a/backend/tests/data/svg/upce_cc_2addon_cca_5x2.svg
+++ b/backend/tests/data/svg/upce_cc_2addon_cca_5x2.svg
@@ -4,14 +4,14 @@
Zint Generated Symbol
-
+
0
654321
-
+
7
diff --git a/backend/tests/data/svg/upce_cc_2addon_cca_5x2_fgbgalpha.svg b/backend/tests/data/svg/upce_cc_2addon_cca_5x2_fgbgalpha.svg
index dd7f8490..84f77e99 100644
--- a/backend/tests/data/svg/upce_cc_2addon_cca_5x2_fgbgalpha.svg
+++ b/backend/tests/data/svg/upce_cc_2addon_cca_5x2_fgbgalpha.svg
@@ -4,14 +4,14 @@
Zint Generated Symbol
-
+
0
654321
-
+
7
diff --git a/backend/tests/data/svg/upce_cc_2addon_cca_5x2_gws.svg b/backend/tests/data/svg/upce_cc_2addon_cca_5x2_gws.svg
index 1f30dd92..ba238b30 100644
--- a/backend/tests/data/svg/upce_cc_2addon_cca_5x2_gws.svg
+++ b/backend/tests/data/svg/upce_cc_2addon_cca_5x2_gws.svg
@@ -4,14 +4,14 @@
Zint Generated Symbol
-
+
0
654321
-
+
7
diff --git a/backend/tests/data/svg/upce_cc_2addon_cca_5x2_nobg.svg b/backend/tests/data/svg/upce_cc_2addon_cca_5x2_nobg.svg
index 1e5193aa..6854bbe0 100644
--- a/backend/tests/data/svg/upce_cc_2addon_cca_5x2_nobg.svg
+++ b/backend/tests/data/svg/upce_cc_2addon_cca_5x2_nobg.svg
@@ -3,14 +3,14 @@
diff --git a/backend/tests/test_raster.c b/backend/tests/test_raster.c
index 0041ca5f..69eee441 100644
--- a/backend/tests/test_raster.c
+++ b/backend/tests/test_raster.c
@@ -1381,26 +1381,28 @@ static void test_guard_descent(const testCtx *const p_ctx) {
/* 8*/ { BARCODE_UPCE, 8.5, "1234567", 0, 50, 1, 51, 134, 117, 1 /*set*/, 100 /*set_row*/, 100 + 17, 18, 2 },
/* 9*/ { BARCODE_UPCE, 20, "1234567", 0, 50, 1, 51, 134, 140, 1 /*set*/, 100 /*set_row*/, 100 + 40, 18, 2 },
/* 10*/ { BARCODE_UPCE, -1, "1234567+12", 0, 50, 1, 78, 184, 116, 1 /*set*/, 100 /*set_row*/, 100 + 10, 18, 2 },
- /* 11*/ { BARCODE_UPCE, -1, "1234567+12", 0, 50, 1, 78, 184, 116, 0 /*set*/, 100 /*set_row*/, 100 + 16, 134, 2 },
- /* 12*/ { BARCODE_UPCE, 9, "1234567+12", 0, 50, 1, 78, 184, 118, 0 /*set*/, 100 /*set_row*/, 100 + 18, 134, 2 },
- /* 13*/ { BARCODE_UPCA, -1, "12345678901", 0, 50, 1, 95, 226, 116, 1 /*set*/, 100 /*set_row*/, 100 + 10, 206, 2 },
- /* 14*/ { BARCODE_UPCA, 0, "12345678901", 0, 50, 1, 95, 226, 116, 0 /*set*/, 100 /*set_row*/, 100 + 10, 206, 2 },
- /* 15*/ { BARCODE_UPCA, 2.75, "12345678901", 0, 50, 1, 95, 226, 116, 1 /*set*/, 100 /*set_row*/, 100 + 5, 206, 2 },
- /* 16*/ { BARCODE_UPCA, -1, "12345678901+12", 0, 50, 1, 124, 276, 116, 1 /*set*/, 100 /*set_row*/, 100 + 10, 206, 2 },
- /* 17*/ { BARCODE_UPCA, -1, "12345678901+12", 0, 50, 1, 124, 276, 116, 0 /*set*/, 100 /*set_row*/, 100 + 16, 262, 4 },
- /* 18*/ { BARCODE_UPCA, 10, "12345678901+12", 0, 50, 1, 124, 276, 120, 0 /*set*/, 100 /*set_row*/, 100 + 20, 262, 4 },
- /* 19*/ { BARCODE_EANX, -1, "123456789012", 0, 50, 1, 95, 226, 116, 1 /*set*/, 100 /*set_row*/, 100 + 10, 114, 2 },
- /* 20*/ { BARCODE_EANX, -1, "123456789012", 0, 50, 1, 95, 226, 116, 0 /*set*/, 100 + 10 /*set_row*/, 100 + 16, 114, 2 },
- /* 21*/ { BARCODE_EANX, 0, "123456789012", 0, 50, 1, 95, 226, 116, 0 /*set*/, 100 /*set_row*/, 100 + 16, 114, 2 },
- /* 22*/ { BARCODE_EANX, 2, "123456789012", 0, 50, 1, 95, 226, 116, 1 /*set*/, 100 /*set_row*/, 100 + 4, 114, 2 },
- /* 23*/ { BARCODE_EANX, 2, "123456789012", 0, 50, 1, 95, 226, 116, 0 /*set*/, 100 + 4 /*set_row*/, 100 + 16, 114, 2 },
- /* 24*/ { BARCODE_EANX, -1, "123456789012+12345", 0, 50, 1, 149, 330, 116, 1 /*set*/, 100 /*set_row*/, 100 + 10, 308, 4 },
- /* 25*/ { BARCODE_EANX, -1, "123456789012+12345", 0, 50, 1, 149, 330, 116, 0 /*set*/, 100 + 10 /*set_row*/, 100 + 16, 308, 4 },
- /* 26*/ { BARCODE_EANX, 0, "123456789012+12345", 0, 50, 1, 149, 330, 116, 0 /*set*/, 100 /*set_row*/, 100 + 16, 308, 4 },
- /* 27*/ { BARCODE_EANX, 18, "123456789012+12345", 0, 50, 1, 149, 330, 136, 1 /*set*/, 100 /*set_row*/, 100 + 36, 308, 4 },
- /* 28*/ { BARCODE_ISBNX, -1, "123456789", 0, 50, 1, 95, 226, 116, 1 /*set*/, 100 /*set_row*/, 100 + 10, 206, 2 },
- /* 29*/ { BARCODE_ISBNX, -1, "123456789", 0, 50, 1, 95, 226, 116, 0 /*set*/, 100 + 10 /*set_row*/, 100 + 16, 206, 2 },
- /* 30*/ { BARCODE_ISBNX, 0, "123456789", 0, 50, 1, 95, 226, 116, 0 /*set*/, 100 /*set_row*/, 100 + 16, 206, 2 },
+ /* 11*/ { BARCODE_UPCE, -1, "1234567+12", 0, 50, 1, 78, 184, 116, 1 /*set*/, 100 /*set_row*/, 100 + 10, 134, 2 },
+ /* 12*/ { BARCODE_UPCE, -1, "1234567+12", 0, 50, 1, 78, 184, 116, 0 /*set*/, 110 /*set_row*/, 110 + 6, 134, 2 },
+ /* 13*/ { BARCODE_UPCE, 9, "1234567+12", 0, 50, 1, 78, 184, 118, 1 /*set*/, 110 /*set_row*/, 110 + 8, 134, 2 },
+ /* 14*/ { BARCODE_UPCA, -1, "12345678901", 0, 50, 1, 95, 226, 116, 1 /*set*/, 100 /*set_row*/, 100 + 10, 206, 2 },
+ /* 15*/ { BARCODE_UPCA, 0, "12345678901", 0, 50, 1, 95, 226, 116, 0 /*set*/, 100 /*set_row*/, 100 + 10, 206, 2 },
+ /* 16*/ { BARCODE_UPCA, 2.75, "12345678901", 0, 50, 1, 95, 226, 116, 1 /*set*/, 100 /*set_row*/, 100 + 5, 206, 2 },
+ /* 17*/ { BARCODE_UPCA, -1, "12345678901+12", 0, 50, 1, 124, 276, 116, 1 /*set*/, 100 /*set_row*/, 100 + 10, 206, 2 },
+ /* 18*/ { BARCODE_UPCA, -1, "12345678901+12", 0, 50, 1, 124, 276, 116, 1 /*set*/, 100 /*set_row*/, 100 + 10, 262, 4 },
+ /* 19*/ { BARCODE_UPCA, -1, "12345678901+12", 0, 50, 1, 124, 276, 116, 0 /*set*/, 110 /*set_row*/, 110 + 6, 262, 4 },
+ /* 20*/ { BARCODE_UPCA, 10, "12345678901+12", 0, 50, 1, 124, 276, 120, 1 /*set*/, 110 /*set_row*/, 110 + 10, 262, 4 },
+ /* 21*/ { BARCODE_EANX, -1, "123456789012", 0, 50, 1, 95, 226, 116, 1 /*set*/, 100 /*set_row*/, 100 + 10, 114, 2 },
+ /* 22*/ { BARCODE_EANX, -1, "123456789012", 0, 50, 1, 95, 226, 116, 0 /*set*/, 100 + 10 /*set_row*/, 100 + 16, 114, 2 },
+ /* 23*/ { BARCODE_EANX, 0, "123456789012", 0, 50, 1, 95, 226, 116, 0 /*set*/, 100 /*set_row*/, 100 + 16, 114, 2 },
+ /* 24*/ { BARCODE_EANX, 2, "123456789012", 0, 50, 1, 95, 226, 116, 1 /*set*/, 100 /*set_row*/, 100 + 4, 114, 2 },
+ /* 25*/ { BARCODE_EANX, 2, "123456789012", 0, 50, 1, 95, 226, 116, 0 /*set*/, 100 + 4 /*set_row*/, 100 + 16, 114, 2 },
+ /* 26*/ { BARCODE_EANX, -1, "123456789012+12345", 0, 50, 1, 149, 330, 116, 1 /*set*/, 100 /*set_row*/, 100 + 10, 308, 4 },
+ /* 27*/ { BARCODE_EANX, -1, "123456789012+12345", 0, 50, 1, 149, 330, 116, 0 /*set*/, 100 + 10 /*set_row*/, 100 + 16, 308, 4 },
+ /* 28*/ { BARCODE_EANX, 0, "123456789012+12345", 0, 50, 1, 149, 330, 116, 0 /*set*/, 100 /*set_row*/, 100 + 16, 308, 4 },
+ /* 29*/ { BARCODE_EANX, 18, "123456789012+12345", 0, 50, 1, 149, 330, 136, 1 /*set*/, 100 /*set_row*/, 100 + 36, 308, 4 },
+ /* 30*/ { BARCODE_ISBNX, -1, "123456789", 0, 50, 1, 95, 226, 116, 1 /*set*/, 100 /*set_row*/, 100 + 10, 206, 2 },
+ /* 31*/ { BARCODE_ISBNX, -1, "123456789", 0, 50, 1, 95, 226, 116, 0 /*set*/, 100 + 10 /*set_row*/, 100 + 16, 206, 2 },
+ /* 32*/ { BARCODE_ISBNX, 0, "123456789", 0, 50, 1, 95, 226, 116, 0 /*set*/, 100 /*set_row*/, 100 + 16, 206, 2 },
};
const int data_size = ARRAY_SIZE(data);
int i, length, ret;
diff --git a/backend/tests/test_vector.c b/backend/tests/test_vector.c
index 9c04d184..1c6e025f 100644
--- a/backend/tests/test_vector.c
+++ b/backend/tests/test_vector.c
@@ -1612,20 +1612,20 @@ static void test_guard_descent(const testCtx *const p_ctx) {
/* 6*/ { BARCODE_UPCE, 8.3, "1234567", 0, 50, 1, 51, 134, 118, 18, 0, 2, 116.6 },
/* 7*/ { BARCODE_UPCE, 19.6, "1234567", 0, 50, 1, 51, 134, 139.2, 18, 0, 2, 139.2 },
/* 8*/ { BARCODE_UPCE, -1, "1234567+12345", 0, 50, 1, 105, 238, 118, 118, 0, 2, 110 },
- /* 9*/ { BARCODE_UPCE, -1, "1234567+12345", 0, 50, 1, 105, 238, 118, 134, 18, 2, 82 },
+ /* 9*/ { BARCODE_UPCE, -1, "1234567+12345", 0, 50, 1, 105, 238, 118, 134, 18, 2, 92 },
/* 10*/ { BARCODE_UPCE, 0, "1234567+12345", 0, 50, 1, 105, 238, 118, 118, 0, 2, 100 },
/* 11*/ { BARCODE_UPCE, 0, "1234567+12345", 0, 50, 1, 105, 238, 118, 134, 18, 2, 82 },
/* 12*/ { BARCODE_UPCE, 4, "1234567+12345", 0, 50, 1, 105, 238, 118, 118, 0, 2, 108 },
- /* 13*/ { BARCODE_UPCE, 4, "1234567+12345", 0, 50, 1, 105, 238, 118, 134, 18, 2, 82 },
+ /* 13*/ { BARCODE_UPCE, 4, "1234567+12345", 0, 50, 1, 105, 238, 118, 134, 18, 2, 90 },
/* 14*/ { BARCODE_UPCA, -1, "12345678901", 0, 50, 1, 95, 226, 118, 188, 0, 4, 110 },
/* 15*/ { BARCODE_UPCA, 0, "12345678901", 0, 50, 1, 95, 226, 118, 188, 0, 4, 100 },
/* 16*/ { BARCODE_UPCA, 6, "12345678901", 0, 50, 1, 95, 226, 118, 188, 0, 4, 112 },
/* 17*/ { BARCODE_UPCA, -1, "12345678901+12", 0, 50, 1, 124, 276, 118, 188, 0, 4, 110 },
- /* 18*/ { BARCODE_UPCA, -1, "12345678901+12", 0, 50, 1, 124, 276, 118, 262, 18, 4, 82 },
+ /* 18*/ { BARCODE_UPCA, -1, "12345678901+12", 0, 50, 1, 124, 276, 118, 262, 18, 4, 92 },
/* 19*/ { BARCODE_UPCA, 0, "12345678901+12", 0, 50, 1, 124, 276, 118, 188, 0, 4, 100 },
/* 20*/ { BARCODE_UPCA, 0, "12345678901+12", 0, 50, 1, 124, 276, 118, 262, 18, 4, 82 },
/* 21*/ { BARCODE_UPCA, 9, "12345678901+12", 0, 50, 1, 124, 276, 118, 188, 0, 4, 118 },
- /* 22*/ { BARCODE_UPCA, 9, "12345678901+12", 0, 50, 1, 124, 276, 118, 262, 18, 4, 82 },
+ /* 22*/ { BARCODE_UPCA, 9, "12345678901+12", 0, 50, 1, 124, 276, 118, 262, 18, 4, 100 },
/* 23*/ { BARCODE_EANX, -1, "123456789012", 0, 50, 1, 95, 226, 118, 22, 0, 2, 110 },
/* 24*/ { BARCODE_EANX, 0, "123456789012", 0, 50, 1, 95, 226, 118, 22, 0, 2, 100 },
/* 25*/ { BARCODE_EANX, 7, "123456789012", 0, 50, 1, 95, 226, 118, 22, 0, 2, 114 },
@@ -1814,18 +1814,18 @@ static void test_quiet_zones(const testCtx *const p_ctx) {
/* 94*/ { BARCODE_UPCE, -1, -1, -1, 0, "8145713", "", 0, 50, 1, 51, 134, 110, 18, 0, 2, 110 }, /* Hide text */
/* 95*/ { BARCODE_UPCE, BARCODE_QUIET_ZONES, -1, -1, 0, "8145713", "", 0, 50, 1, 51, 134, 110, 18, 0, 2, 110 }, /* Hide text */
/* 96*/ { BARCODE_UPCE, BARCODE_NO_QUIET_ZONES, -1, -1, 0, "8145713", "", 0, 50, 1, 51, 102, 110, 0, 0, 2, 110 }, /* Hide text */
- /* 97*/ { BARCODE_UPCE_CHK, -1, -1, -1, -1, "81457132+12", "", 0, 50, 1, 78, 184, 118, 170, 18, 4, 82 },
- /* 98*/ { BARCODE_UPCE_CHK, BARCODE_QUIET_ZONES, -1, -1, -1, "81457132+12", "", 0, 50, 1, 78, 184, 118, 170, 18, 4, 82 },
- /* 99*/ { BARCODE_UPCE_CHK, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "81457132+12", "", 0, 50, 1, 78, 174, 118, 170, 18, 4, 82 },
- /*100*/ { BARCODE_UPCE_CHK, -1, -1, -1, 0, "81457132+12", "", 0, 50, 1, 78, 184, 110, 170, 18, 4, 82 }, /* Hide text */
- /*101*/ { BARCODE_UPCE_CHK, BARCODE_QUIET_ZONES, -1, -1, 0, "81457132+12", "", 0, 50, 1, 78, 184, 110, 170, 18, 4, 82 }, /* Hide text */
- /*102*/ { BARCODE_UPCE_CHK, BARCODE_NO_QUIET_ZONES, -1, -1, 0, "81457132+12", "", 0, 50, 1, 78, 156, 110, 152, 18, 4, 82 }, /* Hide text */
- /*103*/ { BARCODE_UPCE, -1, -1, -1, -1, "8145713+12345", "", 0, 50, 1, 105, 238, 118, 226, 18, 2, 82 },
- /*104*/ { BARCODE_UPCE, BARCODE_QUIET_ZONES, -1, -1, -1, "8145713+12345", "", 0, 50, 1, 105, 238, 118, 226, 18, 2, 82 },
- /*105*/ { BARCODE_UPCE, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "8145713+12345", "", 0, 50, 1, 105, 228, 118, 226, 18, 2, 82 },
- /*106*/ { BARCODE_UPCE, -1, -1, -1, 0, "8145713+12345", "", 0, 50, 1, 105, 238, 110, 226, 18, 2, 82 }, /* Hide text */
- /*107*/ { BARCODE_UPCE, BARCODE_QUIET_ZONES, -1, -1, 0, "8145713+12345", "", 0, 50, 1, 105, 238, 110, 226, 18, 2, 82 }, /* Hide text */
- /*108*/ { BARCODE_UPCE, BARCODE_NO_QUIET_ZONES, -1, -1, 0, "8145713+12345", "", 0, 50, 1, 105, 210, 110, 208, 18, 2, 82 }, /* Hide text */
+ /* 97*/ { BARCODE_UPCE_CHK, -1, -1, -1, -1, "81457132+12", "", 0, 50, 1, 78, 184, 118, 170, 18, 4, 92 },
+ /* 98*/ { BARCODE_UPCE_CHK, BARCODE_QUIET_ZONES, -1, -1, -1, "81457132+12", "", 0, 50, 1, 78, 184, 118, 170, 18, 4, 92 },
+ /* 99*/ { BARCODE_UPCE_CHK, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "81457132+12", "", 0, 50, 1, 78, 174, 118, 170, 18, 4, 92 },
+ /*100*/ { BARCODE_UPCE_CHK, -1, -1, -1, 0, "81457132+12", "", 0, 50, 1, 78, 184, 110, 170, 18, 4, 92 }, /* Hide text */
+ /*101*/ { BARCODE_UPCE_CHK, BARCODE_QUIET_ZONES, -1, -1, 0, "81457132+12", "", 0, 50, 1, 78, 184, 110, 170, 18, 4, 92 }, /* Hide text */
+ /*102*/ { BARCODE_UPCE_CHK, BARCODE_NO_QUIET_ZONES, -1, -1, 0, "81457132+12", "", 0, 50, 1, 78, 156, 110, 152, 18, 4, 92 }, /* Hide text */
+ /*103*/ { BARCODE_UPCE, -1, -1, -1, -1, "8145713+12345", "", 0, 50, 1, 105, 238, 118, 226, 18, 2, 92 },
+ /*104*/ { BARCODE_UPCE, BARCODE_QUIET_ZONES, -1, -1, -1, "8145713+12345", "", 0, 50, 1, 105, 238, 118, 226, 18, 2, 92 },
+ /*105*/ { BARCODE_UPCE, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "8145713+12345", "", 0, 50, 1, 105, 228, 118, 226, 18, 2, 92 },
+ /*106*/ { BARCODE_UPCE, -1, -1, -1, 0, "8145713+12345", "", 0, 50, 1, 105, 238, 110, 226, 18, 2, 92 }, /* Hide text */
+ /*107*/ { BARCODE_UPCE, BARCODE_QUIET_ZONES, -1, -1, 0, "8145713+12345", "", 0, 50, 1, 105, 238, 110, 226, 18, 2, 92 }, /* Hide text */
+ /*108*/ { BARCODE_UPCE, BARCODE_NO_QUIET_ZONES, -1, -1, 0, "8145713+12345", "", 0, 50, 1, 105, 210, 110, 208, 18, 2, 92 }, /* Hide text */
/*109*/ { BARCODE_POSTNET, -1, -1, -1, -1, "12345", "", 0, 12, 2, 63, 126, 24, 0, 0, 2, 24 },
/*110*/ { BARCODE_POSTNET, BARCODE_QUIET_ZONES, -1, -1, -1, "12345", "", 0, 12, 2, 63, 146, 30.4, 10, 3.2, 2, 24 },
/*111*/ { BARCODE_MSI_PLESSEY, -1, -1, -1, -1, "1234", "", 0, 50, 1, 55, 110, 116.28, 0, 0, 4, 100 },
@@ -2155,27 +2155,27 @@ static void test_text_gap(const testCtx *const p_ctx) {
/* 37*/ { BARCODE_UPCA, -1, -1, -1, 1.6, 0, "01457130763", "", 0, 50, 1, 95, 226, 119.2, 74.0, 118.4, -1, -1 },
/* 38*/ { BARCODE_UPCA, -1, -1, -1, 1.6, 2.5, "01457130763", "", 0, 50, 1, 95, 565, 298, 185.0, 296.0, -1, -1 }, /* Scale */
/* 39*/ { BARCODE_UPCA, -1, -1, -1, 1, 0, "01457130763+10", "", 0, 50, 1, 124, 276, 118, 74.0, 117.2, -1, -1 }, /* Default */
- /* 40*/ { BARCODE_UPCA, -1, -1, -1, 1, 0, "01457130763+10", "", 0, 50, 1, 124, 276, 118, 230.0, 18, 4.0, 82 }, /* Default */
- /* 41*/ { BARCODE_UPCA, -1, -1, -1, 0, 0, "01457130763+10", "", 0, 50, 1, 124, 276, 116, 230.0, 16, 4.0, 84 },
- /* 42*/ { BARCODE_UPCA, -1, -1, -1, 0.1, 0, "01457130763+10", "", 0, 50, 1, 124, 276, 116.2, 230.0, 16.2, 4.0, 83.8 },
- /* 43*/ { BARCODE_UPCA, -1, -1, -1, 0.6, 0, "01457130763+10", "", 0, 50, 1, 124, 276, 117.2, 230.0, 17.2, 4.0, 82.8 },
- /* 44*/ { BARCODE_UPCA, -1, -1, -1, 0.75, 0, "01457130763+10", "", 0, 50, 1, 124, 276, 117.5, 230.0, 17.5, 4.0, 82.5 },
- /* 45*/ { BARCODE_UPCA, -1, -1, -1, 0.9, 0, "01457130763+10", "", 0, 50, 1, 124, 276, 117.8, 230.0, 17.8, 4.0, 82.2 },
+ /* 40*/ { BARCODE_UPCA, -1, -1, -1, 1, 0, "01457130763+10", "", 0, 50, 1, 124, 276, 118, 230.0, 18, 4.0, 92 }, /* Default */
+ /* 41*/ { BARCODE_UPCA, -1, -1, -1, 0, 0, "01457130763+10", "", 0, 50, 1, 124, 276, 116, 230.0, 16, 4.0, 94 },
+ /* 42*/ { BARCODE_UPCA, -1, -1, -1, 0.1, 0, "01457130763+10", "", 0, 50, 1, 124, 276, 116.2, 230.0, 16.2, 4.0, 93.8 },
+ /* 43*/ { BARCODE_UPCA, -1, -1, -1, 0.6, 0, "01457130763+10", "", 0, 50, 1, 124, 276, 117.2, 230.0, 17.2, 4.0, 92.8 },
+ /* 44*/ { BARCODE_UPCA, -1, -1, -1, 0.75, 0, "01457130763+10", "", 0, 50, 1, 124, 276, 117.5, 230.0, 17.5, 4.0, 92.5 },
+ /* 45*/ { BARCODE_UPCA, -1, -1, -1, 0.9, 0, "01457130763+10", "", 0, 50, 1, 124, 276, 117.8, 230.0, 17.8, 4.0, 92.2 },
/* 46*/ { BARCODE_UPCA, -1, -1, -1, 1.1, 0, "01457130763+10", "", 0, 50, 1, 124, 276, 118.2, 74.0, 117.4, -1, -1 },
- /* 47*/ { BARCODE_UPCA, -1, -1, -1, 4.2, 0, "01457130763+10", "", 0, 50, 1, 124, 276, 124.4, 230.0, 24.4, 4.0, 75.6 },
+ /* 47*/ { BARCODE_UPCA, -1, -1, -1, 4.2, 0, "01457130763+10", "", 0, 50, 1, 124, 276, 124.4, 230.0, 24.4, 4.0, 85.6 },
/* 48*/ { BARCODE_UPCA_CC, -1, -1, -1, 1, 0, "01457130763+10", "[91]12", 0, 50, 7, 127, 276, 118, 74.0, 117.2, -1, -1 }, /* Default */
/* 49*/ { BARCODE_UPCA_CC, -1, -1, -1, 0, 0, "01457130763+10", "[91]12", 0, 50, 7, 127, 276, 116, 74.0, 115.2, -1, -1 },
/* 50*/ { BARCODE_UPCA_CC, -1, -1, -1, 0.1, 0, "01457130763+10", "[91]12", 0, 50, 7, 127, 276, 116.2, 74.0, 115.4, -1, -1 },
- /* 51*/ { BARCODE_UPCA_CC, -1, -1, -1, 1, 0, "01457130763+10", "[91]12", 0, 50, 7, 127, 276, 118, 236.0, 42, 4.0, 58 }, /* Default */
- /* 52*/ { BARCODE_UPCA_CC, -1, -1, -1, 0, 0, "01457130763+10", "[91]12", 0, 50, 7, 127, 276, 116, 236.0, 40, 4.0, 60 },
- /* 53*/ { BARCODE_UPCA_CC, -1, -1, -1, 0.1, 0, "01457130763+10", "[91]12", 0, 50, 7, 127, 276, 116.2, 236.0, 40.2, 4.0, 59.8 },
- /* 54*/ { BARCODE_UPCA_CC, -1, -1, -1, 0.6, 0, "01457130763+10", "[91]12", 0, 50, 7, 127, 276, 117.2, 236.0, 41.2, 4.0, 58.8 },
- /* 55*/ { BARCODE_UPCA_CC, -1, -1, -1, 0.75, 0, "01457130763+10", "[91]12", 0, 50, 7, 127, 276, 117.5, 236.0, 41.5, 4.0, 58.5 },
- /* 56*/ { BARCODE_UPCA_CC, -1, -1, -1, 1.1, 0, "01457130763+10", "[91]12", 0, 50, 7, 127, 276, 118.2, 236.0, 42.2, 4.0, 57.8 },
- /* 57*/ { BARCODE_UPCA_CC, -1, -1, -1, 1.5, 0, "01457130763+10", "[91]12", 0, 50, 7, 127, 276, 119.0, 236.0, 43.0, 4.0, 57.0 },
- /* 58*/ { BARCODE_UPCA_CC, -1, -1, 0, 1, 0, "01457130763+10", "[91]12", 0, 50, 7, 127, 276, 110, 236.0, 42, 4.0, 58 }, /* Hide text default */
- /* 59*/ { BARCODE_UPCA_CC, -1, -1, 0, 0, 0, "01457130763+10", "[91]12", 0, 50, 7, 127, 276, 110, 236.0, 40, 4.0, 60 }, /* Hide text */
- /* 60*/ { BARCODE_UPCA_CC, -1, -1, 0, 1.5, 0, "01457130763+10", "[91]12", 0, 50, 7, 127, 276, 110, 236.0, 43.0, 4.0, 57.0 }, /* Hide text */
+ /* 51*/ { BARCODE_UPCA_CC, -1, -1, -1, 1, 0, "01457130763+10", "[91]12", 0, 50, 7, 127, 276, 118, 236.0, 42, 4.0, 68 }, /* Default */
+ /* 52*/ { BARCODE_UPCA_CC, -1, -1, -1, 0, 0, "01457130763+10", "[91]12", 0, 50, 7, 127, 276, 116, 236.0, 40, 4.0, 70 },
+ /* 53*/ { BARCODE_UPCA_CC, -1, -1, -1, 0.1, 0, "01457130763+10", "[91]12", 0, 50, 7, 127, 276, 116.2, 236.0, 40.2, 4.0, 69.8 },
+ /* 54*/ { BARCODE_UPCA_CC, -1, -1, -1, 0.6, 0, "01457130763+10", "[91]12", 0, 50, 7, 127, 276, 117.2, 236.0, 41.2, 4.0, 68.8 },
+ /* 55*/ { BARCODE_UPCA_CC, -1, -1, -1, 0.75, 0, "01457130763+10", "[91]12", 0, 50, 7, 127, 276, 117.5, 236.0, 41.5, 4.0, 68.5 },
+ /* 56*/ { BARCODE_UPCA_CC, -1, -1, -1, 1.1, 0, "01457130763+10", "[91]12", 0, 50, 7, 127, 276, 118.2, 236.0, 42.2, 4.0, 67.8 },
+ /* 57*/ { BARCODE_UPCA_CC, -1, -1, -1, 1.5, 0, "01457130763+10", "[91]12", 0, 50, 7, 127, 276, 119.0, 236.0, 43.0, 4.0, 67.0 },
+ /* 58*/ { BARCODE_UPCA_CC, -1, -1, 0, 1, 0, "01457130763+10", "[91]12", 0, 50, 7, 127, 276, 110, 236.0, 42, 4.0, 68 }, /* Hide text default */
+ /* 59*/ { BARCODE_UPCA_CC, -1, -1, 0, 0, 0, "01457130763+10", "[91]12", 0, 50, 7, 127, 276, 110, 236.0, 40, 4.0, 70 }, /* Hide text */
+ /* 60*/ { BARCODE_UPCA_CC, -1, -1, 0, 1.5, 0, "01457130763+10", "[91]12", 0, 50, 7, 127, 276, 110, 236.0, 43.0, 4.0, 67.0 }, /* Hide text */
};
int data_size = ARRAY_SIZE(data);
int i, length, ret;
diff --git a/backend/tests/testcommon.c b/backend/tests/testcommon.c
index c395b7b0..b467bd0b 100644
--- a/backend/tests/testcommon.c
+++ b/backend/tests/testcommon.c
@@ -2524,7 +2524,7 @@ static char *testUtilBwippEscape(char *bwipp_data, int bwipp_data_size, const ch
sprintf(b, "^%03d", val);
b += 4;
} else {
- if (d + 1 < de && ((*(d + 1) >= 'A' && *(d + 1) <= 'C') || *(d + 1) == '1')) {
+ if (*d == '^' && d + 1 < de && ((*(d + 1) >= 'A' && *(d + 1) <= 'C') || *(d + 1) == '1')) {
d++;
if (*d == '1') {
if (b + 5 >= be) {
@@ -2542,7 +2542,7 @@ static char *testUtilBwippEscape(char *bwipp_data, int bwipp_data_size, const ch
}
sprintf(b, "^%03d^%03d", '\\', *d);
b += 8;
- if (*d == '^') {
+ if (*d == '^' && d + 1 < de && *(d + 1) == '^') {
d++;
}
}
@@ -3363,33 +3363,38 @@ int testUtilBwipp(int index, const struct zint_symbol *symbol, int option_1, int
return -1;
}
- for (r = 0; r < symbol->rows; r++) {
- if (b + symbol->width > be) {
- fprintf(stderr, "i:%d testUtilBwipp: row %d, width %d, row width iteration overrun (%s)\n",
- index, r, symbol->width, cmd);
- testutil_pclose(fp);
- return -1;
- }
- cnt = (int) fread(b, 1, symbol->width, fp);
- if (cnt != symbol->width) {
- fprintf(stderr, "i:%d testUtilBwipp: failed to read row %d of %d, symbol->width %d bytes, cnt %d (%s)\n",
- index, r + 1, symbol->rows, symbol->width, cnt, cmd);
- testutil_pclose(fp);
- return -1;
- }
+ if (symbol->rows == 0) { /* For testing BWIPP against ZXingC++ (`ZBarcode_Encode()` not called) */
+ cnt = (int) fread(b, 1, buffer_size - 1, fp); /* Just read the whole output */
b += cnt;
- for (h = bwipp_row_height[r]; h > 1; h--) { /* Ignore row copies if any */
- cnt = (int) fread(b, 1, symbol->width, fp);
- if (cnt != symbol->width) {
- fprintf(stderr,
- "i:%d testUtilBwipp: failed to read/ignore symbol->width %d bytes, cnt %d, h %d"
- ", bwipp_row_height[%d] %d, symbol->row_height[%d] %g (%s)\n",
- index, symbol->width, cnt, h, r, bwipp_row_height[r], r, symbol->row_height[r], cmd);
+ } else {
+ for (r = 0; r < symbol->rows; r++) {
+ if (b + symbol->width > be) {
+ fprintf(stderr, "i:%d testUtilBwipp: row %d, width %d, row width iteration overrun (%s)\n",
+ index, r, symbol->width, cmd);
testutil_pclose(fp);
return -1;
}
- if (h * 2 == bwipp_row_height[r]) { /* Hack to use middle row (avoids add-on text offsets) */
- memcpy(b - cnt, b, cnt);
+ cnt = (int) fread(b, 1, symbol->width, fp);
+ if (cnt != symbol->width) {
+ fprintf(stderr, "i:%d testUtilBwipp: failed to read row %d of %d, symbol->width %d bytes, cnt %d (%s)\n",
+ index, r + 1, symbol->rows, symbol->width, cnt, cmd);
+ testutil_pclose(fp);
+ return -1;
+ }
+ b += cnt;
+ for (h = bwipp_row_height[r]; h > 1; h--) { /* Ignore row copies if any */
+ cnt = (int) fread(b, 1, symbol->width, fp);
+ if (cnt != symbol->width) {
+ fprintf(stderr,
+ "i:%d testUtilBwipp: failed to read/ignore symbol->width %d bytes, cnt %d, h %d"
+ ", bwipp_row_height[%d] %d, symbol->row_height[%d] %g (%s)\n",
+ index, symbol->width, cnt, h, r, bwipp_row_height[r], r, symbol->row_height[r], cmd);
+ testutil_pclose(fp);
+ return -1;
+ }
+ if (h * 2 == bwipp_row_height[r]) { /* Hack to use middle row (avoids add-on text offsets) */
+ memcpy(b - cnt, b, cnt);
+ }
}
}
}
diff --git a/backend/tests/tools/bwipp_dump.ps.tar.xz b/backend/tests/tools/bwipp_dump.ps.tar.xz
index bf098138..af5948b9 100644
Binary files a/backend/tests/tools/bwipp_dump.ps.tar.xz and b/backend/tests/tools/bwipp_dump.ps.tar.xz differ
diff --git a/backend/vector.c b/backend/vector.c
index eb5f7d74..fefdc25b 100644
--- a/backend/vector.c
+++ b/backend/vector.c
@@ -612,9 +612,9 @@ INTERNAL int plot_vector(struct zint_symbol *symbol, int rotate_angle, int file_
}
addon_row_yposn = yposn + font_height + text_gap + antialias_fudge;
addon_row_height = row_height - (addon_row_yposn - yposn);
- if (upceanflag != 12 && upceanflag != 6) { /* UPC-A/E add-ons don't descend */
- addon_row_height += guard_descent;
- }
+ /* Following ISO/IEC 15420:2009 Figure 5 — UPC-A bar code symbol with 2-digit add-on (contrary to
+ GS1 General Specs v24.0 Figure 5.2.6.6-5) descends for all including UPC-A/E */
+ addon_row_height += guard_descent;
if (addon_row_height < 0.5f) {
addon_row_height = 0.5f;
}
@@ -750,7 +750,9 @@ INTERNAL int plot_vector(struct zint_symbol *symbol, int rotate_angle, int file_
textwidth = 6.0f * 8.5f;
if (!vector_add_string(symbol, symbol->text + 1, 6, text_xposn, text_yposn, font_height, textwidth,
0 /*centre align*/, &last_string)) return ZINT_ERROR_MEMORY;
- text_xposn = (51.0f - 0.35f) + 3.0f + xoffset_comp;
+ /* TODO: GS1 General Specs v24.0 5.2.5 Human readable interpretation says 3X but this could cause
+ digit's righthand to touch any add-on, now that they descend, so use 2X, until clarified */
+ text_xposn = (51.0f - 0.35f) + 2.0f + xoffset_comp;
textwidth = 6.2f;
if (!vector_add_string(symbol, symbol->text + 7, 1, text_xposn, text_yposn, upcae_outside_font_height,
textwidth, 1 /*left align*/, &last_string)) return ZINT_ERROR_MEMORY;
@@ -812,7 +814,9 @@ INTERNAL int plot_vector(struct zint_symbol *symbol, int rotate_angle, int file_
text_xposn = 67.0f + xoffset_comp;
if (!vector_add_string(symbol, symbol->text + 6, 5, text_xposn, text_yposn, font_height, textwidth,
0 /*centre align*/, &last_string)) return ZINT_ERROR_MEMORY;
- text_xposn = (95.0f - 0.35f) + 5.0f + xoffset_comp;
+ /* TODO: GS1 General Specs v24.0 5.2.5 Human readable interpretation says 5X but this could cause
+ digit's righthand to touch any add-on, now that they descend, so use 4X, until clarified */
+ text_xposn = (95.0f - 0.35f) + 4.0f + xoffset_comp;
textwidth = 6.2f;
if (!vector_add_string(symbol, symbol->text + 11, 1, text_xposn, text_yposn,
upcae_outside_font_height, textwidth, 1 /*left align*/, &last_string)) {