From c9f0e61d785f2a1376e83d302fc6b96ba15f979c Mon Sep 17 00:00:00 2001 From: gitlost Date: Fri, 15 Dec 2023 18:52:41 +0000 Subject: [PATCH] emf/eps: fix previous `gws_left/right_fudge` hack --- backend/emf.c | 6 +- backend/ps.c | 6 +- .../emf/ean13_5addon_ggs_5.2.2.5.2-2_gws.emf | Bin 1968 -> 1968 bytes .../data/emf/ean13_ggs_5.2.2.1-1_gws.emf | Bin 1496 -> 1496 bytes .../tests/data/emf/ean8_gss_5.2.2.2-1_gws.emf | Bin 1296 -> 1296 bytes .../data/emf/ean8_gss_5.2.2.2-1_gws_sc2_5.emf | Bin 0 -> 1296 bytes .../data/emf/ean8_gss_5.2.2.2-1_gws_wsw3.emf | Bin 0 -> 1296 bytes .../emf/upca_2addon_ggs_5.2.6.6-5_gws.emf | Bin 1952 -> 1952 bytes .../upca_2addon_ggs_5.2.6.6-5_gws_wsw1h2.emf | Bin 0 -> 1952 bytes backend/tests/data/emf/upce_2addon_gws.emf | Bin 1552 -> 1552 bytes .../data/emf/upce_2addon_small_bold_gws.emf | Bin 1552 -> 1552 bytes .../data/eps/ean8_gss_5.2.2.2-1_gws_wsw3.eps | 45 +++++++++ ...ca_2addon_ggs_5.2.6.6-5_gws_rotate_180.eps | 2 +- ...ddon_ggs_5.2.6.6-5_gws_rotate_270_wsw4.eps | 87 ++++++++++++++++++ .../upca_2addon_ggs_5.2.6.6-5_gws_wsw1h3.eps | 69 ++++++++++++++ backend/tests/test_emf.c | 81 ++++++++-------- backend/tests/test_ps.c | 81 ++++++++-------- 17 files changed, 296 insertions(+), 81 deletions(-) create mode 100644 backend/tests/data/emf/ean8_gss_5.2.2.2-1_gws_sc2_5.emf create mode 100644 backend/tests/data/emf/ean8_gss_5.2.2.2-1_gws_wsw3.emf create mode 100644 backend/tests/data/emf/upca_2addon_ggs_5.2.6.6-5_gws_wsw1h2.emf create mode 100644 backend/tests/data/eps/ean8_gss_5.2.2.2-1_gws_wsw3.eps create mode 100644 backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5_gws_rotate_270_wsw4.eps create mode 100644 backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5_gws_wsw1h3.eps diff --git a/backend/emf.c b/backend/emf.c index 2a023374..8dfe36c9 100644 --- a/backend/emf.c +++ b/backend/emf.c @@ -656,9 +656,11 @@ INTERNAL int emf_plot(struct zint_symbol *symbol, int rotate_angle) { text[this_text].ey_scale = 1.0f; /* Unhack the guard whitespace `gws_left_fudge`/`gws_right_fudge` hack */ if (upcean && string->halign == 1 && string->text[0] == '<') { - text[this_text].w_emr_text.reference.x = 0; + const float gws_left_fudge = symbol->scale < 0.1f ? 0.1f : symbol->scale; /* 0.5 * 2 * scale */ + text[this_text].w_emr_text.reference.x = (int32_t) (string->x + gws_left_fudge); } else if (upcean && string->halign == 2 && string->text[0] == '>') { - text[this_text].w_emr_text.reference.x = (int32_t) (symbol->vector->width - 1); + const float gws_right_fudge = symbol->scale < 0.1f ? 0.1f : symbol->scale; /* 0.5 * 2 * scale */ + text[this_text].w_emr_text.reference.x = (int32_t) (string->x - gws_right_fudge); } else { text[this_text].w_emr_text.reference.x = (int32_t) string->x; } diff --git a/backend/ps.c b/backend/ps.c index be67d3d7..b6500792 100644 --- a/backend/ps.c +++ b/backend/ps.c @@ -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); } diff --git a/backend/tests/data/emf/ean13_5addon_ggs_5.2.2.5.2-2_gws.emf b/backend/tests/data/emf/ean13_5addon_ggs_5.2.2.5.2-2_gws.emf index 5eaada75f56a5e73edaadb9e35a021394eb49bd9..1a88311fa29dfe97110c24cc0ce0dfd70f78c680 100644 GIT binary patch delta 13 UcmdnMzkz>40Xw7D40Xw7T?$3|7WRlN(voCm&#y002Tp2BrW2 delta 17 Zcmcb?eS>?$3|7X6lN(voCm&#y002Tg2BiQ1 diff --git a/backend/tests/data/emf/ean8_gss_5.2.2.2-1_gws.emf b/backend/tests/data/emf/ean8_gss_5.2.2.2-1_gws.emf index febb44cd2332ecbfc1282df1bf820ad74cf49b43..253df5dce4a9584cce2f61f0843da0dda97a2f67 100644 GIT binary patch delta 13 VcmbQhHGylx1s29dlP|K^0{|my1p@#8 delta 13 VcmbQhHGylx1s2AIlP|K^0{|mt1p)v7 diff --git a/backend/tests/data/emf/ean8_gss_5.2.2.2-1_gws_sc2_5.emf b/backend/tests/data/emf/ean8_gss_5.2.2.2-1_gws_sc2_5.emf new file mode 100644 index 0000000000000000000000000000000000000000..c3c09f8cba2e5d25e9dbd890bde909b44c24d353 GIT binary patch literal 1296 zcma)*J1j&&6o&uxOhh(hMKq4xyI$ zTvQUBm9UOOl#r#jP{b~_D}fPay^N9iMK+gu255ILb`};RC0I-k=b}D3 z!3E>lke2Ir`LuE#KE7#-pHsf-@ipa}9xo|B_V~H-OOM|uzw`LL@&}JUDu43$v+@^? z?!I1?zj^#!`3FaLzn{v#JT5V!fOg~MU!o*Omv<=d_PF$}DDUwp<6vfvaV?5AArb$AR7$Wj9NC^pfpd?B1fDoD{8DGhR=0TDN50d6D@WQ`% zt$o|OInD!j)w*Y&-`%t4+_TRK02FD{7lSLCaGY!estrJHX>Az@&|D7;kSCoS3BT!U zx|43DUFFY#^eWIo*hB|(AKgZq!Z1XN6XTL&5}v0!=mgCrL^U`>+TinquA?&%sXbn6 zg(_w2ql7Ys=p$U<6vws17*Q{CWc?zGWj%wm`z^K?mLp5B99v(OtmJU}eY?kVoQt~Y zL)z-}2&DRHmrHL%!?eo_5oJF;KBIiz;|t0cJ-(ux?fg}LUAgqa{ohUHTO8f*-B!Ni z@m=M69Njtx%B5p2KT}@x_@#0=lWzX4@;i^;E3bI`QTda{pOwFO{7v~gNB4U_lvkD8 z*^o0Uy|;6f)mWJ9o$V__@Qy@E$OI2_;uIsfuX4tuC$21CnDp6dcQKaQVw2^%wWs(} uYA5NxYENSVBN&ZU^Co7^F^r?Y(`sv$dl6?pKDGXT`!UPBG@YSM68`|`dVgjB literal 0 HcmV?d00001 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 f55ef801d4471637215305a3fdf86543893e1df2..409f99b2be770da59c96279282e7409d40c500d0 100644 GIT binary patch delta 13 UcmZ3$zkq*30z0F~R delta 13 UcmZ3$zkq*30z0Gd+B1=broCw+7%W6}GGfT!{t8 zg^PjyE?{8KzEPlt`}2Vj^3K9X(_X%JmE#6#sX$>Y$Xne14GY)6^WQn<{PkpX2pO9LG2&v7S1K37o;H(zWe8^30`YPxAhs zc~&yE`Xr0F_Pv%Wdlo$pA8j>!RG;c>P!k2$`{I3x516k=Tz!}Sn#9+c4{}uRBk!#BZ5TCw|-fPU3gX?K~*#R;OfoSMxqf-{=?>#(&<7>23qpc1jC4yGSuC_EM#Vzt|uZv6Zh%?2q)T z5_>cKVn4bIk*D8zj&KZ%n#w(>ZsqBuX4}I?3}F+7p?s>pU0i+JRpK_W1zWLgrbku! k@{@6wP};+6^$xMt=tb4@Z15lzyWM$?(5IW~p~5u(3(fY;f&c&j literal 0 HcmV?d00001 diff --git a/backend/tests/data/emf/upce_2addon_gws.emf b/backend/tests/data/emf/upce_2addon_gws.emf index cf6fe28a1410e58750f59ac8e5d9b9db2fb08c2b..40cc781b24c08d4ce3b050c15bd9cb6a6e0d394a 100644 GIT binary patch delta 13 VcmbQhGl6Hr1y;r#lP|K`0{|or1s?za delta 13 VcmbQhGl6Hr1y;uGlP|K`0{|om1s(tZ 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 ebe907a7a9aba42c9695d7aaa90982130d6dd121..28c61e7ed2495bbcecc9363aa25c0a89888d844b 100644 GIT binary patch delta 13 VcmbQhGl6Hr1y;r#lP|K`0{|or1s?za delta 13 VcmbQhGl6Hr1y;uGlP|K`0{|om1s(tZ diff --git a/backend/tests/data/eps/ean8_gss_5.2.2.2-1_gws_wsw3.eps b/backend/tests/data/eps/ean8_gss_5.2.2.2-1_gws_wsw3.eps new file mode 100644 index 00000000..47e782e4 --- /dev/null +++ b/backend/tests/data/eps/ean8_gss_5.2.2.2-1_gws_wsw3.eps @@ -0,0 +1,45 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: Zint 2.12.0.9 +%%Title: Zint Generated Symbol +%%Pages: 0 +%%BoundingBox: 0 0 174 118 +%%EndComments +/R { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def +/I { 2 copy } bind def +1 1 1 setrgbcolor +118 0 0 174 R +0 0 0 setrgbcolor +110 8 I 20 2 R +24 2 R +100 18 I 32 2 R +I 36 4 R +I 42 4 R +I 52 2 R +I 60 4 R +I 66 2 R +I 72 4 R +80 2 R +110 8 I 84 2 R +88 2 R +100 18 I 92 4 R +I 98 4 R +I 106 2 R +I 116 2 R +I 120 2 R +I 124 6 R +I 134 2 R +138 2 R +110 8 I 148 2 R +152 2 R +/Helvetica findfont 21.4 scalefont setfont + 6 0.8 moveto + (<) show + 55 0.8 moveto + (9501) stringwidth pop -2 div 0 rmoveto + (9501) show + 119 0.8 moveto + (2346) stringwidth pop -2 div 0 rmoveto + (2346) show + 168 0.8 moveto + (>) stringwidth pop neg 0 rmoveto + (>) show 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 5569dd13..499dec83 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 @@ -79,7 +79,7 @@ I 20 2 R (24) stringwidth pop -2 div 0 rmoveto (24) show grestore - 276 15.6 moveto + -2 15.6 moveto gsave 180 rotate (>) stringwidth pop neg 0 rmoveto 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 new file mode 100644 index 00000000..8bcfc4de --- /dev/null +++ b/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5_gws_rotate_270_wsw4.eps @@ -0,0 +1,87 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: Zint 2.12.0.9 +%%Title: Zint Generated Symbol +%%Pages: 0 +%%BoundingBox: 0 0 118 292 +%%EndComments +/R { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def +/I { 2 copy } bind def +1 1 1 setrgbcolor +292 0 0 118 R +0 0 0 setrgbcolor +2 26 0 110 R +2 30 0 110 R +4 38 0 110 R +2 44 0 110 R +4 50 0 100 R +2 58 0 100 R +2 64 0 100 R +4 70 0 100 R +8 76 0 100 R +2 86 0 100 R +2 90 0 100 R +4 98 0 100 R +4 104 0 100 R +2 114 0 100 R +2 118 0 110 R +2 122 0 110 R +2 126 0 100 R +2 130 0 100 R +2 140 0 100 R +2 148 0 100 R +2 154 0 100 R +2 160 0 100 R +6 168 0 100 R +2 176 0 100 R +6 182 0 100 R +2 192 0 100 R +2 196 0 110 R +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 +/Helvetica findfont 14.98 scalefont setfont + 117.2 16.7 moveto + gsave + 90 rotate + (0) stringwidth pop neg 0 rmoveto + (0) show + grestore +/Helvetica findfont 21.4 scalefont setfont + 117.2 82 moveto + gsave + 90 rotate + (12345) stringwidth pop -2 div 0 rmoveto + (12345) show + grestore + 117.2 160 moveto + gsave + 90 rotate + (67890) stringwidth pop -2 div 0 rmoveto + (67890) show + grestore +/Helvetica findfont 14.98 scalefont setfont + 117.2 225.3 moveto + gsave + 90 rotate + (5) show + grestore +/Helvetica findfont 21.4 scalefont setfont + 15.6 254 moveto + gsave + 90 rotate + (24) stringwidth pop -2 div 0 rmoveto + (24) show + grestore + 14.6 285 moveto + gsave + 90 rotate + (>) stringwidth pop neg 0 rmoveto + (>) show + grestore 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 new file mode 100644 index 00000000..c204b892 --- /dev/null +++ b/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5_gws_wsw1h3.eps @@ -0,0 +1,69 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: Zint 2.12.0.9 +%%Title: Zint Generated Symbol +%%Pages: 0 +%%BoundingBox: 0 0 280 130 +%%EndComments +/R { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def +/I { 2 copy } bind def +1 1 1 setrgbcolor +130 0 0 280 R +0 0 0 setrgbcolor +110 14 I 20 2 R +I 24 2 R +I 32 4 R +38 2 R +100 24 I 44 4 R +I 52 2 R +I 58 2 R +I 64 4 R +I 70 8 R +I 80 2 R +I 84 2 R +I 92 4 R +I 98 4 R +108 2 R +110 14 I 112 2 R +116 2 R +100 24 I 120 2 R +I 124 2 R +I 134 2 R +I 142 2 R +I 148 2 R +I 154 2 R +I 162 6 R +I 170 2 R +I 176 6 R +186 2 R +110 14 I 190 2 R +I 196 6 R +I 204 2 R +208 2 R +82 24 I 228 2 R +I 232 4 R +I 240 2 R +I 246 4 R +I 252 2 R +I 256 2 R +264 4 R +/Helvetica findfont 14.98 scalefont setfont + 10.7 6.8 moveto + (0) stringwidth pop neg 0 rmoveto + (0) show +/Helvetica findfont 21.4 scalefont setfont + 76 6.8 moveto + (12345) stringwidth pop -2 div 0 rmoveto + (12345) show + 154 6.8 moveto + (67890) stringwidth pop -2 div 0 rmoveto + (67890) show +/Helvetica findfont 14.98 scalefont setfont + 219.3 6.8 moveto + (5) show +/Helvetica findfont 21.4 scalefont setfont + 248 108.4 moveto + (24) stringwidth pop -2 div 0 rmoveto + (24) show + 278 108.4 moveto + (>) stringwidth pop neg 0 rmoveto + (>) show diff --git a/backend/tests/test_emf.c b/backend/tests/test_emf.c index 3443e1fe..ad590579 100644 --- a/backend/tests/test_emf.c +++ b/backend/tests/test_emf.c @@ -44,6 +44,7 @@ static void test_print(const testCtx *const p_ctx) { int whitespace_height; int option_1; int option_2; + float scale; float dpmm; char *fgcolour; char *bgcolour; @@ -53,43 +54,46 @@ static void test_print(const testCtx *const p_ctx) { char *comment; }; struct item data[] = { - /* 0*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, 0, "", "", 0, "Égjpqy", "code128_egrave_bold.emf", "" }, - /* 1*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, 100.0f / 25.4f, "", "", 0, "Égjpqy", "code128_egrave_bold_100dpi.emf", "" }, - /* 2*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, 150.0f / 25.4f, "", "", 0, "Égjpqy", "code128_egrave_bold_150dpi.emf", "" }, - /* 3*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, 300.0f / 25.4f, "", "", 0, "Égjpqy", "code128_egrave_bold_300dpi.emf", "" }, - /* 4*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, 400.0f / 25.4f, "", "", 0, "Égjpqy", "code128_egrave_bold_400dpi.emf", "" }, - /* 5*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, 1200.0f / 25.4f, "", "", 0, "Égjpqy", "code128_egrave_bold_1200dpi.emf", "" }, - /* 6*/ { BARCODE_TELEPEN, -1, -1, -1, -1, -1, -1, -1, 0, "147AD0", "FC9630", 0, "123", "telenum_fg_bg.emf", "" }, - /* 7*/ { BARCODE_TELEPEN, -1, -1, -1, -1, -1, -1, -1, 150.0f / 25.4f, "147AD0", "FC9630", 0, "123", "telenum_fg_bg_150dpi.emf", "" }, - /* 8*/ { BARCODE_ULTRA, -1, -1, -1, 5, -1, -1, -1, 0, "147AD0", "FC9630", 0, "123", "ultracode_fg_bg.emf", "" }, - /* 9*/ { BARCODE_ULTRA, -1, 2, BARCODE_BOX, 2, 2, -1, -1, 0, "FF0000", "0000FF", 0, "123", "ultracode_fg_bg_box2.emf", "" }, - /* 10*/ { BARCODE_ULTRA, -1, 2, BARCODE_BOX, 2, 2, -1, -1, 600.0f / 25.4f, "FF0000", "0000FF", 0, "123", "ultracode_fg_bg_box2_600dpi.emf", "" }, - /* 11*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501101531000", "ean13_ggs_5.2.2.1-1.emf", "" }, - /* 12*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, "", "", 0, "9501101531000", "ean13_ggs_5.2.2.1-1_gws.emf", "" }, - /* 13*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9780877799306+54321", "ean13_5addon_ggs_5.2.2.5.2-2.emf", "" }, - /* 14*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, "", "", 0, "9780877799306+54321", "ean13_5addon_ggs_5.2.2.5.2-2_gws.emf", "" }, - /* 15*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "210987654321+54321", "ean13_5addon_#185.emf", "#185 Byte count, font data, HeaderExtension1/2" }, - /* 16*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1.emf", "" }, - /* 17*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws.emf", "" }, - /* 18*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5.emf", "" }, - /* 19*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_gws.emf", "" }, - /* 20*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "0123456+12", "upce_2addon.emf", "" }, - /* 21*/ { BARCODE_UPCE, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, "", "", 0, "0123456+12", "upce_2addon_gws.emf", "" }, - /* 22*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, 150.f / 25.4f, "", "", 0, "0123456+12", "upce_2addon_150dpi.emf", "" }, - /* 23*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | BOLD_TEXT, -1, -1, -1, -1, 0, "", "", 0, "0123456+12", "upce_2addon_small_bold.emf", "" }, - /* 24*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | BOLD_TEXT | EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, "", "", 0, "0123456+12", "upce_2addon_small_bold_gws.emf", "" }, - /* 25*/ { BARCODE_ITF14, -1, -1, BOLD_TEXT, -1, -1, -1, -1, 0, "", "", 0, "123", "itf14_bold.emf", "" }, - /* 26*/ { BARCODE_ITF14, -1, -1, BOLD_TEXT, -1, -1, -1, -1, 600.f / 25.4f, "", "", 0, "123", "itf14_bold_600dpi.emf", "" }, - /* 27*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 90, "123", "code39_rotate_90.emf", "" }, - /* 28*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, -1, -1, 300.f / 25.4f, "", "", 90, "123", "code39_rotate_90_300dpi.emf", "" }, - /* 29*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 180, "123", "code39_rotate_180.emf", "" }, - /* 30*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 270, "123", "code39_rotate_270.emf", "" }, - /* 31*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, 0, "E0E0E0", "700070", 0, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", "maxicode_#185.emf", "#185 Maxicode scaling" }, - /* 32*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, 150.f / 25.4f, "E0E0E0", "700070", 0, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", "maxicode_#185_150dpi.emf", "#185 Maxicode scaling" }, - /* 33*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, 600.f / 25.4f, "E0E0E0", "700070", 0, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", "maxicode_#185_600dpi.emf", "#185 Maxicode scaling" }, - /* 34*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, 0, "", "FFFFFF00", 90, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", "maxicode_rotate_90_nobg.emf", "" }, - /* 35*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, 300.0f, "", "FFFFFF00", 90, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", "maxicode_rotate_90_nobg_300dpi.emf", "" }, - /* 36*/ { BARCODE_UPU_S10, -1, -1, CMYK_COLOUR, -1, -1, -1, -1, 0, "71,0,40,44", "FFFFFF00", 0, "QA47312482PS", "upu_s10_cmyk_nobg.emf", "" }, + /* 0*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "Égjpqy", "code128_egrave_bold.emf", "" }, + /* 1*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, 0.0f, 100.0f / 25.4f, "", "", 0, "Égjpqy", "code128_egrave_bold_100dpi.emf", "" }, + /* 2*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, 0.0f, 150.0f / 25.4f, "", "", 0, "Égjpqy", "code128_egrave_bold_150dpi.emf", "" }, + /* 3*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, 0.0f, 300.0f / 25.4f, "", "", 0, "Égjpqy", "code128_egrave_bold_300dpi.emf", "" }, + /* 4*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, 0.0f, 400.0f / 25.4f, "", "", 0, "Égjpqy", "code128_egrave_bold_400dpi.emf", "" }, + /* 5*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, 0.0f, 1200.0f / 25.4f, "", "", 0, "Égjpqy", "code128_egrave_bold_1200dpi.emf", "" }, + /* 6*/ { BARCODE_TELEPEN, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "147AD0", "FC9630", 0, "123", "telenum_fg_bg.emf", "" }, + /* 7*/ { BARCODE_TELEPEN, -1, -1, -1, -1, -1, -1, -1, 0.0f, 150.0f / 25.4f, "147AD0", "FC9630", 0, "123", "telenum_fg_bg_150dpi.emf", "" }, + /* 8*/ { BARCODE_ULTRA, -1, -1, -1, 5, -1, -1, -1, 0.0f, 0, "147AD0", "FC9630", 0, "123", "ultracode_fg_bg.emf", "" }, + /* 9*/ { BARCODE_ULTRA, -1, 2, BARCODE_BOX, 2, 2, -1, -1, 0.0f, 0, "FF0000", "0000FF", 0, "123", "ultracode_fg_bg_box2.emf", "" }, + /* 10*/ { BARCODE_ULTRA, -1, 2, BARCODE_BOX, 2, 2, -1, -1, 0.0f, 600.0f / 25.4f, "FF0000", "0000FF", 0, "123", "ultracode_fg_bg_box2_600dpi.emf", "" }, + /* 11*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "9501101531000", "ean13_ggs_5.2.2.1-1.emf", "" }, + /* 12*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "9501101531000", "ean13_ggs_5.2.2.1-1_gws.emf", "" }, + /* 13*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "9780877799306+54321", "ean13_5addon_ggs_5.2.2.5.2-2.emf", "" }, + /* 14*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "9780877799306+54321", "ean13_5addon_ggs_5.2.2.5.2-2_gws.emf", "" }, + /* 15*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "210987654321+54321", "ean13_5addon_#185.emf", "#185 Byte count, font data, HeaderExtension1/2" }, + /* 16*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1.emf", "" }, + /* 17*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws.emf", "" }, + /* 18*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, 3, -1, -1, -1, 0.0f, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws_wsw3.emf", "" }, + /* 19*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 2.5f, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws_sc2_5.emf", "" }, + /* 20*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5.emf", "" }, + /* 21*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_gws.emf", "" }, + /* 22*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, 1, 2, -1, -1, 0.0f, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_gws_wsw1h2.emf", "" }, + /* 23*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "0123456+12", "upce_2addon.emf", "" }, + /* 24*/ { BARCODE_UPCE, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "0123456+12", "upce_2addon_gws.emf", "" }, + /* 25*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, 0.0f, 150.f / 25.4f, "", "", 0, "0123456+12", "upce_2addon_150dpi.emf", "" }, + /* 26*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | BOLD_TEXT, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "0123456+12", "upce_2addon_small_bold.emf", "" }, + /* 27*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | BOLD_TEXT | EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "0123456+12", "upce_2addon_small_bold_gws.emf", "" }, + /* 28*/ { BARCODE_ITF14, -1, -1, BOLD_TEXT, -1, -1, -1, -1, 0.0f, 0, "", "", 0, "123", "itf14_bold.emf", "" }, + /* 29*/ { BARCODE_ITF14, -1, -1, BOLD_TEXT, -1, -1, -1, -1, 0.0f, 600.f / 25.4f, "", "", 0, "123", "itf14_bold_600dpi.emf", "" }, + /* 30*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 90, "123", "code39_rotate_90.emf", "" }, + /* 31*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, -1, -1, 0.0f, 300.f / 25.4f, "", "", 90, "123", "code39_rotate_90_300dpi.emf", "" }, + /* 32*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 180, "123", "code39_rotate_180.emf", "" }, + /* 33*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "", 270, "123", "code39_rotate_270.emf", "" }, + /* 34*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "E0E0E0", "700070", 0, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", "maxicode_#185.emf", "#185 Maxicode scaling" }, + /* 35*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, 0.0f, 150.f / 25.4f, "E0E0E0", "700070", 0, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", "maxicode_#185_150dpi.emf", "#185 Maxicode scaling" }, + /* 36*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, 0.0f, 600.f / 25.4f, "E0E0E0", "700070", 0, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", "maxicode_#185_600dpi.emf", "#185 Maxicode scaling" }, + /* 37*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0, "", "FFFFFF00", 90, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", "maxicode_rotate_90_nobg.emf", "" }, + /* 38*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, 0.0f, 300.0f, "", "FFFFFF00", 90, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", "maxicode_rotate_90_nobg_300dpi.emf", "" }, + /* 39*/ { BARCODE_UPU_S10, -1, -1, CMYK_COLOUR, -1, -1, -1, -1, 0.0f, 0, "71,0,40,44", "FFFFFF00", 0, "QA47312482PS", "upu_s10_cmyk_nobg.emf", "" }, }; int data_size = ARRAY_SIZE(data); int i, length, ret; @@ -134,6 +138,9 @@ static void test_print(const testCtx *const p_ctx) { if (data[i].whitespace_height != -1) { symbol->whitespace_height = data[i].whitespace_height; } + if (data[i].scale) { + symbol->scale = data[i].scale; + } if (data[i].dpmm) { symbol->dpmm = data[i].dpmm; symbol->scale = ZBarcode_Scale_From_XdimDp(symbol->symbology, ZBarcode_Default_Xdim(symbol->symbology), symbol->dpmm, "EMF"); diff --git a/backend/tests/test_ps.c b/backend/tests/test_ps.c index bf38b3dd..927a076a 100644 --- a/backend/tests/test_ps.c +++ b/backend/tests/test_ps.c @@ -70,45 +70,48 @@ static void test_print(const testCtx *const p_ctx) { /* 14*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "9771384524017+12", "ean13_2addon_ggs_5.2.2.5.1-2_gws.eps" }, /* 15*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1.eps" }, /* 16*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws.eps" }, - /* 17*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "98765", "ean5.eps" }, - /* 18*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "98765", "ean5_gws.eps" }, - /* 19*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5.eps" }, - /* 20*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_gws.eps" }, - /* 21*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 90, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_rotate_90.eps" }, - /* 22*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 180, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_gws_rotate_180.eps" }, - /* 23*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon.eps" }, - /* 24*/ { BARCODE_UPCE, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon_gws.eps" }, - /* 25*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 270, "0123456+12345", "upce_5addon_rotate_270.eps" }, - /* 26*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | BOLD_TEXT, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon_small_bold.eps" }, - /* 27*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | BOLD_TEXT | EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon_small_bold_gws.eps" }, - /* 28*/ { BARCODE_CODE128, UNICODE_MODE, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "A\\B)ç(D", "code128_escape_latin1.eps" }, - /* 29*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, -1, -1, -1, -1, 0, 0, "", "", 0, "1501234567890", "dbar_ltd_24724_fig7_bold.eps" }, - /* 30*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0.1, 0, "", "", 0, "12", "dotcode_0.1.eps" }, - /* 31*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0.08, 0, "", "", 0, "12", "dotcode_0.1.eps" }, - /* 32*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "12", "dotcode_1.0.eps" }, - /* 33*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 0.1, "", "", 0, "12", "dotcode_1.0_ds0.1.eps" }, - /* 34*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 1.1, "", "", 0, "12", "dotcode_1.0_ds1.1.eps" }, - /* 35*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 0, "", "", 0, "12", "dotcode_1.5.eps" }, - /* 36*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 0.4, "", "", 0, "12", "dotcode_1.5_ds0.4.eps" }, - /* 37*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 1.1, "", "", 0, "12", "dotcode_1.5_ds1.1.eps" }, - /* 38*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 2.1, "", "", 0, "12", "dotcode_1.5_ds2.1.eps" }, - /* 39*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 2, 0, "", "", 0, "12", "dotcode_2.0.eps" }, - /* 40*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 2, 0.9, "", "", 0, "12", "dotcode_2.0_ds0.9.eps" }, - /* 41*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 2, 1.1, "", "", 0, "12", "dotcode_2.0_ds1.1.eps" }, - /* 42*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3, 0, "", "", 0, "12", "dotcode_3.0.eps" }, - /* 43*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3, 0.4, "", "", 0, "12", "dotcode_3.0_ds0.4.eps" }, - /* 44*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3, 1.1, "", "", 0, "12", "dotcode_3.0_ds1.1.eps" }, - /* 45*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3.5, 0, "", "", 0, "12", "dotcode_3.5.eps" }, - /* 46*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3.5, 0.4, "", "", 0, "12", "dotcode_3.5_ds0.4.eps" }, - /* 47*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3.5, 1.1, "", "", 0, "12", "dotcode_3.5_ds1.1.eps" }, - /* 48*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 0, "", "", 0, "12", "dotcode_5.0.eps" }, - /* 49*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 0.2, "", "", 0, "12", "dotcode_5.0_ds0.2.eps" }, - /* 50*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 1.1, "", "", 0, "12", "dotcode_5.0_ds1.1.eps" }, - /* 51*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 1.7, "", "", 0, "12", "dotcode_5.0_ds1.7.eps" }, - /* 52*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "FF0000", "0000FF00", 0, "12", "dotcode_no_bg.eps" }, - /* 53*/ { BARCODE_MAXICODE, -1, -1, CMYK_COLOUR, -1, -1, -1, -1, 0, 0, "", "", 270, "12", "maxicode_rotate_270_cmyk.eps" }, - /* 54*/ { BARCODE_MAXICODE, -1, -1, -1, 3, -1, -1, -1, 0, 0, "", "0000FF00", 180, "12", "maxicode_no_bg_hwsp3_rotate_180.eps" }, - /* 55*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, 2.4, 0, "", "", 90, "12", "maxicode_2.4_rotate_90.eps" }, + /* 17*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, 3, -1, -1, -1, 0, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws_wsw3.eps" }, + /* 18*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "98765", "ean5.eps" }, + /* 19*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "98765", "ean5_gws.eps" }, + /* 20*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5.eps" }, + /* 21*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_gws.eps" }, + /* 22*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, 1, 3, -1, -1, 0, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_gws_wsw1h3.eps" }, + /* 23*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 90, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_rotate_90.eps" }, + /* 24*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 180, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_gws_rotate_180.eps" }, + /* 25*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, 4, -1, -1, -1, 0, 0, "", "", 270, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_gws_rotate_270_wsw4.eps" }, + /* 26*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon.eps" }, + /* 27*/ { BARCODE_UPCE, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon_gws.eps" }, + /* 28*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 270, "0123456+12345", "upce_5addon_rotate_270.eps" }, + /* 29*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | BOLD_TEXT, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon_small_bold.eps" }, + /* 30*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | BOLD_TEXT | EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon_small_bold_gws.eps" }, + /* 31*/ { BARCODE_CODE128, UNICODE_MODE, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "A\\B)ç(D", "code128_escape_latin1.eps" }, + /* 32*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, -1, -1, -1, -1, 0, 0, "", "", 0, "1501234567890", "dbar_ltd_24724_fig7_bold.eps" }, + /* 33*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0.1, 0, "", "", 0, "12", "dotcode_0.1.eps" }, + /* 34*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0.08, 0, "", "", 0, "12", "dotcode_0.1.eps" }, + /* 35*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "12", "dotcode_1.0.eps" }, + /* 36*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 0.1, "", "", 0, "12", "dotcode_1.0_ds0.1.eps" }, + /* 37*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 1.1, "", "", 0, "12", "dotcode_1.0_ds1.1.eps" }, + /* 38*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 0, "", "", 0, "12", "dotcode_1.5.eps" }, + /* 39*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 0.4, "", "", 0, "12", "dotcode_1.5_ds0.4.eps" }, + /* 40*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 1.1, "", "", 0, "12", "dotcode_1.5_ds1.1.eps" }, + /* 41*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 2.1, "", "", 0, "12", "dotcode_1.5_ds2.1.eps" }, + /* 42*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 2, 0, "", "", 0, "12", "dotcode_2.0.eps" }, + /* 43*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 2, 0.9, "", "", 0, "12", "dotcode_2.0_ds0.9.eps" }, + /* 44*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 2, 1.1, "", "", 0, "12", "dotcode_2.0_ds1.1.eps" }, + /* 45*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3, 0, "", "", 0, "12", "dotcode_3.0.eps" }, + /* 46*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3, 0.4, "", "", 0, "12", "dotcode_3.0_ds0.4.eps" }, + /* 47*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3, 1.1, "", "", 0, "12", "dotcode_3.0_ds1.1.eps" }, + /* 48*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3.5, 0, "", "", 0, "12", "dotcode_3.5.eps" }, + /* 49*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3.5, 0.4, "", "", 0, "12", "dotcode_3.5_ds0.4.eps" }, + /* 50*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3.5, 1.1, "", "", 0, "12", "dotcode_3.5_ds1.1.eps" }, + /* 51*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 0, "", "", 0, "12", "dotcode_5.0.eps" }, + /* 52*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 0.2, "", "", 0, "12", "dotcode_5.0_ds0.2.eps" }, + /* 53*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 1.1, "", "", 0, "12", "dotcode_5.0_ds1.1.eps" }, + /* 54*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 1.7, "", "", 0, "12", "dotcode_5.0_ds1.7.eps" }, + /* 55*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "FF0000", "0000FF00", 0, "12", "dotcode_no_bg.eps" }, + /* 56*/ { BARCODE_MAXICODE, -1, -1, CMYK_COLOUR, -1, -1, -1, -1, 0, 0, "", "", 270, "12", "maxicode_rotate_270_cmyk.eps" }, + /* 57*/ { BARCODE_MAXICODE, -1, -1, -1, 3, -1, -1, -1, 0, 0, "", "0000FF00", 180, "12", "maxicode_no_bg_hwsp3_rotate_180.eps" }, + /* 58*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, 2.4, 0, "", "", 90, "12", "maxicode_2.4_rotate_90.eps" }, }; int data_size = ARRAY_SIZE(data); int i, length, ret;