mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Fix UPCEAN small font ignored/disabled (introduced [1adba1])
This commit is contained in:
parent
4e501c77da
commit
badd9e59ad
@ -802,7 +802,7 @@ static int plot_raster_default(struct zint_symbol *symbol, int rotate_angle, int
|
||||
|
||||
/* Note font sizes halved as in pixels */
|
||||
if (upceanflag) {
|
||||
textflags = UPCEAN_TEXT; /* Small and bold not available for UPC/EAN */
|
||||
textflags = UPCEAN_TEXT | (symbol->output_options & SMALL_TEXT); /* Bold not available for UPC/EAN */
|
||||
text_height = (UPCEAN_FONT_HEIGHT + 1) / 2;
|
||||
text_gap = 1;
|
||||
} else {
|
||||
|
BIN
backend/tests/data/png/upce_5addon_small.png
Normal file
BIN
backend/tests/data/png/upce_5addon_small.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 374 B |
61
backend/tests/data/svg/upce_5addon_small.svg
Normal file
61
backend/tests/data/svg/upce_5addon_small.svg
Normal file
@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="238" height="112" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<desc>Zint Generated Symbol
|
||||
</desc>
|
||||
|
||||
<g id="barcode" fill="#000000">
|
||||
<rect x="0" y="0" width="238" height="112" fill="#FFFFFF" />
|
||||
<rect x="18.00" y="0.00" width="2.00" height="110.00" />
|
||||
<rect x="22.00" y="0.00" width="2.00" height="110.00" />
|
||||
<rect x="28.00" y="0.00" width="2.00" height="100.00" />
|
||||
<rect x="34.00" y="0.00" width="4.00" height="100.00" />
|
||||
<rect x="40.00" y="0.00" width="8.00" height="100.00" />
|
||||
<rect x="50.00" y="0.00" width="2.00" height="100.00" />
|
||||
<rect x="54.00" y="0.00" width="2.00" height="100.00" />
|
||||
<rect x="62.00" y="0.00" width="4.00" height="100.00" />
|
||||
<rect x="68.00" y="0.00" width="6.00" height="100.00" />
|
||||
<rect x="78.00" y="0.00" width="2.00" height="100.00" />
|
||||
<rect x="88.00" y="0.00" width="2.00" height="100.00" />
|
||||
<rect x="92.00" y="0.00" width="2.00" height="100.00" />
|
||||
<rect x="98.00" y="0.00" width="2.00" height="100.00" />
|
||||
<rect x="106.00" y="0.00" width="2.00" height="100.00" />
|
||||
<rect x="110.00" y="0.00" width="2.00" height="110.00" />
|
||||
<rect x="114.00" y="0.00" width="2.00" height="110.00" />
|
||||
<rect x="118.00" y="0.00" width="2.00" height="110.00" />
|
||||
<rect x="134.00" y="13.00" width="2.00" height="87.00" />
|
||||
<rect x="138.00" y="13.00" width="4.00" height="87.00" />
|
||||
<rect x="144.00" y="13.00" width="4.00" height="87.00" />
|
||||
<rect x="152.00" y="13.00" width="4.00" height="87.00" />
|
||||
<rect x="158.00" y="13.00" width="2.00" height="87.00" />
|
||||
<rect x="164.00" y="13.00" width="2.00" height="87.00" />
|
||||
<rect x="170.00" y="13.00" width="4.00" height="87.00" />
|
||||
<rect x="176.00" y="13.00" width="2.00" height="87.00" />
|
||||
<rect x="180.00" y="13.00" width="2.00" height="87.00" />
|
||||
<rect x="190.00" y="13.00" width="2.00" height="87.00" />
|
||||
<rect x="194.00" y="13.00" width="2.00" height="87.00" />
|
||||
<rect x="198.00" y="13.00" width="2.00" height="87.00" />
|
||||
<rect x="206.00" y="13.00" width="4.00" height="87.00" />
|
||||
<rect x="212.00" y="13.00" width="2.00" height="87.00" />
|
||||
<rect x="216.00" y="13.00" width="4.00" height="87.00" />
|
||||
<rect x="226.00" y="13.00" width="2.00" height="87.00" />
|
||||
<text x="8.00" y="111.50" text-anchor="end"
|
||||
font-family="Helvetica, sans-serif" font-size="12.0" >
|
||||
1
|
||||
</text>
|
||||
<text x="66.00" y="111.50" text-anchor="middle"
|
||||
font-family="Helvetica, sans-serif" font-size="14.0" >
|
||||
234567
|
||||
</text>
|
||||
<text x="126.00" y="111.50" text-anchor="start"
|
||||
font-family="Helvetica, sans-serif" font-size="12.0" >
|
||||
0
|
||||
</text>
|
||||
<text x="182.00" y="10.50" text-anchor="middle"
|
||||
font-family="Helvetica, sans-serif" font-size="14.0" >
|
||||
12345
|
||||
</text>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.0 KiB |
@ -117,6 +117,7 @@ static void test_print(int index, int generate, int debug) {
|
||||
struct item {
|
||||
int symbology;
|
||||
int input_mode;
|
||||
int border_width;
|
||||
int output_options;
|
||||
int whitespace_width;
|
||||
int show_hrt;
|
||||
@ -132,44 +133,45 @@ static void test_print(int index, int generate, int debug) {
|
||||
char *comment;
|
||||
};
|
||||
struct item data[] = {
|
||||
/* 0*/ { BARCODE_CODE128, UNICODE_MODE, BOLD_TEXT, -1, -1, -1, -1, 0, 0, "", "", "Égjpqy", "", "../data/png/code128_egrave_bold.png", "" },
|
||||
/* 1*/ { BARCODE_CODE128, UNICODE_MODE, BOLD_TEXT | BARCODE_BOX, -1, -1, -1, -1, 0, 0, "", "", "Égjpqy", "", "../data/png/code128_egrave_bold_box3.png", "" },
|
||||
/* 2*/ { BARCODE_GS1_128_CC, -1, -1, -1, -1, 3, -1, 0, 0, "", "", "[00]030123456789012340", "[02]13012345678909[37]24[10]1234567ABCDEFG", "../data/png/gs1_128_cc_fig12.png", "" },
|
||||
/* 3*/ { BARCODE_CODABLOCKF, -1, -1, -1, -1, 3, -1, 0, 0, "", "", "AAAAAAAAA", "", "../data/png/codablockf_3rows.png", "" },
|
||||
/* 4*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "9771384524017+12", "", "../data/png/ean13_2addon_ggs_5.2.2.5.1-2.png", "" },
|
||||
/* 5*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "9780877799306+54321", "", "../data/png/ean13_5addon_ggs_5.2.2.5.2-2.png", "" },
|
||||
/* 6*/ { BARCODE_EANX_CC, -1, -1, -1, -1, 1, -1, 0, 0, "", "", "123456789012+12", "[91]123456789012345678901", "../data/png/ean13_cc_2addon_cca_4x4.png", "" },
|
||||
/* 7*/ { BARCODE_EANX_CC, -1, -1, -1, -1, 2, -1, 0, 0, "", "", "123456789012+54321", "[91]1234567890", "../data/png/ean13_cc_5addon_ccb_3x4.png", "" },
|
||||
/* 8*/ { BARCODE_EANX_CC, -1, -1, -1, 0, 2, -1, 0, 0, "", "", "123456789012+54321", "[91]1234567890", "../data/png/ean13_cc_5addon_ccb_3x4_notext.png", "" },
|
||||
/* 9*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "012345678905+24", "", "../data/png/upca_2addon_ggs_5.2.6.6-5.png", "" },
|
||||
/* 10*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "614141234417+12345", "", "../data/png/upca_5addon.png", "" },
|
||||
/* 11*/ { BARCODE_UPCA, -1, -1, -1, 0, -1, -1, 0, 0, "", "", "614141234417+12345", "", "../data/png/upca_5addon_notext.png", "" },
|
||||
/* 12*/ { BARCODE_UPCA, -1, BARCODE_BIND, -1, -1, -1, -1, 0, 0, "", "", "614141234417+12345", "", "../data/png/upca_5addon_bind3.png", "" },
|
||||
/* 13*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, 1, -1, 0, 0, "", "", "12345678901+12", "[91]123456789", "../data/png/upca_cc_2addon_cca_3x4.png", "" },
|
||||
/* 14*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, 2, -1, 0, 0, "", "", "12345678901+12121", "[91]1234567890123", "../data/png/upca_cc_5addon_ccb_4x4.png", "" },
|
||||
/* 15*/ { BARCODE_UPCA_CC, -1, -1, -1, 0, 2, -1, 0, 0, "", "", "12345678901+12121", "[91]1234567890123", "../data/png/upca_cc_5addon_ccb_4x4_notext.png", "" },
|
||||
/* 16*/ { BARCODE_UPCA_CC, -1, BARCODE_BIND, -1, -1, 2, -1, 0, 0, "", "", "12345678901+12121", "[91]1234567890123", "../data/png/upca_cc_5addon_ccb_4x4_bind3.png", "" },
|
||||
/* 17*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "1234567+12", "", "../data/png/upce_2addon.png", "" },
|
||||
/* 18*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "1234567+12345", "", "../data/png/upce_5addon.png", "" },
|
||||
/* 19*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, 1, -1, 0, 0, "", "", "0654321+89", "[91]1", "../data/png/upce_cc_2addon_cca_5x2.png", "" },
|
||||
/* 20*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, 2, -1, 0, 0, "", "", "1876543+56789", "[91]12345", "../data/png/upce_cc_5addon_ccb_8x2.png", "" },
|
||||
/* 21*/ { BARCODE_UPCE_CC, -1, -1, -1, 0, 2, -1, 0, 0, "", "", "1876543+56789", "[91]12345", "../data/png/upce_cc_5addon_ccb_8x2_notext.png", "" },
|
||||
/* 22*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "1234567+12", "", "../data/png/ean8_2addon.png", "" },
|
||||
/* 23*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "1234567+12345", "", "../data/png/ean8_5addon.png", "" },
|
||||
/* 24*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "9876543+65", "[91]1234567", "../data/png/ean8_cc_2addon_cca_4x3.png", "" },
|
||||
/* 25*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "9876543+74083", "[91]123456789012345678", "../data/png/ean8_cc_5addon_ccb_8x3.png", "" },
|
||||
/* 26*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "12345", "", "../data/png/ean5.png", "" },
|
||||
/* 27*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "12", "", "../data/png/ean2.png", "" },
|
||||
/* 28*/ { BARCODE_CODE39, -1, SMALL_TEXT, -1, -1, -1, -1, 0, 0, "", "", "123", "", "../data/png/code39_small.png", "" },
|
||||
/* 29*/ { BARCODE_POSTNET, -1, -1, -1, -1, -1, -1, 0, 3.5, "", "", "12345", "", "../data/png/postnet_zip.png", "300 dpi, using 1/43in X, 300 / 43 / 2 = ~3.5 scale" },
|
||||
/* 30*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, 0, 0, "", "CFCECDCC", "12345", "", "../data/png/pdf417_bgalpha.png", "" },
|
||||
/* 31*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, 0, 0, "30313233", "", "12345", "", "../data/png/pdf417_fgalpha.png", "" },
|
||||
/* 32*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, 0, 0, "20212244", "CFCECDCC", "12345", "", "../data/png/pdf417_bgfgalpha.png", "" },
|
||||
/* 33*/ { BARCODE_ULTRA, -1, -1, 2, -1, -1, -1, 0, 0, "0000007F", "FF000033", "12345", "", "../data/png/ultra_bgfgalpha.png", "" },
|
||||
/* 34*/ { BARCODE_ULTRA, -1, -1, 2, -1, -1, -1, 0, 0, "", "FF000033", "12345", "", "../data/png/ultra_bgalpha.png", "" },
|
||||
/* 35*/ { BARCODE_ULTRA, -1, -1, 2, -1, -1, -1, 0, 0, "0000007F", "FF0000", "12345", "", "../data/png/ultra_fgalpha.png", "" },
|
||||
/* 36*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, 0, 0, "0000007F", "", "12345", "", "../data/png/ultra_fgalpha_nobg.png", "" },
|
||||
/* 37*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, 0, 0.5f, "", "", "1", "", "../data/png/ultra_odd.png", "" },
|
||||
/* 0*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, 0, 0, "", "", "Égjpqy", "", "../data/png/code128_egrave_bold.png", "" },
|
||||
/* 1*/ { BARCODE_CODE128, UNICODE_MODE, 3, BOLD_TEXT | BARCODE_BOX, -1, -1, -1, -1, 0, 0, "", "", "Égjpqy", "", "../data/png/code128_egrave_bold_box3.png", "" },
|
||||
/* 2*/ { BARCODE_GS1_128_CC, -1, -1, -1, -1, -1, 3, -1, 0, 0, "", "", "[00]030123456789012340", "[02]13012345678909[37]24[10]1234567ABCDEFG", "../data/png/gs1_128_cc_fig12.png", "" },
|
||||
/* 3*/ { BARCODE_CODABLOCKF, -1, 3, -1, -1, -1, 3, -1, 0, 0, "", "", "AAAAAAAAA", "", "../data/png/codablockf_3rows.png", "" },
|
||||
/* 4*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "9771384524017+12", "", "../data/png/ean13_2addon_ggs_5.2.2.5.1-2.png", "" },
|
||||
/* 5*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "9780877799306+54321", "", "../data/png/ean13_5addon_ggs_5.2.2.5.2-2.png", "" },
|
||||
/* 6*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, 1, -1, 0, 0, "", "", "123456789012+12", "[91]123456789012345678901", "../data/png/ean13_cc_2addon_cca_4x4.png", "" },
|
||||
/* 7*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, 2, -1, 0, 0, "", "", "123456789012+54321", "[91]1234567890", "../data/png/ean13_cc_5addon_ccb_3x4.png", "" },
|
||||
/* 8*/ { BARCODE_EANX_CC, -1, -1, -1, -1, 0, 2, -1, 0, 0, "", "", "123456789012+54321", "[91]1234567890", "../data/png/ean13_cc_5addon_ccb_3x4_notext.png", "" },
|
||||
/* 9*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "012345678905+24", "", "../data/png/upca_2addon_ggs_5.2.6.6-5.png", "" },
|
||||
/* 10*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "614141234417+12345", "", "../data/png/upca_5addon.png", "" },
|
||||
/* 11*/ { BARCODE_UPCA, -1, -1, -1, -1, 0, -1, -1, 0, 0, "", "", "614141234417+12345", "", "../data/png/upca_5addon_notext.png", "" },
|
||||
/* 12*/ { BARCODE_UPCA, -1, 3, BARCODE_BIND, -1, -1, -1, -1, 0, 0, "", "", "614141234417+12345", "", "../data/png/upca_5addon_bind3.png", "" },
|
||||
/* 13*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, 1, -1, 0, 0, "", "", "12345678901+12", "[91]123456789", "../data/png/upca_cc_2addon_cca_3x4.png", "" },
|
||||
/* 14*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, 2, -1, 0, 0, "", "", "12345678901+12121", "[91]1234567890123", "../data/png/upca_cc_5addon_ccb_4x4.png", "" },
|
||||
/* 15*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, 0, 2, -1, 0, 0, "", "", "12345678901+12121", "[91]1234567890123", "../data/png/upca_cc_5addon_ccb_4x4_notext.png", "" },
|
||||
/* 16*/ { BARCODE_UPCA_CC, -1, 3, BARCODE_BIND, -1, -1, 2, -1, 0, 0, "", "", "12345678901+12121", "[91]1234567890123", "../data/png/upca_cc_5addon_ccb_4x4_bind3.png", "" },
|
||||
/* 17*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "1234567+12", "", "../data/png/upce_2addon.png", "" },
|
||||
/* 18*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "1234567+12345", "", "../data/png/upce_5addon.png", "" },
|
||||
/* 19*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT, -1, -1, -1, -1, 0, 0, "", "", "1234567+12345", "", "../data/png/upce_5addon_small.png", "" },
|
||||
/* 20*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, 1, -1, 0, 0, "", "", "0654321+89", "[91]1", "../data/png/upce_cc_2addon_cca_5x2.png", "" },
|
||||
/* 21*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, 2, -1, 0, 0, "", "", "1876543+56789", "[91]12345", "../data/png/upce_cc_5addon_ccb_8x2.png", "" },
|
||||
/* 22*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, 0, 2, -1, 0, 0, "", "", "1876543+56789", "[91]12345", "../data/png/upce_cc_5addon_ccb_8x2_notext.png", "" },
|
||||
/* 23*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "1234567+12", "", "../data/png/ean8_2addon.png", "" },
|
||||
/* 24*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "1234567+12345", "", "../data/png/ean8_5addon.png", "" },
|
||||
/* 25*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "9876543+65", "[91]1234567", "../data/png/ean8_cc_2addon_cca_4x3.png", "" },
|
||||
/* 26*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "9876543+74083", "[91]123456789012345678", "../data/png/ean8_cc_5addon_ccb_8x3.png", "" },
|
||||
/* 27*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "12345", "", "../data/png/ean5.png", "" },
|
||||
/* 28*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", "12", "", "../data/png/ean2.png", "" },
|
||||
/* 29*/ { BARCODE_CODE39, -1, -1, SMALL_TEXT, -1, -1, -1, -1, 0, 0, "", "", "123", "", "../data/png/code39_small.png", "" },
|
||||
/* 30*/ { BARCODE_POSTNET, -1, -1, -1, -1, -1, -1, -1, 0, 3.5, "", "", "12345", "", "../data/png/postnet_zip.png", "300 dpi, using 1/43in X, 300 / 43 / 2 = ~3.5 scale" },
|
||||
/* 31*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "CFCECDCC", "12345", "", "../data/png/pdf417_bgalpha.png", "" },
|
||||
/* 32*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, 0, 0, "30313233", "", "12345", "", "../data/png/pdf417_fgalpha.png", "" },
|
||||
/* 33*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, 0, 0, "20212244", "CFCECDCC", "12345", "", "../data/png/pdf417_bgfgalpha.png", "" },
|
||||
/* 34*/ { BARCODE_ULTRA, -1, -1, -1, 2, -1, -1, -1, 0, 0, "0000007F", "FF000033", "12345", "", "../data/png/ultra_bgfgalpha.png", "" },
|
||||
/* 35*/ { BARCODE_ULTRA, -1, -1, -1, 2, -1, -1, -1, 0, 0, "", "FF000033", "12345", "", "../data/png/ultra_bgalpha.png", "" },
|
||||
/* 36*/ { BARCODE_ULTRA, -1, -1, -1, 2, -1, -1, -1, 0, 0, "0000007F", "FF0000", "12345", "", "../data/png/ultra_fgalpha.png", "" },
|
||||
/* 37*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, -1, 0, 0, "0000007F", "", "12345", "", "../data/png/ultra_fgalpha_nobg.png", "" },
|
||||
/* 38*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, -1, 0, 0.5f, "", "", "1", "", "../data/png/ultra_odd.png", "" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
|
||||
@ -203,8 +205,8 @@ static void test_print(int index, int generate, int debug) {
|
||||
if (data[i].scale) {
|
||||
symbol->scale = data[i].scale;
|
||||
}
|
||||
if (data[i].output_options & (BARCODE_BOX | BARCODE_BIND)) {
|
||||
symbol->border_width = 3;
|
||||
if (data[i].border_width != -1) {
|
||||
symbol->border_width = data[i].border_width;
|
||||
}
|
||||
if (data[i].whitespace_width != -1) {
|
||||
symbol->whitespace_width = data[i].whitespace_width;
|
||||
@ -231,8 +233,8 @@ static void test_print(int index, int generate, int debug) {
|
||||
assert_zero(ret, "i:%d %s ZBarcode_Print %s ret %d != 0\n", i, testUtilBarcodeName(data[i].symbology), symbol->outfile, ret);
|
||||
|
||||
if (generate) {
|
||||
printf(" /*%3d*/ { %s, %s, %s, %d, %d, %d, %d, %d, %.5g, \"%s\",\"%s\", \"%s\", \"%s\", \"%s\", \"%s\" },\n",
|
||||
i, testUtilBarcodeName(data[i].symbology), testUtilInputModeName(data[i].input_mode), testUtilOutputOptionsName(data[i].output_options),
|
||||
printf(" /*%3d*/ { %s, %s, %d, %s, %d, %d, %d, %d, %d, %.5g, \"%s\",\"%s\", \"%s\", \"%s\", \"%s\", \"%s\" },\n",
|
||||
i, testUtilBarcodeName(data[i].symbology), testUtilInputModeName(data[i].input_mode), data[i].border_width, testUtilOutputOptionsName(data[i].output_options),
|
||||
data[i].whitespace_width, data[i].show_hrt, data[i].option_1, data[i].option_2, data[i].height, data[i].scale, data[i].fgcolour, data[i].bgcolour,
|
||||
testUtilEscape(data[i].data, length, escaped, escaped_size), data[i].composite, data[i].expected_file, data[i].comment);
|
||||
ret = rename(symbol->outfile, data[i].expected_file);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
libzint - the open source barcode library
|
||||
Copyright (C) 2020 Robin Stuart <rstuart114@gmail.com>
|
||||
Copyright (C) 2020 - 2021 Robin Stuart <rstuart114@gmail.com>
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
@ -77,18 +77,19 @@ static void test_print(int index, int generate, int debug) {
|
||||
/* 17*/ { BARCODE_UPCA_CC, -1, 3, BARCODE_BIND, -1, 2, -1, "12345678901+12121", "[91]1234567890123", "../data/svg/upca_cc_5addon_ccb_4x4_bind3.svg" },
|
||||
/* 18*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, "1234567+12", "", "../data/svg/upce_2addon.svg" },
|
||||
/* 19*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, "1234567+12345", "", "../data/svg/upce_5addon.svg" },
|
||||
/* 20*/ { BARCODE_UPCE, -1, -1, -1, 0, -1, -1, "1234567+12345", "", "../data/svg/upce_5addon_notext.svg" },
|
||||
/* 21*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, 1, -1, "0654321+89", "[91]1", "../data/svg/upce_cc_2addon_cca_5x2.svg" },
|
||||
/* 22*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, 2, -1, "1876543+56789", "[91]12345", "../data/svg/upce_cc_5addon_ccb_8x2.svg" },
|
||||
/* 23*/ { BARCODE_UPCE_CC, -1, -1, -1, 0, 2, -1, "1876543+56789", "[91]12345", "../data/svg/upce_cc_5addon_ccb_8x2_notext.svg" },
|
||||
/* 24*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, "1234567+12", "", "../data/svg/ean8_2addon.svg" },
|
||||
/* 25*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, "1234567+12345", "", "../data/svg/ean8_5addon.svg" },
|
||||
/* 26*/ { BARCODE_EANX_CC, -1, -1, -1, -1, 1, -1, "9876543+65", "[91]1234567", "../data/svg/ean8_cc_2addon_cca_4x3.svg" },
|
||||
/* 27*/ { BARCODE_EANX_CC, -1, -1, -1, -1, 2, -1, "9876543+74083", "[91]123456789012345678", "../data/svg/ean8_cc_5addon_ccb_8x3.svg" },
|
||||
/* 28*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, "12345", "", "../data/svg/ean5.svg" },
|
||||
/* 29*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, "12", "", "../data/svg/ean2.svg" },
|
||||
/* 30*/ { BARCODE_CODE39, -1, -1, SMALL_TEXT, -1, -1, -1, "123", "", "../data/svg/code39_small.svg" },
|
||||
/* 31*/ { BARCODE_POSTNET, -1, -1, -1, -1, -1, -1, "12345", "", "../data/svg/postnet_zip.svg" },
|
||||
/* 20*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT, -1, -1, -1, "1234567+12345", "", "../data/svg/upce_5addon_small.svg" },
|
||||
/* 21*/ { BARCODE_UPCE, -1, -1, -1, 0, -1, -1, "1234567+12345", "", "../data/svg/upce_5addon_notext.svg" },
|
||||
/* 22*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, 1, -1, "0654321+89", "[91]1", "../data/svg/upce_cc_2addon_cca_5x2.svg" },
|
||||
/* 23*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, 2, -1, "1876543+56789", "[91]12345", "../data/svg/upce_cc_5addon_ccb_8x2.svg" },
|
||||
/* 24*/ { BARCODE_UPCE_CC, -1, -1, -1, 0, 2, -1, "1876543+56789", "[91]12345", "../data/svg/upce_cc_5addon_ccb_8x2_notext.svg" },
|
||||
/* 25*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, "1234567+12", "", "../data/svg/ean8_2addon.svg" },
|
||||
/* 26*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, "1234567+12345", "", "../data/svg/ean8_5addon.svg" },
|
||||
/* 27*/ { BARCODE_EANX_CC, -1, -1, -1, -1, 1, -1, "9876543+65", "[91]1234567", "../data/svg/ean8_cc_2addon_cca_4x3.svg" },
|
||||
/* 28*/ { BARCODE_EANX_CC, -1, -1, -1, -1, 2, -1, "9876543+74083", "[91]123456789012345678", "../data/svg/ean8_cc_5addon_ccb_8x3.svg" },
|
||||
/* 29*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, "12345", "", "../data/svg/ean5.svg" },
|
||||
/* 30*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, "12", "", "../data/svg/ean2.svg" },
|
||||
/* 31*/ { BARCODE_CODE39, -1, -1, SMALL_TEXT, -1, -1, -1, "123", "", "../data/svg/code39_small.svg" },
|
||||
/* 32*/ { BARCODE_POSTNET, -1, -1, -1, -1, -1, -1, "12345", "", "../data/svg/postnet_zip.svg" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
|
||||
|
@ -66,8 +66,8 @@ will be converted to spaces</string>
|
||||
<tr><td>Form Feed (0x0C)</td><td>&nbsp;\f</td></tr>
|
||||
<tr><td>Carriage Return (0x0D)</td><td>&nbsp;\r</td></tr>
|
||||
<tr><td>Escape (0x1B)</td><td>&nbsp;\e</td></tr>
|
||||
<tr><td>Group Selector (0x1D)</td><td>&nbsp;\G</td></tr>
|
||||
<tr><td>Record Selector (0x1E)</td><td>&nbsp;\R</td></tr>
|
||||
<tr><td>Group Separator (0x1D)</td><td>&nbsp;\G</td></tr>
|
||||
<tr><td>Record Separator (0x1E)</td><td>&nbsp;\R</td></tr>
|
||||
<tr><td>Backslash (0x5C)</td><td>&nbsp;\\</td></tr>
|
||||
</table>
|
||||
Note that newlines (Line Feeds (0x0A)) are <br/>not included</string>
|
||||
|
@ -556,8 +556,8 @@ p, li { white-space: pre-wrap; }
|
||||
<tr><td>\f&nbsp;</td><td>Form Feed (0x0C)</td></tr>
|
||||
<tr><td>\r&nbsp;</td><td>Carriage Return (0x0D)</td></tr>
|
||||
<tr><td>\e&nbsp;</td><td>Escape (0x1B)</td></tr>
|
||||
<tr><td>\G&nbsp;</td><td>Group Selector (0x1D)</td></tr>
|
||||
<tr><td>\R&nbsp;</td><td>Record Selector (0x1E)</td></tr>
|
||||
<tr><td>\G&nbsp;</td><td>Group Separator (0x1D)</td></tr>
|
||||
<tr><td>\R&nbsp;</td><td>Record Separator (0x1E)</td></tr>
|
||||
<tr><td>\\&nbsp;</td><td>Backslash (0x5C)</td></tr>
|
||||
<tr><td>\xNN&nbsp;</td><td>8-bit character (N hex)</td></tr>
|
||||
<tr><td>\uNNNN&nbsp;</td><td>16-bit Unicode (N hex)</td></tr>
|
||||
|
@ -609,7 +609,6 @@ void MainWindow::change_options()
|
||||
cmbECI->setItemText(25, tr("29: GB 2312 (PRC)"));
|
||||
btype->setItemText(0, tr("No border"));
|
||||
combobox_item_enabled(cmbFontSetting, 1, true);
|
||||
cmbFontSetting->setItemText(2, tr("Small"));
|
||||
|
||||
if (symbology == BARCODE_CODE128)
|
||||
{
|
||||
@ -974,7 +973,6 @@ void MainWindow::change_options()
|
||||
if (cmbFontSetting->currentIndex() == 1) {
|
||||
cmbFontSetting->setCurrentIndex(0);
|
||||
}
|
||||
cmbFontSetting->setItemText(2, tr("Small (vector only)"));
|
||||
connect(m_optionWidget->findChild<QObject*>("cmbUPCAAddonGap"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
|
||||
}
|
||||
|
||||
@ -998,7 +996,6 @@ void MainWindow::change_options()
|
||||
if (cmbFontSetting->currentIndex() == 1) {
|
||||
cmbFontSetting->setCurrentIndex(0);
|
||||
}
|
||||
cmbFontSetting->setItemText(2, tr("Small (vector only)"));
|
||||
connect(m_optionWidget->findChild<QObject*>("cmbUPCEANAddonGap"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user