diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 607d428c..91200fa0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,11 +1,11 @@ name: CI -# .github/workflows/ci.yml 2026-07-01 +# .github/workflows/ci.yml 2026-07-27 # Controls when the action will run. Triggers the workflow on push or pull request # events but only for the master branch (or test branch github_ci push) on: push: - branches: [ master, github_ci ] + branches: [ master, github_ci, font_wip ] pull_request: branches: [ master ] diff --git a/backend/CMakeLists.txt b/backend/CMakeLists.txt index c0adcddd..bcc8157c 100644 --- a/backend/CMakeLists.txt +++ b/backend/CMakeLists.txt @@ -17,7 +17,7 @@ if(ZINT_USE_GS1SE) endif() endif() -set(zint_COMMON_SRCS common.c eci.c filemem.c general_field.c gs1.c large.c library.c reedsol.c) +set(zint_COMMON_SRCS common.c eci.c filemem.c general_field.c gs1.c large.c library.c reedsol.c zfont.c) set(zint_ONEDIM_SRCS 2of5.c 2of5inter.c 2of5inter_based.c bc412.c channel.c codabar.c code.c code11.c code128.c code128_based.c dxfilmedge.c medical.c plessey.c rss.c telepen.c upcean.c) set(zint_POSTAL_SRCS auspost.c imail.c mailmark.c postal.c) diff --git a/backend/auspost.c b/backend/auspost.c index 727b0a24..ff29d08c 100644 --- a/backend/auspost.c +++ b/backend/auspost.c @@ -274,6 +274,10 @@ INTERNAL int zint_auspost(struct zint_symbol *symbol, unsigned char source[], in error_number = zint_daft_set_height(symbol, 0.0f, 0.0f); } + if ((symbol->show_hrt & 0x7) >= ZINT_HRT_LINEAR_ALL) { + z_hrt_cpy_cat_nochk(symbol, fccs[fcc_idx], 2, '\xFF' /*separator (none)*/, source, length); + } + if (content_segs && z_ct_cpy_cat(symbol, fccs[fcc_idx], 2, '\xFF' /*separator (none)*/, source, length)) { return ZINT_ERROR_MEMORY; /* `z_ct_cpy_cat()` only fails with OOM */ } diff --git a/backend/bmp.c b/backend/bmp.c index 0c1f8ae6..32922680 100644 --- a/backend/bmp.c +++ b/backend/bmp.c @@ -1,7 +1,7 @@ /* bmp.c - Handles output to Windows Bitmap file */ /* libzint - the open source barcode library - Copyright (C) 2009-2025 Robin Stuart + Copyright (C) 2009-2026 Robin Stuart Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -50,9 +50,10 @@ INTERNAL int zint_bmp_pixel_plot(struct zint_symbol *symbol, const unsigned char bitmap_info_header_t info_header; color_ref_t bg; color_ref_t fg; - color_ref_t palette[8]; + color_ref_t palette[256]; int ultra_fg_index = 9; unsigned char map[128]; + const int grayscale = zint_out_grayscale(symbol); unsigned char *rowbuf; (void) zint_out_colour_get_rgb(symbol->fgcolour, &fg.red, &fg.green, &fg.blue, NULL /*alpha*/); @@ -75,6 +76,18 @@ INTERNAL int zint_bmp_pixel_plot(struct zint_symbol *symbol, const unsigned char colour_count = ultra_fg_index == 9 ? 10 : 9; map['0'] = 0; map['1'] = (unsigned char) ultra_fg_index; + } else if (grayscale) { + const int diff_red = fg.red - bg.red; + const int diff_green = fg.green - bg.green; + const int diff_blue = fg.blue - bg.blue; + color_ref_t color = {0}; /* Ensure `reserved` is zero */ + bits_per_pixel = 8; + for (colour_count = 0; colour_count <= 0xFF; colour_count++) { + color.red = bg.red + (diff_red * colour_count) / 0xFF; + color.green = bg.green + (diff_green * colour_count) / 0xFF; + color.blue = bg.blue + (diff_blue * colour_count) / 0xFF; + palette[colour_count] = color; + } } else { bits_per_pixel = 1; colour_count = 2; @@ -123,16 +136,22 @@ INTERNAL int zint_bmp_pixel_plot(struct zint_symbol *symbol, const unsigned char zint_fm_write(&file_header, sizeof(bitmap_file_header_t), 1, fmp); zint_fm_write(&info_header, sizeof(bitmap_info_header_t), 1, fmp); - zint_fm_write(&bg, sizeof(color_ref_t), 1, fmp); - if (bits_per_pixel == 4) { - for (i = 0; i < 8; i++) { + if (bits_per_pixel == 8) { + for (i = 0; i < colour_count; i++) { zint_fm_write(&palette[i], sizeof(color_ref_t), 1, fmp); } - if (ultra_fg_index == 9) { + } else { + zint_fm_write(&bg, sizeof(color_ref_t), 1, fmp); + if (bits_per_pixel == 4) { + for (i = 0; i < 8; i++) { + zint_fm_write(&palette[i], sizeof(color_ref_t), 1, fmp); + } + if (ultra_fg_index == 9) { + zint_fm_write(&fg, sizeof(color_ref_t), 1, fmp); + } + } else { zint_fm_write(&fg, sizeof(color_ref_t), 1, fmp); } - } else { - zint_fm_write(&fg, sizeof(color_ref_t), 1, fmp); } /* Pixel Plotting */ @@ -145,6 +164,13 @@ INTERNAL int zint_bmp_pixel_plot(struct zint_symbol *symbol, const unsigned char } zint_fm_write(rowbuf, 1, row_size, fmp); } + } else if (bits_per_pixel == 8) { + memset(rowbuf, 0, row_size); + for (row = 0; row < symbol->bitmap_height; row++) { + const unsigned char *pb = pixelbuf + (symbol->bitmap_width * (symbol->bitmap_height - row - 1)); + memcpy(rowbuf, pb, symbol->bitmap_width); + zint_fm_write(rowbuf, 1, row_size, fmp); + } } else { /* bits_per_pixel == 1 */ for (row = 0; row < symbol->bitmap_height; row++) { const unsigned char *pb = pixelbuf + ((size_t) symbol->bitmap_width * (symbol->bitmap_height - row - 1)); diff --git a/backend/codablock.c b/backend/codablock.c index 43beae8f..43c864ab 100644 --- a/backend/codablock.c +++ b/backend/codablock.c @@ -567,7 +567,9 @@ INTERNAL int zint_codablockf(struct zint_symbol *symbol, unsigned char source[], if (symbol->border_width == 0) { /* Allow override if non-zero */ symbol->border_width = 1; /* AIM ISS-X-24 Section 4.6.1 b) (note change from previous default 2) */ } - z_hrt_cpy_nochk(symbol, ZCUCP(""), 0); /* Zap HRT for compatibility with CODABLOCKF */ + if ((symbol->show_hrt & 0x7) < ZINT_HRT_STACKED) { + z_hrt_cpy_nochk(symbol, ZCUCP(""), 0); /* Zap HRT for compatibility with CODABLOCKF */ + } /* Use `content_segs` from `zint_code128()` */ if (symbol->output_options & COMPLIANT_HEIGHT) { /* AIM ISS-X-24 Section 4.6.1 minimum row height 8X (for compatibility with CODABLOCKF, not specced @@ -883,6 +885,10 @@ INTERNAL int zint_codablockf(struct zint_symbol *symbol, unsigned char source[], symbol->border_width = 1; /* AIM ISS-X-24 Section 4.6.1 b) (note change from previous default 2) */ } + if ((symbol->show_hrt & 0x7) >= ZINT_HRT_STACKED) { + error_number = z_hrt_cpy_iso8859_1(symbol, source, length); + } + if (content_segs) { if ((symbol->input_mode & 0x07) == DATA_MODE) { if (z_ct_cpy(symbol, source, length)) { diff --git a/backend/code16k.c b/backend/code16k.c index c225843c..9c9e6ce6 100644 --- a/backend/code16k.c +++ b/backend/code16k.c @@ -593,6 +593,11 @@ INTERNAL int zint_code16k(struct zint_symbol *symbol, unsigned char source[], in symbol->border_width = 1; /* BS EN 12323:2005 Section 4.3.7 minimum (note change from previous default 2) */ } + if ((symbol->show_hrt & 0x7) >= ZINT_HRT_STACKED) { + assert(length < ARRAY_SIZE(symbol->text)); + (void) z_hrt_cpy_iso8859_1(symbol, source, length); + } + if (content_segs) { if ((symbol->input_mode & 0x07) == DATA_MODE) { if (z_ct_cpy(symbol, source, length)) { diff --git a/backend/code49.c b/backend/code49.c index 8c460dc7..39c6fbbc 100644 --- a/backend/code49.c +++ b/backend/code49.c @@ -30,6 +30,7 @@ */ /* SPDX-License-Identifier: BSD-3-Clause */ +#include #include #include "common.h" #include "code49.h" @@ -373,6 +374,11 @@ INTERNAL int zint_code49(struct zint_symbol *symbol, unsigned char source[], int symbol->border_width = 1; /* ANSI/AIM BC6-2000 Section 2.1 (note change from previous default 2) */ } + if ((symbol->show_hrt & 0x7) >= ZINT_HRT_STACKED) { + assert(length < ARRAY_SIZE(symbol->text)); + z_hrt_cpy_nochk(symbol, source, length); + } + if (!gs1 && content_segs && z_ct_cpy(symbol, source, length)) { /* GS1 dealt with by `ZBarcode_Encode_Segs()` */ return ZINT_ERROR_MEMORY; /* `z_ct_cpy()` only fails with OOM */ } diff --git a/backend/common.c b/backend/common.c index 722ba4d5..26510db7 100644 --- a/backend/common.c +++ b/backend/common.c @@ -864,7 +864,7 @@ INTERNAL int z_hrt_cpy_iso8859_1(struct zint_symbol *symbol, const unsigned char for (i = 0, j = 0; i < length && j < text_size; i++) { if (z_isascii(source[i])) { - symbol->text[j++] = z_iscntrl(source[i]) ? ' ' : source[i]; + symbol->text[j++] = z_iscntrl(source[i]) && source[i] != '\n' ? ' ' : source[i]; /* Leave newlines */ } else if (source[i] < 0xC0) { if (source[i] < 0xA0) { /* 0x80-0x9F not valid ISO/IEC 8859-1 */ symbol->text[j++] = ' '; diff --git a/backend/dxfilmedge.c b/backend/dxfilmedge.c index ad3e2844..09c65428 100644 --- a/backend/dxfilmedge.c +++ b/backend/dxfilmedge.c @@ -248,6 +248,11 @@ static int dx_parse_code(struct zint_symbol *symbol, const unsigned char *source *output_length = bp; + if ((symbol->show_hrt & 0x7) >= ZINT_HRT_LINEAR_ALL) { + z_hrt_printf_nochk(symbol, (*has_frame_info ? "%d-%d%s%s" : "%d-%d"), dx_code_1, dx_code_2, "/", + frame_info); + } + if (content_segs && z_ct_printf_256(symbol, (*has_frame_info ? "%d-%d%s%s" : "%d-%d"), dx_code_1, dx_code_2, "/", frame_info)) { return ZINT_ERROR_MEMORY; /* `z_ct_printf_256()` only fails with OOM */ diff --git a/backend/fonts/normal_bold_ttf.h b/backend/fonts/normal_bold_ttf.h new file mode 100644 index 00000000..0536c501 --- /dev/null +++ b/backend/fonts/normal_bold_ttf.h @@ -0,0 +1,1085 @@ +/* fonts/normal_bold_ttf.h - Arimo Bold TrueType as static array (`xxd -i -c 16 -n normal_bold_ttf`) */ +/* + libzint - the open source barcode library + Copyright (C) 2026 Robin Stuart + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the project nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + */ +/* SPDX-License-Identifier: BSD-3-Clause */ + +#ifndef Z_NORMAL_BOLD_TTF_H +#define Z_NORMAL_BOLD_TTF_H + +/* + Copyright 2013 Steve Matteson + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +/* SPDX-License-Identifier: Apache-2.0 */ +static const unsigned char normal_bold_ttf[16464] = { + 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x47, 0x44, 0x45, 0x46, + 0x00, 0x10, 0x00, 0x9b, 0x00, 0x00, 0x3d, 0x70, 0x00, 0x00, 0x00, 0x16, 0x47, 0x50, 0x4f, 0x53, + 0x9d, 0xe1, 0xcb, 0x08, 0x00, 0x00, 0x3d, 0x88, 0x00, 0x00, 0x02, 0x56, 0x47, 0x53, 0x55, 0x42, + 0xa6, 0x21, 0xa9, 0x11, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 0x00, 0x2c, 0x4f, 0x53, 0x2f, 0x32, + 0x79, 0x4e, 0xab, 0x46, 0x00, 0x00, 0x3a, 0x20, 0x00, 0x00, 0x00, 0x60, 0x53, 0x54, 0x41, 0x54, + 0xe5, 0xd8, 0xcc, 0x16, 0x00, 0x00, 0x40, 0x0c, 0x00, 0x00, 0x00, 0x44, 0x63, 0x6d, 0x61, 0x70, + 0x1c, 0xe6, 0x1b, 0xfa, 0x00, 0x00, 0x3a, 0x80, 0x00, 0x00, 0x00, 0xfc, 0x67, 0x61, 0x73, 0x70, + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x3d, 0x68, 0x00, 0x00, 0x00, 0x08, 0x67, 0x6c, 0x79, 0x66, + 0x51, 0x5f, 0x91, 0xfc, 0x00, 0x00, 0x01, 0x0c, 0x00, 0x00, 0x33, 0xd6, 0x68, 0x65, 0x61, 0x64, + 0x26, 0x87, 0x79, 0xb7, 0x00, 0x00, 0x36, 0x9c, 0x00, 0x00, 0x00, 0x36, 0x68, 0x68, 0x65, 0x61, + 0x19, 0x8a, 0x10, 0x45, 0x00, 0x00, 0x39, 0xfc, 0x00, 0x00, 0x00, 0x24, 0x68, 0x6d, 0x74, 0x78, + 0x7a, 0xa0, 0x39, 0x8a, 0x00, 0x00, 0x36, 0xd4, 0x00, 0x00, 0x03, 0x28, 0x6c, 0x6f, 0x63, 0x61, + 0x9c, 0x36, 0x8f, 0x60, 0x00, 0x00, 0x35, 0x04, 0x00, 0x00, 0x01, 0x96, 0x6d, 0x61, 0x78, 0x70, + 0x01, 0x29, 0x01, 0xb4, 0x00, 0x00, 0x34, 0xe4, 0x00, 0x00, 0x00, 0x20, 0x6e, 0x61, 0x6d, 0x65, + 0x29, 0xcb, 0x49, 0x1b, 0x00, 0x00, 0x3b, 0x84, 0x00, 0x00, 0x01, 0xc4, 0x70, 0x6f, 0x73, 0x74, + 0xff, 0x2a, 0x00, 0x96, 0x00, 0x00, 0x3d, 0x48, 0x00, 0x00, 0x00, 0x20, 0x70, 0x72, 0x65, 0x70, + 0x68, 0x06, 0x8c, 0x85, 0x00, 0x00, 0x3b, 0x7c, 0x00, 0x00, 0x00, 0x07, 0x00, 0x02, 0x00, 0xc1, + 0x00, 0x00, 0x01, 0xe7, 0x05, 0x81, 0x00, 0x03, 0x00, 0x07, 0x00, 0x00, 0x41, 0x03, 0x23, 0x03, + 0x01, 0x11, 0x21, 0x11, 0x01, 0xe7, 0x20, 0xe6, 0x20, 0x01, 0x20, 0xfe, 0xe0, 0x05, 0x81, 0xfc, + 0x29, 0x03, 0xd7, 0xfb, 0x8d, 0xfe, 0xf2, 0x01, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x87, 0x03, 0x82, + 0x03, 0x44, 0x05, 0x81, 0x00, 0x03, 0x00, 0x07, 0x00, 0x00, 0x41, 0x03, 0x23, 0x03, 0x23, 0x03, + 0x23, 0x03, 0x03, 0x44, 0x1d, 0xdb, 0x1b, 0x99, 0x1b, 0xdb, 0x1b, 0x05, 0x81, 0xfe, 0x01, 0x01, + 0xff, 0xfe, 0x01, 0x01, 0xff, 0x00, 0x00, 0x02, 0x00, 0x23, 0x00, 0x00, 0x04, 0x52, 0x05, 0x73, + 0x00, 0x1b, 0x00, 0x1f, 0x00, 0x00, 0x41, 0x03, 0x23, 0x13, 0x23, 0x35, 0x33, 0x13, 0x23, 0x35, + 0x33, 0x13, 0x33, 0x03, 0x21, 0x13, 0x33, 0x03, 0x33, 0x15, 0x23, 0x03, 0x33, 0x15, 0x23, 0x03, + 0x23, 0x13, 0x25, 0x21, 0x13, 0x21, 0x01, 0x58, 0x50, 0x99, 0x4f, 0x9b, 0xbc, 0x46, 0xcf, 0xee, + 0x54, 0x99, 0x52, 0x01, 0x33, 0x54, 0x9c, 0x54, 0xa4, 0xc5, 0x45, 0xd7, 0xf6, 0x52, 0x9c, 0x50, + 0xfe, 0xee, 0x01, 0x35, 0x46, 0xfe, 0xcd, 0x01, 0x7d, 0xfe, 0x83, 0x01, 0x7d, 0x95, 0x01, 0x4c, + 0x94, 0x01, 0x81, 0xfe, 0x7f, 0x01, 0x81, 0xfe, 0x7f, 0x94, 0xfe, 0xb4, 0x95, 0xfe, 0x83, 0x01, + 0x7d, 0x95, 0x01, 0x4c, 0x00, 0x03, 0x00, 0x1b, 0xff, 0x68, 0x04, 0x56, 0x05, 0xf0, 0x00, 0x29, + 0x00, 0x31, 0x00, 0x3a, 0x00, 0x00, 0x65, 0x26, 0x26, 0x27, 0x25, 0x16, 0x16, 0x17, 0x11, 0x2e, + 0x02, 0x27, 0x26, 0x26, 0x35, 0x34, 0x36, 0x37, 0x35, 0x33, 0x15, 0x1e, 0x02, 0x17, 0x05, 0x26, + 0x26, 0x27, 0x11, 0x16, 0x16, 0x17, 0x16, 0x16, 0x15, 0x14, 0x06, 0x07, 0x15, 0x23, 0x03, 0x14, + 0x17, 0x16, 0x16, 0x17, 0x11, 0x06, 0x01, 0x34, 0x26, 0x27, 0x26, 0x27, 0x11, 0x36, 0x36, 0x02, + 0x08, 0xd7, 0xf0, 0x26, 0x01, 0x00, 0x13, 0x71, 0x69, 0x26, 0x68, 0x64, 0x21, 0x52, 0x5b, 0xe5, + 0xdb, 0x6d, 0x7b, 0xaf, 0x73, 0x21, 0xfe, 0xf8, 0x0f, 0x57, 0x50, 0x17, 0x5b, 0x4a, 0x93, 0x92, + 0xf3, 0xee, 0x6d, 0xba, 0x10, 0x13, 0x4e, 0x49, 0xba, 0x02, 0x04, 0x23, 0x23, 0x23, 0x74, 0x6e, + 0x6f, 0x14, 0x08, 0xbb, 0xc1, 0x2f, 0x71, 0x69, 0x0a, 0x01, 0x87, 0x09, 0x1d, 0x25, 0x14, 0x32, + 0x9b, 0x70, 0xa6, 0xb6, 0x08, 0x86, 0x86, 0x06, 0x40, 0x94, 0x84, 0x27, 0x57, 0x5f, 0x0b, 0xfe, + 0xa0, 0x04, 0x16, 0x18, 0x30, 0xbb, 0x8d, 0xb5, 0xc7, 0x09, 0xaf, 0x04, 0xa2, 0x2d, 0x1c, 0x24, + 0x26, 0x19, 0x01, 0x4c, 0x0d, 0xfc, 0xfb, 0x32, 0x3f, 0x14, 0x14, 0x21, 0xfe, 0x91, 0x08, 0x5a, + 0x00, 0x05, 0x00, 0x33, 0xff, 0xf0, 0x06, 0xe7, 0x05, 0x91, 0x00, 0x0a, 0x00, 0x0e, 0x00, 0x1a, + 0x00, 0x26, 0x00, 0x32, 0x00, 0x00, 0x41, 0x20, 0x11, 0x14, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, + 0x36, 0x05, 0x01, 0x23, 0x01, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x33, 0x32, + 0x36, 0x01, 0x14, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x07, 0x34, 0x26, + 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, 0x01, 0x98, 0x01, 0x60, 0xb5, 0xb0, 0xae, + 0xb2, 0xac, 0x04, 0xe4, 0xfc, 0x65, 0xce, 0x03, 0x98, 0xfd, 0x2d, 0x3d, 0x4a, 0x50, 0x3e, 0x41, + 0x4b, 0x4a, 0x3f, 0x04, 0xc8, 0xb4, 0xae, 0xb0, 0xb2, 0xac, 0xba, 0xb4, 0xaa, 0xd7, 0x3d, 0x4a, + 0x50, 0x3d, 0x41, 0x4a, 0x49, 0x40, 0x05, 0x91, 0xfe, 0x40, 0xda, 0xe7, 0xe5, 0xdc, 0xe3, 0xdd, + 0x10, 0xfa, 0x7f, 0x05, 0x81, 0xfe, 0x50, 0x9e, 0x87, 0x87, 0x9e, 0x9d, 0x88, 0x88, 0xfe, 0x7c, + 0xda, 0xe6, 0xe4, 0xdc, 0xe0, 0xe1, 0xe3, 0xde, 0xa0, 0x87, 0x8b, 0x9c, 0xa1, 0x82, 0x88, 0x00, + 0x00, 0x03, 0x00, 0x5a, 0xff, 0xec, 0x05, 0x87, 0x05, 0x89, 0x00, 0x27, 0x00, 0x34, 0x00, 0x3f, + 0x00, 0x00, 0x53, 0x34, 0x36, 0x37, 0x26, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, + 0x06, 0x07, 0x06, 0x06, 0x07, 0x16, 0x17, 0x36, 0x37, 0x17, 0x06, 0x07, 0x16, 0x33, 0x32, 0x37, + 0x15, 0x06, 0x23, 0x22, 0x26, 0x27, 0x06, 0x23, 0x22, 0x26, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, + 0x15, 0x14, 0x17, 0x36, 0x37, 0x36, 0x36, 0x03, 0x26, 0x26, 0x27, 0x06, 0x15, 0x14, 0x16, 0x33, + 0x32, 0x36, 0x5a, 0xa2, 0xb0, 0x25, 0x25, 0xc4, 0xb5, 0xa8, 0xc3, 0x4e, 0x47, 0x24, 0x79, 0x56, + 0x64, 0x90, 0x68, 0x36, 0xd1, 0x43, 0x7e, 0x55, 0x5d, 0x42, 0x33, 0x36, 0x4d, 0x56, 0xad, 0x47, + 0xa9, 0xd2, 0xe7, 0xfe, 0x03, 0x0c, 0x4c, 0x41, 0x4d, 0x51, 0x36, 0x6a, 0x2d, 0x2d, 0x31, 0x52, + 0x53, 0x88, 0x35, 0xac, 0x82, 0x70, 0x41, 0x69, 0x01, 0x81, 0x87, 0xd3, 0x52, 0x4b, 0x8c, 0x40, + 0x9c, 0xa9, 0xa0, 0x89, 0x4d, 0x7c, 0x35, 0x1a, 0x43, 0x28, 0xb1, 0x9f, 0x9f, 0xcc, 0x46, 0xe6, + 0xbe, 0x49, 0x10, 0xcb, 0x16, 0x3e, 0x3b, 0x81, 0xd5, 0x03, 0x9d, 0x39, 0x48, 0x56, 0x47, 0x56, + 0x6b, 0x2d, 0x1f, 0x1f, 0x46, 0xfc, 0xc4, 0x5c, 0xbd, 0x60, 0x51, 0x99, 0x63, 0x78, 0x30, 0x00, + 0x00, 0x01, 0x00, 0x6d, 0x03, 0x82, 0x01, 0x7d, 0x05, 0x81, 0x00, 0x03, 0x00, 0x00, 0x41, 0x03, + 0x23, 0x03, 0x01, 0x7d, 0x1b, 0xdb, 0x1a, 0x05, 0x81, 0xfe, 0x01, 0x01, 0xff, 0x00, 0x00, 0x01, + 0x00, 0x66, 0xfe, 0x57, 0x02, 0xa8, 0x05, 0xcc, 0x00, 0x10, 0x00, 0x00, 0x41, 0x26, 0x02, 0x02, + 0x35, 0x34, 0x12, 0x12, 0x37, 0x21, 0x06, 0x02, 0x11, 0x14, 0x12, 0x12, 0x17, 0x01, 0x8f, 0x68, + 0x84, 0x3d, 0x3d, 0x84, 0x68, 0x01, 0x19, 0x9e, 0x8f, 0x3e, 0x85, 0x6a, 0xfe, 0x57, 0x97, 0x01, + 0x29, 0x01, 0x42, 0xba, 0xba, 0x01, 0x41, 0x01, 0x28, 0x96, 0xe4, 0xfe, 0x3c, 0xfe, 0xee, 0xb6, + 0xfe, 0xc2, 0xfe, 0xd5, 0x9c, 0x00, 0x00, 0x01, 0x00, 0x02, 0xfe, 0x57, 0x02, 0x44, 0x05, 0xcc, + 0x00, 0x10, 0x00, 0x00, 0x53, 0x36, 0x12, 0x12, 0x35, 0x10, 0x02, 0x27, 0x21, 0x16, 0x12, 0x12, + 0x15, 0x14, 0x02, 0x02, 0x07, 0x02, 0x6b, 0x84, 0x3e, 0x90, 0x9d, 0x01, 0x19, 0x6a, 0x82, 0x3d, + 0x3d, 0x82, 0x6a, 0xfe, 0x57, 0x9c, 0x01, 0x2b, 0x01, 0x3e, 0xb6, 0x01, 0x13, 0x01, 0xc5, 0xe2, + 0x97, 0xfe, 0xd6, 0xfe, 0xc0, 0xb8, 0xb9, 0xfe, 0xbf, 0xfe, 0xd6, 0x98, 0x00, 0x01, 0x00, 0x06, + 0x02, 0x87, 0x03, 0x1b, 0x05, 0x81, 0x00, 0x0e, 0x00, 0x00, 0x41, 0x07, 0x27, 0x07, 0x27, 0x37, + 0x27, 0x37, 0x17, 0x03, 0x33, 0x03, 0x37, 0x17, 0x07, 0x02, 0xdb, 0xb8, 0x92, 0x95, 0xba, 0xbe, + 0xfa, 0x44, 0xef, 0x12, 0xd7, 0x12, 0xeb, 0x44, 0xfa, 0x03, 0x00, 0x79, 0xfc, 0xfc, 0x7b, 0xd3, + 0x3d, 0xc5, 0x68, 0x01, 0x12, 0xfe, 0xee, 0x68, 0xc5, 0x3d, 0x00, 0x01, 0x00, 0x56, 0x00, 0xa1, + 0x04, 0x59, 0x04, 0xb1, 0x00, 0x0b, 0x00, 0x00, 0x41, 0x11, 0x23, 0x11, 0x21, 0x35, 0x21, 0x11, + 0x33, 0x11, 0x21, 0x15, 0x02, 0xc7, 0xe2, 0xfe, 0x71, 0x01, 0x8f, 0xe2, 0x01, 0x92, 0x02, 0x39, + 0xfe, 0x68, 0x01, 0x98, 0xe0, 0x01, 0x98, 0xfe, 0x68, 0xe0, 0x00, 0x01, 0x00, 0x8b, 0xfe, 0xc3, + 0x01, 0xb0, 0x01, 0x31, 0x00, 0x0a, 0x00, 0x00, 0x65, 0x14, 0x06, 0x07, 0x23, 0x36, 0x36, 0x35, + 0x23, 0x11, 0x21, 0x01, 0xb0, 0x33, 0x39, 0xb9, 0x3b, 0x4a, 0x81, 0x01, 0x21, 0x42, 0x78, 0xb8, + 0x4f, 0x47, 0xaa, 0x4c, 0x01, 0x31, 0x00, 0x01, 0x00, 0x50, 0x01, 0x99, 0x02, 0x58, 0x02, 0x8d, + 0x00, 0x03, 0x00, 0x00, 0x41, 0x15, 0x21, 0x35, 0x02, 0x58, 0xfd, 0xf8, 0x02, 0x8d, 0xf4, 0xf4, + 0x00, 0x01, 0x00, 0x8b, 0x00, 0x00, 0x01, 0xac, 0x01, 0x31, 0x00, 0x03, 0x00, 0x00, 0x41, 0x11, + 0x21, 0x11, 0x01, 0xac, 0xfe, 0xdf, 0x01, 0x31, 0xfe, 0xcf, 0x01, 0x31, 0x00, 0x01, 0x00, 0x14, + 0xff, 0xd7, 0x02, 0x25, 0x05, 0xcc, 0x00, 0x03, 0x00, 0x00, 0x41, 0x01, 0x23, 0x01, 0x02, 0x25, + 0xfe, 0xe2, 0xf3, 0x01, 0x23, 0x05, 0xcc, 0xfa, 0x0b, 0x05, 0xf5, 0x00, 0x00, 0x02, 0x00, 0x51, + 0xff, 0xec, 0x04, 0x1f, 0x05, 0x96, 0x00, 0x0b, 0x00, 0x1a, 0x00, 0x00, 0x41, 0x10, 0x02, 0x23, + 0x22, 0x02, 0x11, 0x10, 0x12, 0x21, 0x32, 0x12, 0x01, 0x34, 0x26, 0x26, 0x23, 0x22, 0x06, 0x06, + 0x15, 0x14, 0x16, 0x16, 0x33, 0x32, 0x36, 0x04, 0x1f, 0xf5, 0xf5, 0xf2, 0xf2, 0xe7, 0x01, 0x05, + 0xfa, 0xe8, 0xfe, 0xe6, 0x22, 0x58, 0x50, 0x55, 0x5b, 0x21, 0x23, 0x59, 0x51, 0x78, 0x56, 0x02, + 0xc1, 0xfe, 0x9b, 0xfe, 0x90, 0x01, 0x6b, 0x01, 0x6a, 0x01, 0x73, 0x01, 0x62, 0xfe, 0x96, 0xfe, + 0x95, 0xbe, 0xdd, 0x5e, 0x5f, 0xdd, 0xbd, 0xbd, 0xdd, 0x5e, 0xe8, 0x00, 0x00, 0x01, 0x00, 0x81, + 0x00, 0x00, 0x04, 0x3a, 0x05, 0x81, 0x00, 0x0a, 0x00, 0x00, 0x65, 0x15, 0x21, 0x35, 0x21, 0x11, + 0x05, 0x35, 0x25, 0x21, 0x11, 0x04, 0x3a, 0xfc, 0x47, 0x01, 0x5d, 0xfe, 0xae, 0x01, 0x61, 0x01, + 0x0a, 0xd1, 0xd1, 0xd1, 0x03, 0xc1, 0xd3, 0xdd, 0xe5, 0xfb, 0x50, 0x00, 0x00, 0x01, 0x00, 0x47, + 0x00, 0x00, 0x04, 0x21, 0x05, 0x96, 0x00, 0x23, 0x00, 0x00, 0x65, 0x15, 0x21, 0x35, 0x3e, 0x02, + 0x37, 0x36, 0x36, 0x37, 0x36, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x25, 0x36, 0x36, + 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x07, 0x06, 0x06, 0x07, 0x06, 0x06, 0x07, 0x04, 0x21, 0xfc, + 0x26, 0x25, 0x72, 0x9f, 0x66, 0x4a, 0x68, 0x1d, 0x1e, 0x1e, 0x5d, 0x5c, 0x5a, 0x5f, 0x0e, 0xfe, + 0xe5, 0x18, 0xf5, 0xd3, 0xe4, 0xf4, 0x58, 0x44, 0x38, 0x8d, 0x42, 0x46, 0x73, 0x1c, 0xe7, 0xe7, + 0xc3, 0x51, 0x9b, 0x9d, 0x53, 0x3c, 0x63, 0x27, 0x27, 0x4d, 0x25, 0x5c, 0x5c, 0x61, 0x61, 0x10, + 0xc4, 0xce, 0xd0, 0xbc, 0x6a, 0xa8, 0x47, 0x3d, 0x6e, 0x34, 0x38, 0x72, 0x41, 0x00, 0x00, 0x01, + 0x00, 0x2f, 0xff, 0xe9, 0x04, 0x29, 0x05, 0x96, 0x00, 0x28, 0x00, 0x00, 0x41, 0x14, 0x04, 0x23, + 0x22, 0x24, 0x27, 0x25, 0x16, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x23, 0x23, 0x35, 0x33, 0x32, + 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x25, 0x36, 0x24, 0x33, 0x32, 0x16, 0x15, 0x14, + 0x06, 0x07, 0x15, 0x16, 0x16, 0x04, 0x29, 0xfe, 0xfc, 0xf0, 0xe3, 0xfe, 0xf4, 0x17, 0x01, 0x1e, + 0x1b, 0xcc, 0x65, 0x70, 0x88, 0x86, 0x62, 0x5c, 0x79, 0x7a, 0x61, 0x5d, 0x57, 0x6b, 0x08, 0xfe, + 0xe7, 0x16, 0x01, 0x02, 0xd0, 0xdd, 0xf9, 0x9b, 0x92, 0xa2, 0xaf, 0x01, 0x87, 0xc6, 0xd8, 0xd1, + 0xc5, 0x19, 0xcb, 0x64, 0x67, 0x5e, 0x64, 0xe3, 0x63, 0x5c, 0x57, 0x63, 0x60, 0x58, 0x14, 0xb6, + 0xce, 0xc7, 0xb0, 0x84, 0xaa, 0x1c, 0x04, 0x13, 0xaf, 0x00, 0x00, 0x02, 0x00, 0x1f, 0x00, 0x00, + 0x04, 0x68, 0x05, 0x81, 0x00, 0x0a, 0x00, 0x13, 0x00, 0x00, 0x41, 0x11, 0x21, 0x11, 0x21, 0x35, + 0x01, 0x21, 0x11, 0x33, 0x15, 0x25, 0x21, 0x11, 0x34, 0x36, 0x37, 0x06, 0x06, 0x07, 0x03, 0xac, + 0xfe, 0xf4, 0xfd, 0x7f, 0x02, 0x53, 0x01, 0x3a, 0xbc, 0xfc, 0x9c, 0x01, 0x9c, 0x07, 0x02, 0x0d, + 0x2f, 0x22, 0x01, 0x1f, 0xfe, 0xe1, 0x01, 0x1f, 0xd3, 0x03, 0x8f, 0xfc, 0x6f, 0xd1, 0xd1, 0x01, + 0xcd, 0x36, 0x7e, 0x12, 0x1c, 0x51, 0x35, 0x00, 0x00, 0x01, 0x00, 0x3f, 0xff, 0xec, 0x04, 0x3a, + 0x05, 0x81, 0x00, 0x1e, 0x00, 0x00, 0x41, 0x14, 0x00, 0x23, 0x22, 0x26, 0x27, 0x25, 0x16, 0x16, + 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x21, 0x13, 0x21, 0x15, 0x21, 0x03, + 0x36, 0x33, 0x32, 0x16, 0x16, 0x04, 0x3a, 0xfe, 0xe9, 0xf3, 0xd4, 0xff, 0x1e, 0x01, 0x19, 0x16, + 0x70, 0x55, 0x69, 0x7d, 0x76, 0x6a, 0x3a, 0x60, 0x25, 0xfe, 0xee, 0x31, 0x03, 0x4f, 0xfd, 0xb0, + 0x17, 0x66, 0x99, 0x86, 0xc7, 0x6d, 0x01, 0xd5, 0xe0, 0xfe, 0xf7, 0xbf, 0xb5, 0x17, 0x5a, 0x52, + 0x86, 0x7e, 0x6f, 0x85, 0x2d, 0x2e, 0x03, 0x19, 0xd1, 0xfe, 0x9c, 0x5a, 0x71, 0xd0, 0x00, 0x02, + 0x00, 0x4b, 0xff, 0xec, 0x04, 0x29, 0x05, 0x96, 0x00, 0x17, 0x00, 0x24, 0x00, 0x00, 0x41, 0x14, + 0x02, 0x23, 0x22, 0x00, 0x11, 0x10, 0x00, 0x33, 0x32, 0x16, 0x17, 0x05, 0x26, 0x23, 0x22, 0x06, + 0x15, 0x36, 0x36, 0x33, 0x32, 0x16, 0x05, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x16, + 0x33, 0x32, 0x36, 0x04, 0x29, 0xfc, 0xde, 0xf9, 0xfe, 0xf5, 0x01, 0x0f, 0xfc, 0xb3, 0xcf, 0x2b, + 0xfe, 0xf7, 0x25, 0x85, 0x71, 0x81, 0x2d, 0xa0, 0x65, 0xbd, 0xdc, 0xfe, 0xe6, 0x6f, 0x61, 0x5d, + 0x70, 0x35, 0x60, 0x3f, 0x5f, 0x6a, 0x01, 0xcd, 0xe1, 0xff, 0x00, 0x01, 0x5d, 0x01, 0x57, 0x01, + 0x79, 0x01, 0x7d, 0x9e, 0xa6, 0x25, 0x8b, 0xe2, 0xe6, 0x4b, 0x50, 0xf0, 0xd6, 0x78, 0x7f, 0x77, + 0x62, 0x52, 0x80, 0x4a, 0x87, 0x00, 0x00, 0x01, 0x00, 0x58, 0x00, 0x00, 0x04, 0x19, 0x05, 0x81, + 0x00, 0x10, 0x00, 0x00, 0x41, 0x06, 0x02, 0x07, 0x06, 0x02, 0x15, 0x21, 0x34, 0x12, 0x37, 0x36, + 0x12, 0x37, 0x21, 0x35, 0x21, 0x04, 0x19, 0x5f, 0xa9, 0x3f, 0x3f, 0x49, 0xfe, 0xdb, 0x46, 0x4c, + 0x32, 0xa4, 0x87, 0xfd, 0x44, 0x03, 0xc1, 0x04, 0xa2, 0x96, 0xfe, 0xe7, 0x8f, 0x8e, 0xfe, 0xd2, + 0xa8, 0xa1, 0x01, 0x21, 0xa0, 0x68, 0x01, 0x0c, 0xc4, 0xe7, 0x00, 0x03, 0x00, 0x41, 0xff, 0xec, + 0x04, 0x34, 0x05, 0x96, 0x00, 0x19, 0x00, 0x23, 0x00, 0x2f, 0x00, 0x00, 0x41, 0x14, 0x04, 0x23, + 0x22, 0x24, 0x35, 0x34, 0x36, 0x37, 0x35, 0x26, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, + 0x14, 0x06, 0x07, 0x15, 0x16, 0x16, 0x01, 0x34, 0x23, 0x22, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, + 0x13, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, 0x04, 0x34, 0xfe, 0xfa, + 0xf3, 0xf1, 0xfe, 0xf7, 0x9c, 0x83, 0x72, 0x8c, 0xf5, 0xe0, 0xe5, 0xf5, 0x8b, 0x75, 0x88, 0x9b, + 0xfe, 0xbc, 0xb9, 0xb6, 0x5c, 0x5c, 0x5c, 0x5b, 0x21, 0x6e, 0x6e, 0x66, 0x6d, 0x6c, 0x6f, 0x6d, + 0x67, 0x01, 0x8d, 0xc6, 0xdb, 0xda, 0xc5, 0x87, 0xb9, 0x16, 0x04, 0x19, 0xb0, 0x73, 0xad, 0xc8, + 0xc3, 0xb4, 0x73, 0xae, 0x17, 0x04, 0x16, 0xb3, 0x01, 0xf6, 0xc1, 0xc1, 0x65, 0x65, 0x5e, 0xfe, + 0x00, 0x6e, 0x6f, 0x74, 0x6d, 0x7c, 0x72, 0x72, 0x00, 0x02, 0x00, 0x47, 0xff, 0xec, 0x04, 0x27, + 0x05, 0x96, 0x00, 0x18, 0x00, 0x25, 0x00, 0x00, 0x41, 0x10, 0x00, 0x23, 0x22, 0x26, 0x27, 0x25, + 0x16, 0x33, 0x32, 0x36, 0x37, 0x06, 0x06, 0x23, 0x22, 0x26, 0x26, 0x35, 0x34, 0x24, 0x33, 0x32, + 0x12, 0x05, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, 0x36, 0x04, 0x27, + 0xfe, 0xee, 0xfc, 0xba, 0xd3, 0x2c, 0x01, 0x08, 0x27, 0x8d, 0x76, 0x7f, 0x02, 0x26, 0xad, 0x64, + 0x7c, 0xb6, 0x63, 0x01, 0x01, 0xeb, 0xfd, 0xf7, 0xfe, 0xd7, 0x73, 0x5f, 0x5d, 0x6b, 0x6a, 0x5f, + 0x3c, 0x5e, 0x37, 0x02, 0xd7, 0xfe, 0x89, 0xfe, 0x8c, 0x9f, 0xac, 0x25, 0x93, 0xe2, 0xde, 0x4b, + 0x55, 0x73, 0xd2, 0x90, 0xde, 0xfa, 0xfe, 0xa1, 0x9b, 0x83, 0x9b, 0x87, 0x77, 0x75, 0x8d, 0x38, + 0x66, 0x00, 0x00, 0x02, 0x00, 0xc5, 0x00, 0x00, 0x01, 0xe5, 0x04, 0x0a, 0x00, 0x03, 0x00, 0x07, + 0x00, 0x00, 0x41, 0x11, 0x21, 0x11, 0x01, 0x11, 0x21, 0x11, 0x01, 0xe5, 0xfe, 0xe0, 0x01, 0x20, + 0xfe, 0xe0, 0x04, 0x0a, 0xfe, 0xe6, 0x01, 0x1a, 0xfd, 0x0f, 0xfe, 0xe7, 0x01, 0x19, 0x00, 0x02, + 0x00, 0xc3, 0xfe, 0xc3, 0x01, 0xe7, 0x04, 0x0a, 0x00, 0x03, 0x00, 0x0e, 0x00, 0x00, 0x41, 0x11, + 0x21, 0x11, 0x01, 0x14, 0x06, 0x07, 0x23, 0x36, 0x36, 0x35, 0x23, 0x11, 0x21, 0x01, 0xe7, 0xfe, + 0xe0, 0x01, 0x20, 0x33, 0x39, 0xb8, 0x40, 0x45, 0x81, 0x01, 0x20, 0x04, 0x0a, 0xfe, 0xe6, 0x01, + 0x1a, 0xfc, 0x38, 0x78, 0xb8, 0x4f, 0x51, 0xa5, 0x47, 0x01, 0x19, 0x00, 0x00, 0x01, 0x00, 0x56, + 0x00, 0x7d, 0x04, 0x59, 0x04, 0xcd, 0x00, 0x06, 0x00, 0x00, 0x41, 0x15, 0x01, 0x11, 0x01, 0x15, + 0x01, 0x04, 0x59, 0xfb, 0xfd, 0x04, 0x03, 0xfc, 0xbf, 0x01, 0x60, 0xe3, 0x01, 0x87, 0x01, 0x42, + 0x01, 0x87, 0xe4, 0xfe, 0xbb, 0x00, 0x00, 0x02, 0x00, 0x55, 0x01, 0x23, 0x04, 0x58, 0x04, 0x29, + 0x00, 0x03, 0x00, 0x07, 0x00, 0x00, 0x41, 0x15, 0x21, 0x35, 0x01, 0x15, 0x21, 0x35, 0x04, 0x58, + 0xfb, 0xfd, 0x04, 0x03, 0xfb, 0xfd, 0x04, 0x29, 0xdf, 0xdf, 0xfd, 0xd7, 0xdd, 0xdd, 0x00, 0x01, + 0x00, 0x56, 0x00, 0x7d, 0x04, 0x59, 0x04, 0xcd, 0x00, 0x06, 0x00, 0x00, 0x41, 0x01, 0x35, 0x01, + 0x01, 0x35, 0x01, 0x04, 0x59, 0xfb, 0xfd, 0x03, 0x40, 0xfc, 0xc0, 0x04, 0x03, 0x02, 0x04, 0xfe, + 0x79, 0xe3, 0x01, 0x44, 0x01, 0x45, 0xe4, 0xfe, 0x79, 0x00, 0x00, 0x02, 0x00, 0x5e, 0x00, 0x00, + 0x04, 0x6d, 0x05, 0x96, 0x00, 0x1b, 0x00, 0x1f, 0x00, 0x00, 0x41, 0x14, 0x06, 0x07, 0x07, 0x06, + 0x07, 0x21, 0x3e, 0x02, 0x37, 0x3e, 0x02, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x25, 0x36, + 0x24, 0x33, 0x32, 0x04, 0x01, 0x11, 0x21, 0x11, 0x04, 0x6d, 0x57, 0x77, 0x4c, 0x84, 0x06, 0xfe, + 0xf5, 0x04, 0x30, 0x5b, 0x42, 0x48, 0x55, 0x26, 0x73, 0x6a, 0x65, 0x89, 0x0c, 0xfe, 0xe3, 0x1b, + 0x01, 0x18, 0xe0, 0xed, 0x01, 0x0f, 0xfe, 0x6a, 0xfe, 0xdf, 0x04, 0x02, 0x61, 0x9a, 0x55, 0x37, + 0x5e, 0x73, 0x44, 0x74, 0x66, 0x2e, 0x32, 0x51, 0x4f, 0x2e, 0x58, 0x66, 0x76, 0x61, 0x0c, 0xcb, + 0xe2, 0xd7, 0xfc, 0x4f, 0xfe, 0xf2, 0x01, 0x0e, 0x00, 0x02, 0x00, 0x75, 0xfe, 0xbc, 0x07, 0x56, + 0x05, 0xae, 0x00, 0x4b, 0x00, 0x5d, 0x00, 0x00, 0x41, 0x14, 0x07, 0x06, 0x06, 0x23, 0x22, 0x26, + 0x35, 0x34, 0x36, 0x37, 0x23, 0x06, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x37, 0x36, 0x36, 0x33, + 0x32, 0x17, 0x33, 0x37, 0x33, 0x03, 0x06, 0x15, 0x14, 0x16, 0x33, 0x32, 0x37, 0x36, 0x36, 0x35, + 0x34, 0x27, 0x26, 0x24, 0x23, 0x22, 0x07, 0x06, 0x02, 0x15, 0x14, 0x17, 0x16, 0x04, 0x33, 0x32, + 0x24, 0x37, 0x17, 0x06, 0x04, 0x23, 0x22, 0x27, 0x26, 0x02, 0x35, 0x10, 0x37, 0x36, 0x24, 0x21, + 0x32, 0x17, 0x16, 0x12, 0x05, 0x34, 0x26, 0x23, 0x22, 0x07, 0x06, 0x06, 0x15, 0x14, 0x16, 0x33, + 0x32, 0x36, 0x37, 0x3e, 0x02, 0x07, 0x56, 0x3f, 0x40, 0xe0, 0x82, 0x5c, 0x63, 0x03, 0x03, 0x06, + 0x32, 0xc5, 0x67, 0x9d, 0xad, 0x41, 0x41, 0xe4, 0x8e, 0xc3, 0x45, 0x06, 0x27, 0x9c, 0x75, 0x25, + 0x2f, 0x1f, 0x50, 0x49, 0x49, 0x55, 0x4c, 0x4c, 0xfe, 0xdf, 0xbf, 0xf0, 0xb7, 0xb7, 0xd1, 0x50, + 0x50, 0x01, 0x1f, 0xc2, 0x93, 0x01, 0x26, 0x94, 0x3e, 0xa8, 0xfe, 0xbf, 0xa9, 0xec, 0xb3, 0xb4, + 0xc9, 0x7f, 0x7e, 0x01, 0xbe, 0x01, 0x14, 0xf3, 0xb2, 0xb2, 0xbb, 0xfd, 0x79, 0x77, 0x5e, 0x5e, + 0x4a, 0x4b, 0x53, 0x61, 0x64, 0x42, 0x7d, 0x31, 0x21, 0x2d, 0x18, 0x02, 0xd5, 0xb6, 0x96, 0x96, + 0xa9, 0x5b, 0x51, 0x13, 0x21, 0x0f, 0x69, 0x86, 0xcb, 0xb6, 0xa2, 0x90, 0x8f, 0xa3, 0xae, 0x98, + 0xfe, 0x06, 0xaa, 0x46, 0x32, 0x2a, 0x46, 0x45, 0xe9, 0x8c, 0xb0, 0x86, 0x86, 0x92, 0x69, 0x69, + 0xfe, 0x74, 0xf6, 0xc2, 0x94, 0x94, 0x97, 0x4e, 0x4d, 0x7a, 0x5f, 0x52, 0x60, 0x5f, 0x01, 0x69, + 0xe9, 0x01, 0x1b, 0xe5, 0xe5, 0xfc, 0x5a, 0x5b, 0xfe, 0xb6, 0xde, 0x5f, 0x78, 0x3e, 0x3f, 0xe5, + 0x79, 0x72, 0x84, 0x55, 0x4f, 0x35, 0x81, 0x78, 0x00, 0x02, 0x00, 0x33, 0x00, 0x00, 0x05, 0x91, + 0x05, 0x81, 0x00, 0x07, 0x00, 0x10, 0x00, 0x00, 0x41, 0x03, 0x21, 0x01, 0x21, 0x01, 0x21, 0x03, + 0x01, 0x06, 0x06, 0x07, 0x03, 0x21, 0x03, 0x26, 0x26, 0x01, 0xd7, 0x7d, 0xfe, 0xd9, 0x02, 0x02, + 0x01, 0x5c, 0x02, 0x00, 0xfe, 0xdc, 0x7d, 0xfe, 0xf3, 0x0a, 0x24, 0x08, 0x94, 0x01, 0x95, 0x98, + 0x0e, 0x18, 0x01, 0x68, 0xfe, 0x98, 0x05, 0x81, 0xfa, 0x7f, 0x01, 0x68, 0x03, 0x40, 0x28, 0x70, + 0x17, 0xfe, 0x4d, 0x01, 0xbc, 0x29, 0x54, 0x00, 0x00, 0x03, 0x00, 0x89, 0x00, 0x00, 0x05, 0x6a, + 0x05, 0x81, 0x00, 0x0e, 0x00, 0x17, 0x00, 0x1f, 0x00, 0x00, 0x41, 0x14, 0x04, 0x21, 0x21, 0x11, + 0x21, 0x20, 0x04, 0x15, 0x14, 0x06, 0x07, 0x16, 0x16, 0x01, 0x34, 0x26, 0x23, 0x21, 0x11, 0x21, + 0x32, 0x36, 0x13, 0x34, 0x21, 0x21, 0x11, 0x21, 0x32, 0x36, 0x05, 0x6a, 0xfe, 0xe0, 0xff, 0x00, + 0xfd, 0x3f, 0x02, 0x85, 0x01, 0x02, 0x01, 0x09, 0x85, 0x88, 0xab, 0xb3, 0xfe, 0x86, 0x79, 0x77, + 0xfe, 0xb0, 0x01, 0x52, 0x7d, 0x71, 0x52, 0xfe, 0xe4, 0xfe, 0x8a, 0x01, 0x81, 0x8e, 0x83, 0x01, + 0x92, 0xc0, 0xd2, 0x05, 0x81, 0xb3, 0xaf, 0x78, 0xa5, 0x1d, 0x14, 0xaf, 0x01, 0xd5, 0x5f, 0x50, + 0xfe, 0xa3, 0x57, 0xfe, 0x09, 0xc6, 0xfe, 0x6c, 0x67, 0x00, 0x00, 0x01, 0x00, 0x54, 0xff, 0xec, + 0x05, 0x8f, 0x05, 0x96, 0x00, 0x1b, 0x00, 0x00, 0x65, 0x20, 0x13, 0x05, 0x06, 0x04, 0x23, 0x22, + 0x24, 0x02, 0x35, 0x34, 0x12, 0x24, 0x33, 0x32, 0x04, 0x17, 0x05, 0x26, 0x26, 0x23, 0x22, 0x06, + 0x15, 0x14, 0x16, 0x16, 0x03, 0x1b, 0x01, 0x0c, 0x67, 0x01, 0x01, 0x53, 0xfe, 0xbf, 0xe0, 0xe2, + 0xfe, 0xc2, 0xa7, 0xa0, 0x01, 0x38, 0xe2, 0xf8, 0x01, 0x38, 0x3f, 0xfe, 0xfc, 0x21, 0xc1, 0x83, + 0xc8, 0xcf, 0x5f, 0xb9, 0xd4, 0x01, 0x0c, 0x61, 0xcc, 0xc7, 0xad, 0x01, 0x48, 0xe6, 0xe8, 0x01, + 0x40, 0xa7, 0xc7, 0xc1, 0x47, 0x6a, 0x7d, 0xf8, 0xef, 0xa2, 0xde, 0x73, 0x00, 0x02, 0x00, 0x89, + 0x00, 0x00, 0x05, 0x71, 0x05, 0x81, 0x00, 0x09, 0x00, 0x13, 0x00, 0x00, 0x41, 0x14, 0x02, 0x04, + 0x23, 0x21, 0x11, 0x21, 0x20, 0x00, 0x01, 0x34, 0x26, 0x23, 0x23, 0x11, 0x33, 0x32, 0x36, 0x36, + 0x05, 0x71, 0xaf, 0xfe, 0xcb, 0xca, 0xfd, 0xc6, 0x01, 0xfe, 0x01, 0x64, 0x01, 0x86, 0xfe, 0xd7, + 0xec, 0xdb, 0xd1, 0xfa, 0x7f, 0xb9, 0x66, 0x02, 0xcb, 0xe2, 0xfe, 0xc0, 0xa9, 0x05, 0x81, 0xfe, + 0x99, 0xfe, 0xb1, 0xe3, 0xef, 0xfc, 0x47, 0x77, 0xda, 0x00, 0x00, 0x01, 0x00, 0x89, 0x00, 0x00, + 0x05, 0x06, 0x05, 0x81, 0x00, 0x0b, 0x00, 0x00, 0x65, 0x15, 0x21, 0x11, 0x21, 0x15, 0x21, 0x11, + 0x21, 0x15, 0x21, 0x11, 0x05, 0x06, 0xfb, 0x83, 0x04, 0x54, 0xfc, 0xd3, 0x02, 0xf0, 0xfd, 0x10, + 0xe4, 0xe4, 0x05, 0x81, 0xe4, 0xfe, 0x9e, 0xe4, 0xfe, 0x8d, 0x00, 0x01, 0x00, 0x89, 0x00, 0x00, + 0x04, 0x98, 0x05, 0x81, 0x00, 0x09, 0x00, 0x00, 0x41, 0x11, 0x21, 0x11, 0x21, 0x15, 0x21, 0x11, + 0x21, 0x15, 0x01, 0xb0, 0xfe, 0xd9, 0x04, 0x0f, 0xfd, 0x18, 0x02, 0xd1, 0x02, 0x05, 0xfd, 0xfb, + 0x05, 0x81, 0xe4, 0xfe, 0x4c, 0xe4, 0x00, 0x01, 0x00, 0x54, 0xff, 0xec, 0x05, 0xba, 0x05, 0x96, + 0x00, 0x1e, 0x00, 0x00, 0x65, 0x32, 0x36, 0x37, 0x35, 0x21, 0x35, 0x21, 0x11, 0x06, 0x04, 0x23, + 0x22, 0x24, 0x02, 0x35, 0x10, 0x00, 0x21, 0x32, 0x04, 0x17, 0x05, 0x26, 0x26, 0x23, 0x22, 0x06, + 0x15, 0x14, 0x12, 0x03, 0x26, 0x73, 0xd8, 0x3b, 0xfe, 0xa8, 0x02, 0x66, 0x70, 0xfe, 0x99, 0xc5, + 0xe5, 0xfe, 0xc1, 0xa6, 0x01, 0x74, 0x01, 0x5d, 0xf8, 0x01, 0x3c, 0x43, 0xfe, 0xf0, 0x2c, 0xbc, + 0x7f, 0xd0, 0xd8, 0xdf, 0xd3, 0x43, 0x34, 0xc3, 0xda, 0xfd, 0xfa, 0x73, 0x82, 0xab, 0x01, 0x47, + 0xe9, 0x01, 0x5c, 0x01, 0x73, 0xb7, 0xb8, 0x52, 0x6b, 0x6e, 0xfc, 0xeb, 0xef, 0xfe, 0xfb, 0x00, + 0x00, 0x01, 0x00, 0x89, 0x00, 0x00, 0x05, 0x3d, 0x05, 0x81, 0x00, 0x0b, 0x00, 0x00, 0x41, 0x11, + 0x21, 0x11, 0x21, 0x11, 0x21, 0x11, 0x21, 0x11, 0x21, 0x11, 0x01, 0xb0, 0xfe, 0xd9, 0x01, 0x27, + 0x02, 0x66, 0x01, 0x27, 0xfe, 0xd9, 0x02, 0x5c, 0xfd, 0xa4, 0x05, 0x81, 0xfd, 0xcf, 0x02, 0x31, + 0xfa, 0x7f, 0x02, 0x5c, 0x00, 0x01, 0x00, 0x89, 0x00, 0x00, 0x01, 0xb0, 0x05, 0x81, 0x00, 0x03, + 0x00, 0x00, 0x41, 0x11, 0x21, 0x11, 0x01, 0xb0, 0xfe, 0xd9, 0x05, 0x81, 0xfa, 0x7f, 0x05, 0x81, + 0x00, 0x01, 0x00, 0x1f, 0xff, 0xec, 0x03, 0xe7, 0x05, 0x81, 0x00, 0x11, 0x00, 0x00, 0x45, 0x22, + 0x26, 0x27, 0x25, 0x16, 0x16, 0x33, 0x32, 0x36, 0x35, 0x11, 0x21, 0x35, 0x21, 0x11, 0x14, 0x06, + 0x02, 0x0c, 0xdb, 0xeb, 0x27, 0x01, 0x25, 0x12, 0x62, 0x56, 0x58, 0x5b, 0xfe, 0xe7, 0x02, 0x3f, + 0xfa, 0x14, 0xbe, 0xd4, 0x2b, 0x6d, 0x69, 0x76, 0x6e, 0x02, 0xe3, 0xe7, 0xfc, 0x3d, 0xdc, 0xf6, + 0x00, 0x01, 0x00, 0x89, 0x00, 0x00, 0x05, 0xb4, 0x05, 0x81, 0x00, 0x0b, 0x00, 0x00, 0x41, 0x11, + 0x21, 0x11, 0x21, 0x11, 0x01, 0x21, 0x01, 0x01, 0x21, 0x01, 0x01, 0xb0, 0xfe, 0xd9, 0x01, 0x27, + 0x02, 0x7b, 0x01, 0x58, 0xfd, 0xa6, 0x02, 0x8b, 0xfe, 0xa4, 0xfe, 0x06, 0x02, 0x02, 0xfd, 0xfe, + 0x05, 0x81, 0xfd, 0x81, 0x02, 0x7f, 0xfd, 0xac, 0xfc, 0xd3, 0x02, 0x87, 0x00, 0x01, 0x00, 0x89, + 0x00, 0x00, 0x04, 0xa4, 0x05, 0x81, 0x00, 0x05, 0x00, 0x00, 0x65, 0x15, 0x21, 0x11, 0x21, 0x11, + 0x04, 0xa4, 0xfb, 0xe5, 0x01, 0x27, 0xe4, 0xe4, 0x05, 0x81, 0xfb, 0x63, 0x00, 0x01, 0x00, 0x89, + 0x00, 0x00, 0x06, 0x21, 0x05, 0x81, 0x00, 0x1d, 0x00, 0x00, 0x41, 0x11, 0x21, 0x11, 0x21, 0x13, + 0x16, 0x16, 0x17, 0x3e, 0x02, 0x37, 0x01, 0x21, 0x11, 0x21, 0x11, 0x34, 0x36, 0x37, 0x06, 0x06, + 0x07, 0x03, 0x23, 0x03, 0x03, 0x16, 0x16, 0x01, 0x8f, 0xfe, 0xfa, 0x01, 0x8b, 0xfc, 0x11, 0x24, + 0x11, 0x0b, 0x14, 0x15, 0x0b, 0x01, 0x03, 0x01, 0x89, 0xfe, 0xfa, 0x05, 0x05, 0x23, 0x35, 0x11, + 0xfe, 0xd2, 0xfe, 0x6b, 0x06, 0x06, 0x03, 0x56, 0xfc, 0xaa, 0x05, 0x81, 0xfc, 0xec, 0x42, 0x85, + 0x42, 0x26, 0x4b, 0x4c, 0x25, 0x03, 0x3b, 0xfa, 0x7f, 0x03, 0x56, 0x1d, 0xaf, 0x67, 0x86, 0xbc, + 0x35, 0xfc, 0xee, 0x03, 0x12, 0x01, 0x77, 0x74, 0x99, 0x00, 0x00, 0x01, 0x00, 0x89, 0x00, 0x00, + 0x05, 0x3d, 0x05, 0x81, 0x00, 0x0e, 0x00, 0x00, 0x41, 0x11, 0x21, 0x11, 0x21, 0x01, 0x26, 0x35, + 0x11, 0x21, 0x11, 0x21, 0x01, 0x16, 0x16, 0x01, 0x8f, 0xfe, 0xfa, 0x01, 0x51, 0x02, 0x6f, 0x12, + 0x01, 0x06, 0xfe, 0xa6, 0xfd, 0x9a, 0x09, 0x09, 0x03, 0x3f, 0xfc, 0xc1, 0x05, 0x81, 0xfb, 0xba, + 0x98, 0x7b, 0x03, 0x33, 0xfa, 0x7f, 0x04, 0x3d, 0x4f, 0x7f, 0x00, 0x02, 0x00, 0x54, 0xff, 0xec, + 0x05, 0xe3, 0x05, 0x96, 0x00, 0x0f, 0x00, 0x1c, 0x00, 0x00, 0x41, 0x14, 0x02, 0x04, 0x23, 0x22, + 0x24, 0x02, 0x35, 0x34, 0x12, 0x24, 0x33, 0x32, 0x04, 0x12, 0x05, 0x34, 0x02, 0x23, 0x22, 0x02, + 0x15, 0x14, 0x16, 0x16, 0x33, 0x32, 0x12, 0x05, 0xe3, 0xb1, 0xfe, 0xbf, 0xd8, 0xdd, 0xfe, 0xc2, + 0xaa, 0xa9, 0x01, 0x3f, 0xdf, 0xe0, 0x01, 0x3e, 0xaa, 0xfe, 0xd3, 0xd8, 0xc3, 0xc6, 0xd8, 0x64, + 0xb9, 0x7f, 0xc6, 0xd7, 0x02, 0xc7, 0xdc, 0xfe, 0xb7, 0xb6, 0xb1, 0x01, 0x48, 0xe2, 0xe2, 0x01, + 0x42, 0xab, 0xad, 0xfe, 0xbe, 0xe0, 0xe4, 0x01, 0x03, 0xfe, 0xff, 0xe6, 0x9a, 0xe0, 0x79, 0x01, + 0x04, 0x00, 0x00, 0x02, 0x00, 0x89, 0x00, 0x00, 0x05, 0x10, 0x05, 0x81, 0x00, 0x0b, 0x00, 0x13, + 0x00, 0x00, 0x41, 0x14, 0x06, 0x06, 0x23, 0x21, 0x11, 0x21, 0x11, 0x21, 0x32, 0x04, 0x05, 0x34, + 0x21, 0x21, 0x11, 0x21, 0x32, 0x36, 0x05, 0x10, 0x7d, 0xe6, 0x9f, 0xfe, 0xa2, 0xfe, 0xd9, 0x02, + 0x79, 0xfd, 0x01, 0x11, 0xfe, 0xd7, 0xfe, 0xfa, 0xfe, 0xcf, 0x01, 0x39, 0x7a, 0x84, 0x03, 0xc3, + 0x89, 0xd3, 0x77, 0xfe, 0x10, 0x05, 0x81, 0xe9, 0xda, 0xde, 0xfe, 0x37, 0x79, 0x00, 0x00, 0x02, + 0x00, 0x54, 0xfe, 0x6d, 0x05, 0xe3, 0x05, 0x96, 0x00, 0x1a, 0x00, 0x27, 0x00, 0x00, 0x41, 0x14, + 0x02, 0x06, 0x07, 0x16, 0x16, 0x33, 0x32, 0x37, 0x07, 0x06, 0x23, 0x22, 0x26, 0x27, 0x26, 0x24, + 0x02, 0x35, 0x34, 0x12, 0x24, 0x33, 0x32, 0x04, 0x12, 0x05, 0x34, 0x02, 0x23, 0x22, 0x02, 0x15, + 0x14, 0x16, 0x16, 0x33, 0x32, 0x12, 0x05, 0xe3, 0x7d, 0xea, 0xa5, 0x22, 0x7b, 0x6f, 0x3e, 0x39, + 0x02, 0x7c, 0x76, 0xa3, 0xd6, 0x41, 0xbe, 0xfe, 0xf4, 0x8e, 0xa9, 0x01, 0x3f, 0xdf, 0xe0, 0x01, + 0x3e, 0xaa, 0xfe, 0xd3, 0xd8, 0xc3, 0xc6, 0xd8, 0x63, 0xb9, 0x80, 0xc6, 0xd7, 0x02, 0xc7, 0xbc, + 0xfe, 0xda, 0xbf, 0x22, 0x63, 0x58, 0x0a, 0xca, 0x1c, 0xb6, 0xd3, 0x12, 0xb8, 0x01, 0x37, 0xd0, + 0xe2, 0x01, 0x42, 0xab, 0xad, 0xfe, 0xbe, 0xe0, 0xe4, 0x01, 0x03, 0xfe, 0xff, 0xe6, 0x9a, 0xe1, + 0x79, 0x01, 0x04, 0x00, 0x00, 0x02, 0x00, 0x89, 0x00, 0x00, 0x05, 0x9d, 0x05, 0x81, 0x00, 0x0d, + 0x00, 0x16, 0x00, 0x00, 0x41, 0x11, 0x21, 0x11, 0x21, 0x32, 0x04, 0x15, 0x14, 0x06, 0x07, 0x01, + 0x21, 0x01, 0x01, 0x34, 0x26, 0x23, 0x21, 0x11, 0x21, 0x32, 0x36, 0x01, 0xb0, 0xfe, 0xd9, 0x02, + 0xc0, 0xfc, 0x01, 0x12, 0xa8, 0x8f, 0x01, 0x7d, 0xfe, 0xb4, 0xfe, 0xb9, 0x01, 0x24, 0x82, 0x82, + 0xfe, 0x86, 0x01, 0x82, 0x7c, 0x80, 0x02, 0x17, 0xfd, 0xe9, 0x05, 0x81, 0xd9, 0xcb, 0x94, 0xd7, + 0x22, 0xfd, 0xb0, 0x02, 0x17, 0x01, 0xba, 0x65, 0x66, 0xfe, 0x60, 0x70, 0x00, 0x01, 0x00, 0x3b, + 0xff, 0xec, 0x05, 0x06, 0x05, 0x96, 0x00, 0x33, 0x00, 0x00, 0x41, 0x14, 0x04, 0x21, 0x20, 0x03, + 0x25, 0x16, 0x16, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x27, 0x26, 0x26, 0x27, 0x2e, 0x02, 0x27, + 0x26, 0x26, 0x35, 0x34, 0x24, 0x21, 0x20, 0x04, 0x17, 0x05, 0x26, 0x26, 0x23, 0x22, 0x06, 0x15, + 0x14, 0x16, 0x17, 0x16, 0x17, 0x16, 0x16, 0x17, 0x16, 0x16, 0x17, 0x16, 0x16, 0x05, 0x06, 0xfe, + 0xcd, 0xfe, 0xd7, 0xfd, 0xe9, 0x58, 0x01, 0x1d, 0x1d, 0xa8, 0x95, 0x9b, 0x9a, 0x46, 0x41, 0x20, + 0x7c, 0x5c, 0x6a, 0x78, 0x48, 0x22, 0x4b, 0x54, 0x01, 0x1f, 0x01, 0x12, 0x01, 0x06, 0x01, 0x07, + 0x26, 0xfe, 0xe2, 0x16, 0x87, 0x7e, 0x86, 0x86, 0x39, 0x38, 0x35, 0xae, 0x65, 0x92, 0x2c, 0x2c, + 0x45, 0x19, 0x33, 0x36, 0x01, 0x96, 0xcf, 0xdb, 0x01, 0x83, 0x2f, 0x70, 0x65, 0x5e, 0x5e, 0x3c, + 0x4e, 0x1a, 0x0d, 0x1f, 0x13, 0x19, 0x23, 0x21, 0x14, 0x2d, 0x96, 0x70, 0xbf, 0xcb, 0xa4, 0xbd, + 0x27, 0x5b, 0x5c, 0x54, 0x54, 0x37, 0x46, 0x19, 0x18, 0x25, 0x16, 0x27, 0x12, 0x13, 0x2a, 0x18, + 0x31, 0x87, 0x00, 0x01, 0x00, 0x17, 0x00, 0x00, 0x04, 0xcd, 0x05, 0x81, 0x00, 0x07, 0x00, 0x00, + 0x41, 0x11, 0x21, 0x11, 0x21, 0x35, 0x21, 0x15, 0x03, 0x05, 0xfe, 0xd9, 0xfe, 0x39, 0x04, 0xb6, + 0x04, 0x9d, 0xfb, 0x63, 0x04, 0x9d, 0xe4, 0xe4, 0x00, 0x01, 0x00, 0x7b, 0xff, 0xec, 0x05, 0x4a, + 0x05, 0x81, 0x00, 0x13, 0x00, 0x00, 0x45, 0x22, 0x24, 0x26, 0x35, 0x11, 0x21, 0x11, 0x14, 0x16, + 0x33, 0x32, 0x36, 0x35, 0x11, 0x21, 0x11, 0x14, 0x06, 0x04, 0x02, 0xd3, 0xc2, 0xfe, 0xf4, 0x8a, + 0x01, 0x27, 0x9f, 0x9a, 0x9e, 0xaa, 0x01, 0x27, 0x95, 0xfe, 0xe6, 0x14, 0x7f, 0xf5, 0xb0, 0x03, + 0x71, 0xfc, 0xa6, 0xa7, 0xad, 0xb5, 0xa9, 0x03, 0x50, 0xfc, 0x9e, 0xb2, 0xfc, 0x85, 0x00, 0x01, + 0x00, 0x0e, 0x00, 0x00, 0x05, 0x48, 0x05, 0x81, 0x00, 0x0c, 0x00, 0x00, 0x41, 0x01, 0x21, 0x01, + 0x21, 0x01, 0x16, 0x16, 0x17, 0x36, 0x36, 0x37, 0x01, 0x05, 0x48, 0xfd, 0xfa, 0xfe, 0xd5, 0xfd, + 0xf7, 0x01, 0x34, 0x01, 0x22, 0x0e, 0x25, 0x17, 0x21, 0x1d, 0x0a, 0x01, 0x21, 0x05, 0x81, 0xfa, + 0x7f, 0x05, 0x81, 0xfc, 0x77, 0x2c, 0x85, 0x59, 0x7d, 0x70, 0x1d, 0x03, 0x89, 0x00, 0x00, 0x01, + 0x00, 0x02, 0x00, 0x00, 0x07, 0x8b, 0x05, 0x81, 0x00, 0x21, 0x00, 0x00, 0x41, 0x03, 0x21, 0x01, + 0x21, 0x13, 0x16, 0x16, 0x17, 0x3e, 0x02, 0x37, 0x13, 0x21, 0x13, 0x16, 0x16, 0x17, 0x3e, 0x02, + 0x37, 0x13, 0x21, 0x01, 0x21, 0x03, 0x26, 0x26, 0x27, 0x0e, 0x02, 0x03, 0x8d, 0xc2, 0xfe, 0xa2, + 0xfe, 0x95, 0x01, 0x2b, 0xc4, 0x0d, 0x1f, 0x0a, 0x0a, 0x11, 0x12, 0x0a, 0xc7, 0x01, 0x4a, 0xc5, + 0x0a, 0x1d, 0x0d, 0x0d, 0x15, 0x15, 0x0c, 0xb5, 0x01, 0x2b, 0xfe, 0x94, 0xfe, 0xa2, 0xbf, 0x11, + 0x1e, 0x0c, 0x08, 0x18, 0x15, 0x03, 0x42, 0xfc, 0xbe, 0x05, 0x81, 0xfc, 0xa1, 0x37, 0x90, 0x44, + 0x2f, 0x59, 0x57, 0x2b, 0x03, 0x60, 0xfc, 0xbf, 0x2a, 0xa0, 0x5f, 0x3a, 0x59, 0x59, 0x39, 0x03, + 0x45, 0xfa, 0x7f, 0x03, 0x2f, 0x48, 0x96, 0x4f, 0x2b, 0x74, 0x64, 0x00, 0x00, 0x01, 0x00, 0x12, + 0x00, 0x00, 0x05, 0x44, 0x05, 0x81, 0x00, 0x0b, 0x00, 0x00, 0x41, 0x01, 0x21, 0x01, 0x01, 0x21, + 0x01, 0x01, 0x21, 0x01, 0x01, 0x21, 0x02, 0xac, 0xfe, 0x9e, 0xfe, 0xc8, 0x01, 0xe8, 0xfe, 0x41, + 0x01, 0x38, 0x01, 0x39, 0x01, 0x39, 0x01, 0x36, 0xfe, 0x54, 0x01, 0xd5, 0xfe, 0xca, 0x02, 0x31, + 0xfd, 0xcf, 0x02, 0xe5, 0x02, 0x9c, 0xfe, 0x0e, 0x01, 0xf2, 0xfd, 0x64, 0xfd, 0x1b, 0x00, 0x01, + 0x00, 0x23, 0x00, 0x00, 0x05, 0x35, 0x05, 0x81, 0x00, 0x08, 0x00, 0x00, 0x41, 0x11, 0x21, 0x11, + 0x01, 0x21, 0x01, 0x01, 0x21, 0x03, 0x3f, 0xfe, 0xda, 0xfe, 0x0a, 0x01, 0x35, 0x01, 0x52, 0x01, + 0x56, 0x01, 0x35, 0x02, 0x42, 0xfd, 0xbe, 0x02, 0x42, 0x03, 0x3f, 0xfd, 0xac, 0x02, 0x54, 0x00, + 0x00, 0x01, 0x00, 0x3d, 0x00, 0x00, 0x04, 0xa8, 0x05, 0x81, 0x00, 0x09, 0x00, 0x00, 0x65, 0x15, + 0x21, 0x35, 0x01, 0x21, 0x35, 0x21, 0x15, 0x01, 0x04, 0xa8, 0xfb, 0x95, 0x02, 0xfa, 0xfd, 0x52, + 0x03, 0xf6, 0xfd, 0x06, 0xe7, 0xe7, 0xd1, 0x03, 0xc9, 0xe7, 0xcd, 0xfc, 0x33, 0x00, 0x00, 0x01, + 0x00, 0x73, 0xfe, 0x57, 0x02, 0x91, 0x05, 0xcc, 0x00, 0x07, 0x00, 0x00, 0x45, 0x15, 0x21, 0x11, + 0x21, 0x15, 0x21, 0x11, 0x02, 0x91, 0xfd, 0xe2, 0x02, 0x1e, 0xfe, 0xec, 0xea, 0xbf, 0x07, 0x75, + 0xbe, 0xfa, 0x08, 0x00, 0x00, 0x01, 0x00, 0x15, 0xff, 0xd7, 0x02, 0x26, 0x05, 0xcd, 0x00, 0x03, + 0x00, 0x00, 0x41, 0x01, 0x23, 0x01, 0x01, 0x03, 0x01, 0x23, 0xf3, 0xfe, 0xe2, 0x05, 0xcd, 0xfa, + 0x0a, 0x05, 0xf6, 0x00, 0x00, 0x01, 0x00, 0x19, 0xfe, 0x57, 0x02, 0x37, 0x05, 0xcc, 0x00, 0x07, + 0x00, 0x00, 0x41, 0x11, 0x21, 0x35, 0x21, 0x11, 0x21, 0x35, 0x02, 0x37, 0xfd, 0xe2, 0x01, 0x16, + 0xfe, 0xea, 0x05, 0xcc, 0xf8, 0x8b, 0xbf, 0x05, 0xf8, 0xbe, 0x00, 0x01, 0x00, 0x2d, 0x02, 0x02, + 0x04, 0x7f, 0x05, 0x81, 0x00, 0x06, 0x00, 0x00, 0x53, 0x01, 0x21, 0x01, 0x23, 0x01, 0x01, 0x2d, + 0x01, 0x87, 0x01, 0x42, 0x01, 0x89, 0xe5, 0xfe, 0xba, 0xfe, 0xbc, 0x02, 0x02, 0x03, 0x7f, 0xfc, + 0x81, 0x02, 0xf0, 0xfd, 0x10, 0x00, 0x00, 0x01, 0xff, 0xec, 0xff, 0x06, 0x04, 0x85, 0xff, 0x54, + 0x00, 0x03, 0x00, 0x00, 0x45, 0x15, 0x21, 0x35, 0x04, 0x85, 0xfb, 0x67, 0xac, 0x4e, 0x4e, 0x00, + 0x00, 0x01, 0x00, 0x42, 0x04, 0x9f, 0x02, 0x3f, 0x05, 0xde, 0x00, 0x05, 0x00, 0x00, 0x41, 0x15, + 0x23, 0x01, 0x35, 0x21, 0x02, 0x3f, 0xa9, 0xfe, 0xac, 0x01, 0x02, 0x04, 0xbe, 0x1f, 0x01, 0x14, + 0x2b, 0x00, 0x00, 0x02, 0x00, 0x3c, 0xff, 0xec, 0x04, 0x80, 0x04, 0x4e, 0x00, 0x24, 0x00, 0x33, + 0x00, 0x00, 0x45, 0x22, 0x26, 0x35, 0x34, 0x36, 0x37, 0x37, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, + 0x07, 0x25, 0x12, 0x21, 0x32, 0x16, 0x15, 0x11, 0x14, 0x16, 0x33, 0x32, 0x37, 0x15, 0x06, 0x06, + 0x23, 0x22, 0x26, 0x27, 0x23, 0x06, 0x06, 0x13, 0x07, 0x06, 0x07, 0x06, 0x06, 0x15, 0x14, 0x16, + 0x33, 0x32, 0x37, 0x36, 0x36, 0x35, 0x01, 0x89, 0x9d, 0xb0, 0xdb, 0xd0, 0xe9, 0x4a, 0x54, 0x4e, + 0x49, 0x09, 0xfe, 0xdb, 0x37, 0x01, 0x9a, 0xcd, 0xde, 0x29, 0x30, 0x20, 0x1e, 0x34, 0x4a, 0x36, + 0x6a, 0x65, 0x0a, 0x06, 0x3b, 0xb2, 0xd0, 0x90, 0x63, 0x28, 0x29, 0x2b, 0x47, 0x3b, 0x42, 0x37, + 0x36, 0x3e, 0x14, 0xab, 0x9b, 0xa8, 0xae, 0x04, 0x04, 0x37, 0x6a, 0x67, 0x47, 0x52, 0x0e, 0x01, + 0x41, 0xca, 0xba, 0xfe, 0x76, 0x5b, 0x45, 0x06, 0x98, 0x0d, 0x0d, 0x68, 0x65, 0x6a, 0x6b, 0x02, + 0x09, 0x02, 0x05, 0x10, 0x12, 0x48, 0x3c, 0x4d, 0x4b, 0x24, 0x24, 0x7f, 0x47, 0x00, 0x00, 0x02, + 0x00, 0x87, 0xff, 0xec, 0x04, 0x8f, 0x05, 0xcc, 0x00, 0x1b, 0x00, 0x27, 0x00, 0x00, 0x41, 0x10, + 0x02, 0x23, 0x22, 0x26, 0x27, 0x23, 0x14, 0x06, 0x06, 0x07, 0x21, 0x36, 0x36, 0x35, 0x11, 0x21, + 0x11, 0x14, 0x06, 0x07, 0x33, 0x36, 0x36, 0x33, 0x32, 0x12, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, + 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, 0x04, 0x8f, 0xd7, 0xc8, 0x73, 0xa8, 0x2d, 0x02, 0x04, 0x06, + 0x04, 0xfe, 0xef, 0x04, 0x04, 0x01, 0x19, 0x03, 0x01, 0x04, 0x2f, 0xae, 0x7d, 0xc0, 0xcd, 0xfe, + 0xdb, 0x6c, 0x71, 0x72, 0x77, 0x75, 0x72, 0x70, 0x6f, 0x02, 0x21, 0xfe, 0xf4, 0xfe, 0xd7, 0x64, + 0x5e, 0x17, 0x4a, 0x41, 0x0c, 0x2f, 0x7b, 0x4d, 0x04, 0xd5, 0xfe, 0x62, 0x2c, 0x58, 0x2c, 0x68, + 0x68, 0xfe, 0xdd, 0xfe, 0xf6, 0xb8, 0xb2, 0xbf, 0xb4, 0xac, 0xc0, 0xba, 0x00, 0x01, 0x00, 0x50, + 0xff, 0xec, 0x04, 0x37, 0x04, 0x4e, 0x00, 0x1a, 0x00, 0x00, 0x45, 0x22, 0x00, 0x11, 0x10, 0x00, + 0x33, 0x32, 0x16, 0x17, 0x05, 0x26, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, + 0x37, 0x05, 0x0e, 0x02, 0x02, 0x52, 0xf6, 0xfe, 0xf4, 0x01, 0x0e, 0xf8, 0xbf, 0xfa, 0x20, 0xfe, + 0xe5, 0x0c, 0x60, 0x58, 0x6d, 0x6c, 0x6f, 0x6e, 0x50, 0x6c, 0x0d, 0x01, 0x1a, 0x0f, 0x83, 0xd0, + 0x14, 0x01, 0x25, 0x01, 0x06, 0x01, 0x0c, 0x01, 0x2b, 0xc0, 0xa9, 0x0e, 0x53, 0x63, 0xb5, 0xb6, + 0xbb, 0xbb, 0x65, 0x64, 0x0d, 0x72, 0xab, 0x5f, 0x00, 0x02, 0x00, 0x54, 0xff, 0xec, 0x04, 0x5c, + 0x05, 0xcc, 0x00, 0x19, 0x00, 0x25, 0x00, 0x00, 0x61, 0x2e, 0x02, 0x35, 0x23, 0x06, 0x06, 0x23, + 0x22, 0x02, 0x11, 0x10, 0x12, 0x33, 0x32, 0x16, 0x17, 0x33, 0x27, 0x11, 0x21, 0x11, 0x14, 0x16, + 0x17, 0x01, 0x14, 0x16, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x03, 0x4c, 0x02, + 0x08, 0x05, 0x04, 0x2e, 0xac, 0x80, 0xbd, 0xce, 0xd9, 0xc7, 0x73, 0xa7, 0x2d, 0x02, 0x02, 0x01, + 0x19, 0x04, 0x04, 0xfd, 0x1d, 0x6f, 0x6e, 0x6f, 0x7a, 0x75, 0x72, 0x71, 0x6e, 0x0a, 0x40, 0x4c, + 0x1a, 0x62, 0x62, 0x01, 0x27, 0x01, 0x09, 0x01, 0x0d, 0x01, 0x25, 0x60, 0x5f, 0xb2, 0x01, 0x8b, + 0xfb, 0x20, 0x32, 0x76, 0x44, 0x02, 0x1c, 0xb8, 0xb8, 0xc3, 0xb4, 0xaf, 0xbd, 0xb7, 0x00, 0x02, + 0x00, 0x50, 0xff, 0xec, 0x04, 0x2d, 0x04, 0x4e, 0x00, 0x13, 0x00, 0x1a, 0x00, 0x00, 0x41, 0x14, + 0x16, 0x33, 0x32, 0x36, 0x37, 0x05, 0x02, 0x21, 0x22, 0x00, 0x11, 0x10, 0x00, 0x33, 0x32, 0x12, + 0x11, 0x15, 0x25, 0x26, 0x26, 0x23, 0x22, 0x06, 0x07, 0x01, 0x77, 0x75, 0x6c, 0x4a, 0x5f, 0x13, + 0x01, 0x09, 0x73, 0xfe, 0xa0, 0xf4, 0xfe, 0xfa, 0x01, 0x0a, 0xf4, 0xe9, 0xf6, 0xfe, 0xf0, 0x08, + 0x6e, 0x5d, 0x63, 0x6b, 0x03, 0x01, 0xe7, 0x9e, 0xa1, 0x41, 0x40, 0x17, 0xfe, 0xda, 0x01, 0x21, + 0x01, 0x15, 0x01, 0x0c, 0x01, 0x20, 0xfe, 0xcb, 0xfe, 0xd6, 0x08, 0xb0, 0x83, 0x83, 0x8a, 0x7c, + 0x00, 0x01, 0x00, 0x23, 0x00, 0x00, 0x02, 0xae, 0x05, 0xcc, 0x00, 0x15, 0x00, 0x00, 0x41, 0x11, + 0x21, 0x11, 0x23, 0x35, 0x33, 0x35, 0x34, 0x36, 0x33, 0x32, 0x17, 0x15, 0x26, 0x23, 0x22, 0x06, + 0x15, 0x15, 0x33, 0x15, 0x01, 0xd9, 0xfe, 0xe8, 0x9e, 0x9e, 0x9c, 0x9f, 0x52, 0x60, 0x28, 0x2a, + 0x48, 0x3b, 0xd5, 0x03, 0x7c, 0xfc, 0x84, 0x03, 0x7c, 0xbe, 0x71, 0x93, 0x8e, 0x10, 0xb5, 0x09, + 0x39, 0x48, 0x55, 0xbe, 0x00, 0x02, 0x00, 0x54, 0xfe, 0x4e, 0x04, 0x5a, 0x04, 0x4f, 0x00, 0x23, + 0x00, 0x2f, 0x00, 0x00, 0x41, 0x22, 0x26, 0x27, 0x25, 0x16, 0x16, 0x33, 0x32, 0x36, 0x35, 0x37, + 0x23, 0x06, 0x06, 0x23, 0x22, 0x02, 0x11, 0x10, 0x12, 0x33, 0x32, 0x16, 0x17, 0x33, 0x34, 0x36, + 0x36, 0x37, 0x21, 0x06, 0x15, 0x11, 0x14, 0x04, 0x03, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, + 0x16, 0x33, 0x32, 0x36, 0x02, 0x54, 0xc6, 0xf1, 0x1c, 0x01, 0x19, 0x0f, 0x63, 0x50, 0x75, 0x6c, + 0x02, 0x02, 0x2e, 0xae, 0x80, 0xbd, 0xd0, 0xd6, 0xcc, 0x76, 0xa3, 0x2e, 0x05, 0x04, 0x07, 0x03, + 0x01, 0x0a, 0x06, 0xfe, 0xfa, 0x0f, 0x77, 0x6e, 0x70, 0x71, 0x6f, 0x70, 0x70, 0x77, 0xfe, 0x4e, + 0x97, 0x8c, 0x21, 0x41, 0x4a, 0x90, 0x8e, 0xa4, 0x64, 0x63, 0x01, 0x1c, 0x01, 0x08, 0x01, 0x09, + 0x01, 0x20, 0x61, 0x62, 0x18, 0x48, 0x42, 0x0c, 0x6c, 0x8e, 0xfc, 0xe1, 0xe7, 0xec, 0x03, 0xde, + 0xa7, 0xbb, 0xb4, 0xb4, 0xb0, 0xb1, 0xbb, 0x00, 0x00, 0x01, 0x00, 0x8f, 0x00, 0x00, 0x04, 0x64, + 0x05, 0xcc, 0x00, 0x18, 0x00, 0x00, 0x41, 0x36, 0x36, 0x33, 0x32, 0x16, 0x15, 0x11, 0x21, 0x11, + 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x11, 0x21, 0x11, 0x21, 0x11, 0x14, 0x06, 0x06, 0x07, 0x01, + 0xa4, 0x39, 0xac, 0x77, 0xac, 0xb8, 0xfe, 0xe8, 0x60, 0x61, 0x66, 0x7d, 0xfe, 0xe7, 0x01, 0x19, + 0x02, 0x03, 0x03, 0x03, 0x62, 0x7c, 0x70, 0xd4, 0xcc, 0xfd, 0x52, 0x02, 0x5e, 0x8f, 0x8e, 0xaf, + 0x89, 0xfd, 0xbd, 0x05, 0xcc, 0xfe, 0x6b, 0x24, 0x48, 0x46, 0x23, 0x00, 0x00, 0x02, 0x00, 0x8f, + 0x00, 0x00, 0x01, 0xa8, 0x05, 0xcc, 0x00, 0x03, 0x00, 0x07, 0x00, 0x00, 0x41, 0x15, 0x21, 0x35, + 0x01, 0x11, 0x21, 0x11, 0x01, 0xa8, 0xfe, 0xe7, 0x01, 0x19, 0xfe, 0xe7, 0x05, 0xcc, 0xcf, 0xcf, + 0xfe, 0x6e, 0xfb, 0xc6, 0x04, 0x3a, 0x00, 0x02, 0xff, 0xe0, 0xfe, 0x57, 0x01, 0xa9, 0x05, 0xcc, + 0x00, 0x03, 0x00, 0x12, 0x00, 0x00, 0x41, 0x15, 0x21, 0x35, 0x03, 0x22, 0x27, 0x35, 0x16, 0x16, + 0x33, 0x32, 0x36, 0x35, 0x11, 0x21, 0x11, 0x14, 0x06, 0x01, 0xa9, 0xfe, 0xe7, 0x06, 0x63, 0x47, + 0x0d, 0x19, 0x0d, 0x48, 0x35, 0x01, 0x19, 0x91, 0x05, 0xcc, 0xcf, 0xcf, 0xf8, 0x8b, 0x09, 0xc6, + 0x01, 0x03, 0x3f, 0x63, 0x04, 0x76, 0xfb, 0x46, 0x8f, 0x9a, 0x00, 0x01, 0x00, 0x8f, 0x00, 0x00, + 0x04, 0x75, 0x05, 0xcc, 0x00, 0x0b, 0x00, 0x00, 0x41, 0x11, 0x21, 0x11, 0x21, 0x11, 0x01, 0x21, + 0x01, 0x01, 0x21, 0x01, 0x01, 0xa8, 0xfe, 0xe7, 0x01, 0x19, 0x01, 0x82, 0x01, 0x2e, 0xfe, 0x84, + 0x01, 0x99, 0xfe, 0xcd, 0xfe, 0xdf, 0x01, 0x96, 0xfe, 0x6a, 0x05, 0xcc, 0xfc, 0xae, 0x01, 0xc0, + 0xfe, 0x5a, 0xfd, 0x6c, 0x01, 0xea, 0x00, 0x01, 0x00, 0x8f, 0x00, 0x00, 0x01, 0xa8, 0x05, 0xcc, + 0x00, 0x03, 0x00, 0x00, 0x41, 0x11, 0x21, 0x11, 0x01, 0xa8, 0xfe, 0xe7, 0x05, 0xcc, 0xfa, 0x34, + 0x05, 0xcc, 0x00, 0x01, 0x00, 0x87, 0x00, 0x00, 0x06, 0x9e, 0x04, 0x4f, 0x00, 0x2a, 0x00, 0x00, + 0x41, 0x11, 0x21, 0x11, 0x34, 0x26, 0x27, 0x21, 0x1e, 0x02, 0x15, 0x33, 0x36, 0x36, 0x33, 0x32, + 0x16, 0x17, 0x33, 0x36, 0x36, 0x33, 0x32, 0x16, 0x15, 0x11, 0x21, 0x11, 0x34, 0x26, 0x23, 0x22, + 0x06, 0x15, 0x11, 0x21, 0x11, 0x34, 0x26, 0x23, 0x22, 0x06, 0x01, 0xa8, 0xfe, 0xe7, 0x05, 0x03, + 0x01, 0x0c, 0x02, 0x06, 0x05, 0x04, 0x34, 0x9b, 0x6c, 0x7c, 0x97, 0x1a, 0x06, 0x37, 0x9a, 0x77, + 0x9e, 0xa6, 0xfe, 0xe9, 0x52, 0x52, 0x52, 0x6e, 0xfe, 0xe9, 0x52, 0x52, 0x55, 0x6b, 0x02, 0x44, + 0xfd, 0xbc, 0x03, 0x48, 0x57, 0x6f, 0x2c, 0x0c, 0x59, 0x5d, 0x15, 0x7c, 0x70, 0x76, 0x76, 0x7e, + 0x6e, 0xd7, 0xc9, 0xfd, 0x51, 0x02, 0x5f, 0x8f, 0x8e, 0x9f, 0x8c, 0xfd, 0xaf, 0x02, 0x5f, 0x8f, + 0x8e, 0xae, 0x00, 0x01, 0x00, 0x87, 0x00, 0x00, 0x04, 0x64, 0x04, 0x4f, 0x00, 0x1a, 0x00, 0x00, + 0x41, 0x11, 0x21, 0x11, 0x34, 0x26, 0x27, 0x21, 0x1e, 0x02, 0x15, 0x33, 0x36, 0x36, 0x33, 0x32, + 0x16, 0x15, 0x11, 0x21, 0x11, 0x34, 0x26, 0x23, 0x22, 0x06, 0x01, 0xa8, 0xfe, 0xe7, 0x05, 0x03, + 0x01, 0x0c, 0x02, 0x06, 0x05, 0x04, 0x39, 0xac, 0x77, 0xac, 0xb8, 0xfe, 0xe8, 0x60, 0x61, 0x66, + 0x7d, 0x02, 0x44, 0xfd, 0xbc, 0x03, 0x48, 0x57, 0x6f, 0x2c, 0x0c, 0x59, 0x5d, 0x15, 0x7c, 0x70, + 0xd4, 0xcc, 0xfd, 0x51, 0x02, 0x5f, 0x8f, 0x8e, 0xaf, 0x00, 0x00, 0x02, 0x00, 0x50, 0xff, 0xec, + 0x04, 0x93, 0x04, 0x4e, 0x00, 0x0b, 0x00, 0x17, 0x00, 0x00, 0x41, 0x10, 0x00, 0x21, 0x22, 0x00, + 0x11, 0x10, 0x00, 0x21, 0x20, 0x00, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x33, + 0x32, 0x36, 0x04, 0x93, 0xfe, 0xdc, 0xfe, 0xfe, 0xfd, 0xfe, 0xe0, 0x01, 0x20, 0x01, 0x03, 0x01, + 0x09, 0x01, 0x17, 0xfe, 0xda, 0x7e, 0x78, 0x80, 0x80, 0x7d, 0x76, 0x82, 0x81, 0x02, 0x1e, 0xfe, + 0xf9, 0xfe, 0xd5, 0x01, 0x2c, 0x01, 0x06, 0x01, 0x05, 0x01, 0x2b, 0xfe, 0xdf, 0xfe, 0xf1, 0xc1, + 0xae, 0xb7, 0xb8, 0xb5, 0xbd, 0xb9, 0x00, 0x02, 0x00, 0x87, 0xfe, 0x57, 0x04, 0x8f, 0x04, 0x51, + 0x00, 0x19, 0x00, 0x25, 0x00, 0x00, 0x41, 0x10, 0x02, 0x23, 0x22, 0x27, 0x23, 0x16, 0x15, 0x11, + 0x21, 0x11, 0x34, 0x26, 0x27, 0x21, 0x1e, 0x02, 0x15, 0x33, 0x36, 0x36, 0x33, 0x32, 0x12, 0x01, + 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, 0x04, 0x8f, 0xd9, 0xc6, 0xeb, + 0x5d, 0x06, 0x06, 0xfe, 0xe7, 0x04, 0x04, 0x01, 0x11, 0x04, 0x05, 0x03, 0x04, 0x2f, 0xae, 0x7d, + 0xbd, 0xd0, 0xfe, 0xdb, 0x6f, 0x70, 0x70, 0x77, 0x77, 0x6e, 0x71, 0x70, 0x02, 0x22, 0xfe, 0xf1, + 0xfe, 0xd9, 0xc0, 0x1e, 0x98, 0xfe, 0x61, 0x04, 0xea, 0x4d, 0x7c, 0x30, 0x0c, 0x39, 0x48, 0x23, + 0x64, 0x63, 0xfe, 0xdd, 0xfe, 0xf4, 0xb6, 0xb6, 0xc4, 0xb0, 0xaf, 0xbf, 0xbb, 0x00, 0x00, 0x02, + 0x00, 0x54, 0xfe, 0x57, 0x04, 0x5a, 0x04, 0x4f, 0x00, 0x18, 0x00, 0x24, 0x00, 0x00, 0x53, 0x10, + 0x12, 0x33, 0x32, 0x16, 0x17, 0x34, 0x36, 0x36, 0x37, 0x21, 0x06, 0x06, 0x15, 0x11, 0x21, 0x11, + 0x37, 0x23, 0x06, 0x06, 0x23, 0x22, 0x02, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, + 0x33, 0x32, 0x36, 0x54, 0xdb, 0xc7, 0x76, 0xa3, 0x2e, 0x05, 0x08, 0x02, 0x01, 0x0e, 0x03, 0x03, + 0xfe, 0xe9, 0x05, 0x02, 0x2e, 0xb1, 0x82, 0xbd, 0xce, 0x02, 0xeb, 0x74, 0x71, 0x70, 0x71, 0x6f, + 0x70, 0x6e, 0x79, 0x02, 0x1c, 0x01, 0x0c, 0x01, 0x27, 0x61, 0x62, 0x1f, 0x49, 0x3c, 0x0a, 0x36, + 0x7c, 0x47, 0xfb, 0x16, 0x01, 0xc2, 0x9b, 0x64, 0x64, 0x01, 0x27, 0x01, 0x0f, 0xad, 0xbf, 0xb9, + 0xb9, 0xb8, 0xb8, 0xc3, 0x00, 0x01, 0x00, 0x87, 0x00, 0x00, 0x02, 0xfe, 0x04, 0x4f, 0x00, 0x19, + 0x00, 0x00, 0x41, 0x11, 0x21, 0x11, 0x34, 0x26, 0x27, 0x21, 0x1e, 0x03, 0x15, 0x33, 0x36, 0x37, + 0x36, 0x36, 0x33, 0x32, 0x17, 0x15, 0x26, 0x23, 0x22, 0x06, 0x01, 0xa8, 0xfe, 0xe7, 0x05, 0x03, + 0x01, 0x0c, 0x02, 0x04, 0x04, 0x03, 0x04, 0x28, 0x21, 0x20, 0x58, 0x42, 0x36, 0x21, 0x43, 0x35, + 0x69, 0x75, 0x02, 0x13, 0xfd, 0xed, 0x03, 0x3c, 0x59, 0x77, 0x2e, 0x09, 0x3e, 0x4d, 0x44, 0x0f, + 0x70, 0x31, 0x2f, 0x2c, 0x0f, 0xeb, 0x0f, 0xaa, 0x00, 0x01, 0x00, 0x48, 0xff, 0xec, 0x04, 0x1f, + 0x04, 0x4f, 0x00, 0x2c, 0x00, 0x00, 0x41, 0x14, 0x04, 0x23, 0x22, 0x26, 0x27, 0x37, 0x16, 0x16, + 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x27, 0x2e, 0x02, 0x27, 0x26, 0x26, 0x35, 0x34, 0x36, 0x33, + 0x32, 0x16, 0x17, 0x07, 0x26, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x17, 0x16, 0x16, 0x17, + 0x16, 0x16, 0x04, 0x1f, 0xfe, 0xff, 0xe3, 0xdf, 0xed, 0x27, 0xf7, 0x15, 0x67, 0x80, 0x76, 0x6c, + 0x57, 0x68, 0x4f, 0x7d, 0x59, 0x1c, 0x53, 0x57, 0xef, 0xdb, 0xc1, 0xeb, 0x1d, 0xf9, 0x0c, 0x5e, + 0x66, 0x64, 0x64, 0x4d, 0x5b, 0x7f, 0xc5, 0x3c, 0x3b, 0x47, 0x01, 0x3c, 0x9d, 0xb3, 0x8d, 0x95, + 0x25, 0x4d, 0x40, 0x3c, 0x40, 0x34, 0x3d, 0x15, 0x10, 0x1e, 0x1d, 0x0d, 0x29, 0x80, 0x5e, 0x9b, + 0xad, 0x96, 0x8e, 0x1a, 0x42, 0x41, 0x33, 0x3c, 0x2f, 0x37, 0x12, 0x1a, 0x37, 0x26, 0x26, 0x77, + 0x00, 0x01, 0x00, 0x19, 0xff, 0xee, 0x02, 0x91, 0x05, 0x38, 0x00, 0x15, 0x00, 0x00, 0x65, 0x06, + 0x23, 0x22, 0x26, 0x35, 0x11, 0x23, 0x35, 0x33, 0x37, 0x33, 0x15, 0x33, 0x15, 0x23, 0x11, 0x14, + 0x16, 0x33, 0x32, 0x37, 0x02, 0x91, 0x66, 0x87, 0x7c, 0x86, 0x89, 0x97, 0x58, 0xb0, 0xcd, 0xcd, + 0x3c, 0x3f, 0x1e, 0x40, 0x10, 0x22, 0x87, 0x89, 0x02, 0x7e, 0xbe, 0xfe, 0xfe, 0xbe, 0xfd, 0xce, + 0x4f, 0x4b, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x7f, 0xff, 0xec, 0x04, 0x5c, 0x04, 0x3a, 0x00, 0x19, + 0x00, 0x00, 0x65, 0x06, 0x06, 0x23, 0x22, 0x26, 0x35, 0x11, 0x21, 0x11, 0x14, 0x16, 0x33, 0x32, + 0x36, 0x35, 0x11, 0x21, 0x11, 0x14, 0x16, 0x17, 0x21, 0x26, 0x26, 0x35, 0x03, 0x3f, 0x38, 0xad, + 0x77, 0xac, 0xb8, 0x01, 0x19, 0x60, 0x60, 0x66, 0x7d, 0x01, 0x19, 0x04, 0x04, 0xfe, 0xf4, 0x06, + 0x06, 0xd7, 0x7b, 0x70, 0xd3, 0xcc, 0x02, 0xaf, 0xfd, 0xa1, 0x8e, 0x8f, 0xaf, 0x89, 0x02, 0x44, + 0xfc, 0xb8, 0x45, 0x79, 0x34, 0x48, 0x6c, 0x23, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x04, 0x6a, + 0x04, 0x3a, 0x00, 0x0d, 0x00, 0x00, 0x41, 0x01, 0x21, 0x01, 0x21, 0x13, 0x16, 0x16, 0x17, 0x3e, + 0x02, 0x37, 0x13, 0x04, 0x6a, 0xfe, 0x71, 0xfe, 0xb0, 0xfe, 0x7d, 0x01, 0x29, 0xbd, 0x08, 0x23, + 0x1c, 0x04, 0x19, 0x1e, 0x0b, 0xc9, 0x04, 0x3a, 0xfb, 0xc6, 0x04, 0x3a, 0xfd, 0xa3, 0x19, 0x7d, + 0x64, 0x0e, 0x54, 0x64, 0x22, 0x02, 0x6f, 0x00, 0x00, 0x01, 0xff, 0xfa, 0x00, 0x00, 0x06, 0x3d, + 0x04, 0x3a, 0x00, 0x1e, 0x00, 0x00, 0x41, 0x03, 0x21, 0x01, 0x21, 0x13, 0x16, 0x16, 0x17, 0x36, + 0x36, 0x37, 0x13, 0x21, 0x13, 0x16, 0x16, 0x17, 0x36, 0x36, 0x37, 0x13, 0x21, 0x01, 0x21, 0x03, + 0x26, 0x26, 0x27, 0x06, 0x06, 0x02, 0xe9, 0xae, 0xfe, 0xd7, 0xfe, 0xe8, 0x01, 0x08, 0x8a, 0x0a, + 0x14, 0x0a, 0x0a, 0x10, 0x0d, 0xaa, 0x01, 0x2d, 0xa6, 0x07, 0x15, 0x0d, 0x0b, 0x15, 0x0a, 0x8e, + 0x01, 0x04, 0xfe, 0xe4, 0xfe, 0xd7, 0xac, 0x06, 0x18, 0x11, 0x0d, 0x18, 0x02, 0x92, 0xfd, 0x6e, + 0x04, 0x3a, 0xfd, 0x80, 0x2e, 0x5e, 0x2f, 0x30, 0x60, 0x2f, 0x02, 0x7c, 0xfd, 0x84, 0x1a, 0x5f, + 0x46, 0x30, 0x5f, 0x30, 0x02, 0x7c, 0xfb, 0xc6, 0x02, 0x94, 0x17, 0x6f, 0x58, 0x38, 0x70, 0x00, + 0x00, 0x01, 0x00, 0x0e, 0x00, 0x00, 0x04, 0x64, 0x04, 0x3a, 0x00, 0x0b, 0x00, 0x00, 0x41, 0x03, + 0x21, 0x01, 0x01, 0x21, 0x13, 0x13, 0x21, 0x01, 0x01, 0x21, 0x02, 0x37, 0xfe, 0xfe, 0xd5, 0x01, + 0x8c, 0xfe, 0x87, 0x01, 0x2f, 0xe7, 0xe6, 0x01, 0x31, 0xfe, 0x87, 0x01, 0x8f, 0xfe, 0xcf, 0x01, + 0x88, 0xfe, 0x78, 0x02, 0x2f, 0x02, 0x0b, 0xfe, 0x9e, 0x01, 0x62, 0xfd, 0xf8, 0xfd, 0xce, 0x00, + 0x00, 0x01, 0x00, 0x10, 0xfe, 0x57, 0x04, 0x68, 0x04, 0x3a, 0x00, 0x19, 0x00, 0x00, 0x41, 0x22, + 0x27, 0x35, 0x16, 0x33, 0x32, 0x36, 0x37, 0x01, 0x21, 0x13, 0x16, 0x16, 0x17, 0x36, 0x36, 0x37, + 0x13, 0x21, 0x01, 0x06, 0x06, 0x07, 0x06, 0x06, 0x01, 0x1b, 0x67, 0x4a, 0x38, 0x29, 0x62, 0x61, + 0x2e, 0xfe, 0x54, 0x01, 0x29, 0xaa, 0x14, 0x32, 0x1f, 0x17, 0x2a, 0x19, 0xa0, 0x01, 0x26, 0xfe, + 0x54, 0x1a, 0x3a, 0x1e, 0x3d, 0x90, 0xfe, 0x57, 0x0d, 0xc8, 0x08, 0x6a, 0x7d, 0x04, 0x2f, 0xfe, + 0x05, 0x37, 0xa6, 0x71, 0x5c, 0x9c, 0x52, 0x01, 0xff, 0xfb, 0x8d, 0x45, 0x6a, 0x29, 0x53, 0x45, + 0x00, 0x01, 0x00, 0x52, 0x00, 0x00, 0x03, 0xb6, 0x04, 0x3a, 0x00, 0x09, 0x00, 0x00, 0x65, 0x15, + 0x21, 0x35, 0x01, 0x21, 0x35, 0x21, 0x15, 0x01, 0x03, 0xb6, 0xfc, 0x9c, 0x01, 0xfd, 0xfe, 0x2c, + 0x03, 0x0a, 0xfe, 0x06, 0xcd, 0xcd, 0xc7, 0x02, 0xa8, 0xcb, 0xc9, 0xfd, 0x5c, 0x00, 0x00, 0x01, + 0x00, 0x21, 0xfe, 0x57, 0x02, 0xf2, 0x05, 0xcc, 0x00, 0x23, 0x00, 0x00, 0x41, 0x22, 0x26, 0x35, + 0x11, 0x34, 0x26, 0x27, 0x35, 0x36, 0x36, 0x35, 0x11, 0x34, 0x36, 0x33, 0x33, 0x15, 0x23, 0x22, + 0x06, 0x15, 0x11, 0x14, 0x06, 0x07, 0x15, 0x16, 0x16, 0x15, 0x11, 0x14, 0x16, 0x33, 0x33, 0x15, + 0x02, 0x2d, 0x86, 0xa1, 0x6e, 0x77, 0x79, 0x6c, 0x9d, 0x8a, 0xc5, 0x3a, 0x5b, 0x51, 0x73, 0x5c, + 0x5f, 0x70, 0x51, 0x5b, 0x3a, 0xfe, 0x57, 0x9d, 0x8e, 0x01, 0x48, 0x72, 0x71, 0x02, 0xc3, 0x05, + 0x71, 0x71, 0x01, 0x48, 0x92, 0x99, 0xbe, 0x68, 0x69, 0xfe, 0xd3, 0x5f, 0x8a, 0x13, 0x04, 0x16, + 0x89, 0x5d, 0xfe, 0xd3, 0x6a, 0x67, 0xbf, 0x00, 0x00, 0x01, 0x00, 0x9c, 0xfe, 0x39, 0x01, 0xa2, + 0x05, 0xcc, 0x00, 0x03, 0x00, 0x00, 0x41, 0x11, 0x21, 0x11, 0x01, 0xa2, 0xfe, 0xfa, 0x05, 0xcc, + 0xf8, 0x6d, 0x07, 0x93, 0x00, 0x01, 0x00, 0x2b, 0xfe, 0x57, 0x02, 0xfe, 0x05, 0xcc, 0x00, 0x23, + 0x00, 0x00, 0x57, 0x33, 0x32, 0x36, 0x35, 0x11, 0x34, 0x36, 0x37, 0x35, 0x26, 0x26, 0x35, 0x11, + 0x34, 0x26, 0x23, 0x23, 0x35, 0x33, 0x32, 0x16, 0x15, 0x11, 0x14, 0x16, 0x17, 0x15, 0x06, 0x06, + 0x15, 0x11, 0x14, 0x06, 0x23, 0x23, 0x2b, 0x39, 0x5d, 0x4f, 0x71, 0x5e, 0x5b, 0x74, 0x4f, 0x5d, + 0x39, 0xc5, 0x8a, 0x9d, 0x6e, 0x79, 0x79, 0x6e, 0xa0, 0x87, 0xc5, 0xea, 0x67, 0x6a, 0x01, 0x2d, + 0x5c, 0x8a, 0x16, 0x04, 0x13, 0x89, 0x60, 0x01, 0x2d, 0x69, 0x68, 0xbe, 0x99, 0x92, 0xfe, 0xb8, + 0x70, 0x72, 0x05, 0xc3, 0x02, 0x74, 0x6f, 0xfe, 0xb8, 0x8d, 0x9e, 0x00, 0x00, 0x01, 0x00, 0x51, + 0x02, 0x04, 0x04, 0x5f, 0x03, 0x48, 0x00, 0x18, 0x00, 0x00, 0x41, 0x22, 0x26, 0x27, 0x26, 0x23, + 0x22, 0x06, 0x07, 0x35, 0x36, 0x33, 0x32, 0x17, 0x16, 0x16, 0x17, 0x16, 0x16, 0x33, 0x32, 0x37, + 0x15, 0x06, 0x06, 0x03, 0x54, 0x4b, 0x91, 0x4b, 0x88, 0x55, 0x47, 0x77, 0x41, 0x71, 0x9e, 0x68, + 0x8a, 0x42, 0x5b, 0x19, 0x19, 0x30, 0x16, 0x85, 0x73, 0x40, 0x75, 0x02, 0x04, 0x2a, 0x1a, 0x2f, + 0x2b, 0x2d, 0xd5, 0x54, 0x2f, 0x17, 0x1d, 0x06, 0x06, 0x06, 0x5c, 0xdb, 0x2c, 0x24, 0xff, 0xff, + 0x00, 0x33, 0x00, 0x00, 0x05, 0x91, 0x06, 0xd5, 0x06, 0x26, 0x00, 0x22, 0x00, 0x00, 0x00, 0x07, + 0x00, 0xc7, 0x01, 0x8f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x33, 0x00, 0x00, 0x05, 0x91, 0x07, 0x0e, + 0x06, 0x26, 0x00, 0x22, 0x00, 0x00, 0x00, 0x07, 0x00, 0xb0, 0x01, 0xbe, 0x00, 0xa2, 0xff, 0xff, + 0x00, 0x54, 0xfe, 0x57, 0x05, 0x8f, 0x05, 0x96, 0x06, 0x26, 0x00, 0x24, 0x00, 0x00, 0x00, 0x07, + 0x00, 0xb1, 0x01, 0xe9, 0x00, 0x00, 0xff, 0xff, 0x00, 0x89, 0x00, 0x00, 0x05, 0x06, 0x07, 0x17, + 0x06, 0x26, 0x00, 0x26, 0x00, 0x00, 0x00, 0x07, 0x00, 0xc5, 0x01, 0xae, 0x00, 0x00, 0xff, 0xff, + 0x00, 0x89, 0x00, 0x00, 0x05, 0x3d, 0x07, 0x1f, 0x06, 0x26, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x07, + 0x00, 0xc8, 0x01, 0x8e, 0x00, 0x00, 0xff, 0xff, 0x00, 0x54, 0xff, 0xec, 0x05, 0xe3, 0x06, 0xd5, + 0x06, 0x26, 0x00, 0x30, 0x00, 0x00, 0x00, 0x07, 0x00, 0xc7, 0x01, 0xc6, 0x00, 0x00, 0xff, 0xff, + 0x00, 0x7b, 0xff, 0xec, 0x05, 0x4a, 0x06, 0xd5, 0x06, 0x26, 0x00, 0x36, 0x00, 0x00, 0x00, 0x07, + 0x00, 0xc7, 0x01, 0x8e, 0x00, 0x00, 0xff, 0xff, 0x00, 0x34, 0xff, 0xec, 0x04, 0x78, 0x05, 0xde, + 0x06, 0x26, 0x00, 0x42, 0xf8, 0x00, 0x00, 0x07, 0x00, 0x88, 0x01, 0x20, 0x00, 0x00, 0xff, 0xff, + 0x00, 0x34, 0xff, 0xec, 0x04, 0x78, 0x05, 0xde, 0x06, 0x26, 0x00, 0x42, 0xf8, 0x00, 0x00, 0x07, + 0x00, 0x41, 0x00, 0xae, 0x00, 0x00, 0xff, 0xff, 0x00, 0x34, 0xff, 0xec, 0x04, 0x78, 0x05, 0xf9, + 0x06, 0x26, 0x00, 0x42, 0xf8, 0x00, 0x00, 0x07, 0x00, 0xae, 0x00, 0xc7, 0x00, 0x00, 0xff, 0xff, + 0x00, 0x34, 0xff, 0xec, 0x04, 0x78, 0x05, 0x8a, 0x06, 0x26, 0x00, 0x42, 0xf8, 0x00, 0x00, 0x07, + 0x00, 0x89, 0x00, 0xd7, 0x00, 0x00, 0xff, 0xff, 0x00, 0x34, 0xff, 0xec, 0x04, 0x78, 0x05, 0xc4, + 0x06, 0x26, 0x00, 0x42, 0xf8, 0x00, 0x00, 0x07, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0x00, 0xff, 0xff, + 0x00, 0x34, 0xff, 0xec, 0x04, 0x78, 0x06, 0x95, 0x06, 0x26, 0x00, 0x42, 0xf8, 0x00, 0x00, 0x07, + 0x00, 0xb0, 0x01, 0x0a, 0x00, 0x29, 0xff, 0xff, 0x00, 0x50, 0xfe, 0x57, 0x04, 0x37, 0x04, 0x4e, + 0x06, 0x26, 0x00, 0x44, 0x00, 0x00, 0x00, 0x07, 0x00, 0xb1, 0x01, 0x23, 0x00, 0x00, 0xff, 0xff, + 0x00, 0x50, 0xff, 0xec, 0x04, 0x2d, 0x05, 0xde, 0x06, 0x26, 0x00, 0x46, 0x00, 0x00, 0x00, 0x07, + 0x00, 0x88, 0x01, 0x4b, 0x00, 0x00, 0xff, 0xff, 0x00, 0x50, 0xff, 0xec, 0x04, 0x2d, 0x05, 0xde, + 0x06, 0x26, 0x00, 0x46, 0x00, 0x00, 0x00, 0x07, 0x00, 0x41, 0x00, 0xdd, 0x00, 0x00, 0xff, 0xff, + 0x00, 0x50, 0xff, 0xec, 0x04, 0x2d, 0x05, 0xf9, 0x06, 0x26, 0x00, 0x46, 0x00, 0x00, 0x00, 0x07, + 0x00, 0xae, 0x00, 0xdf, 0x00, 0x00, 0xff, 0xff, 0x00, 0x50, 0xff, 0xec, 0x04, 0x2d, 0x05, 0x8a, + 0x06, 0x26, 0x00, 0x46, 0x00, 0x00, 0x00, 0x07, 0x00, 0x89, 0x00, 0xf4, 0x00, 0x00, 0xff, 0xff, + 0x00, 0x72, 0x00, 0x00, 0x02, 0x70, 0x05, 0xde, 0x06, 0x26, 0x00, 0xad, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x88, 0x1b, 0x00, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x01, 0xbd, 0x05, 0xde, 0x06, 0x26, + 0x00, 0xad, 0x00, 0x00, 0x00, 0x07, 0x00, 0x41, 0xff, 0x7e, 0x00, 0x00, 0xff, 0xff, 0xff, 0xad, + 0x00, 0x00, 0x02, 0x8e, 0x05, 0xf9, 0x06, 0x26, 0x00, 0xad, 0x00, 0x00, 0x00, 0x06, 0x00, 0xae, + 0xad, 0x00, 0xff, 0xff, 0xff, 0xd8, 0x00, 0x00, 0x02, 0x63, 0x05, 0x8a, 0x06, 0x26, 0x00, 0xad, + 0x00, 0x00, 0x00, 0x06, 0x00, 0x89, 0xc8, 0x00, 0xff, 0xff, 0x00, 0x87, 0x00, 0x00, 0x04, 0x64, + 0x05, 0xc4, 0x04, 0x26, 0x00, 0x4f, 0x00, 0x00, 0x00, 0x07, 0x00, 0xaf, 0x01, 0x0a, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x50, 0xff, 0xec, 0x04, 0x93, 0x05, 0xde, 0x06, 0x26, 0x00, 0x50, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x88, 0x01, 0x7a, 0x00, 0x00, 0xff, 0xff, 0x00, 0x50, 0xff, 0xec, 0x04, 0x93, + 0x05, 0xde, 0x06, 0x26, 0x00, 0x50, 0x00, 0x00, 0x00, 0x07, 0x00, 0x41, 0x01, 0x06, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x50, 0xff, 0xec, 0x04, 0x93, 0x05, 0xf9, 0x06, 0x26, 0x00, 0x50, 0x00, 0x00, + 0x00, 0x07, 0x00, 0xae, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x50, 0xff, 0xec, 0x04, 0x93, + 0x05, 0x8a, 0x06, 0x26, 0x00, 0x50, 0x00, 0x00, 0x00, 0x07, 0x00, 0x89, 0x01, 0x1c, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x50, 0xff, 0xec, 0x04, 0x93, 0x05, 0xc4, 0x06, 0x26, 0x00, 0x50, 0x00, 0x00, + 0x00, 0x07, 0x00, 0xaf, 0x00, 0xf8, 0x00, 0x00, 0xff, 0xff, 0x00, 0x7f, 0xff, 0xec, 0x04, 0x5c, + 0x05, 0xde, 0x04, 0x26, 0x00, 0x56, 0x00, 0x00, 0x00, 0x07, 0x00, 0x88, 0x01, 0x78, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x7f, 0xff, 0xec, 0x04, 0x5c, 0x05, 0xde, 0x04, 0x26, 0x00, 0x56, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x41, 0x00, 0xd9, 0x00, 0x00, 0xff, 0xff, 0x00, 0x7f, 0xff, 0xec, 0x04, 0x5c, + 0x05, 0xf9, 0x04, 0x26, 0x00, 0x56, 0x00, 0x00, 0x00, 0x07, 0x00, 0xae, 0x00, 0xfc, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x7f, 0xff, 0xec, 0x04, 0x5c, 0x05, 0x8a, 0x04, 0x26, 0x00, 0x56, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x89, 0x01, 0x1a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x5a, 0x03, 0x1b, 0x02, 0xdb, + 0x05, 0x91, 0x00, 0x0f, 0x00, 0x1b, 0x00, 0x00, 0x41, 0x14, 0x06, 0x06, 0x23, 0x22, 0x26, 0x26, + 0x35, 0x34, 0x36, 0x36, 0x33, 0x32, 0x16, 0x16, 0x07, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, + 0x16, 0x33, 0x32, 0x36, 0x02, 0xdb, 0x56, 0x91, 0x5a, 0x58, 0x91, 0x57, 0x56, 0x92, 0x58, 0x5a, + 0x91, 0x56, 0x9e, 0x5d, 0x46, 0x47, 0x5f, 0x62, 0x44, 0x43, 0x60, 0x04, 0x59, 0x56, 0x91, 0x57, + 0x54, 0x8f, 0x58, 0x57, 0x8f, 0x55, 0x54, 0x8d, 0x5a, 0x46, 0x60, 0x61, 0x45, 0x45, 0x63, 0x62, + 0x00, 0x01, 0x00, 0x33, 0xff, 0xe1, 0x04, 0x44, 0x05, 0x81, 0x00, 0x1f, 0x00, 0x00, 0x41, 0x32, + 0x36, 0x37, 0x05, 0x06, 0x06, 0x07, 0x15, 0x23, 0x35, 0x26, 0x02, 0x35, 0x34, 0x12, 0x37, 0x35, + 0x33, 0x15, 0x16, 0x16, 0x17, 0x05, 0x26, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x02, 0x4c, + 0x58, 0x77, 0x0e, 0x01, 0x1b, 0x16, 0xe0, 0xb2, 0xa2, 0xd7, 0xf0, 0xeb, 0xdc, 0xa2, 0xa9, 0xda, + 0x1c, 0xfe, 0xe6, 0x0f, 0x70, 0x58, 0x7c, 0x80, 0x85, 0x01, 0x54, 0x6d, 0x64, 0x0c, 0x99, 0xcb, + 0x15, 0xbf, 0xbd, 0x15, 0x01, 0x10, 0xeb, 0xe8, 0x01, 0x1a, 0x19, 0xb8, 0xb8, 0x13, 0xbb, 0x97, + 0x0e, 0x5b, 0x63, 0xb8, 0xa4, 0xae, 0xb6, 0x00, 0x00, 0x01, 0x00, 0x15, 0x00, 0x00, 0x04, 0x5e, + 0x05, 0x96, 0x00, 0x26, 0x00, 0x00, 0x41, 0x06, 0x06, 0x23, 0x21, 0x35, 0x36, 0x36, 0x35, 0x35, + 0x23, 0x35, 0x33, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x17, 0x07, 0x26, 0x26, 0x23, 0x22, 0x06, + 0x15, 0x15, 0x21, 0x15, 0x21, 0x15, 0x14, 0x06, 0x07, 0x21, 0x32, 0x36, 0x37, 0x04, 0x5e, 0x1f, + 0xd2, 0x97, 0xfd, 0x4a, 0x66, 0x4b, 0xbc, 0xb2, 0xd6, 0xd4, 0xa9, 0xc2, 0x2c, 0xe9, 0x15, 0x52, + 0x42, 0x5b, 0x50, 0x01, 0x1e, 0xfe, 0xe2, 0x52, 0x64, 0x01, 0x7c, 0x68, 0x6b, 0x11, 0x01, 0x6b, + 0xac, 0xbf, 0xcd, 0x3a, 0x90, 0x69, 0x5c, 0xaa, 0xf8, 0xc9, 0xcf, 0x8a, 0x99, 0x2f, 0x4d, 0x46, + 0x73, 0x7d, 0xe1, 0xaa, 0x5a, 0x67, 0x92, 0x38, 0x63, 0x5e, 0x00, 0x02, 0x00, 0x35, 0xff, 0x1b, + 0x04, 0x20, 0x05, 0x93, 0x00, 0x37, 0x00, 0x46, 0x00, 0x00, 0x41, 0x32, 0x16, 0x17, 0x07, 0x26, + 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x17, 0x16, 0x17, 0x16, 0x17, 0x16, 0x16, 0x15, 0x14, + 0x06, 0x07, 0x16, 0x16, 0x15, 0x14, 0x06, 0x23, 0x22, 0x26, 0x27, 0x37, 0x16, 0x16, 0x33, 0x32, + 0x36, 0x35, 0x34, 0x26, 0x27, 0x26, 0x27, 0x26, 0x26, 0x35, 0x34, 0x36, 0x37, 0x26, 0x26, 0x35, + 0x34, 0x36, 0x01, 0x34, 0x27, 0x26, 0x27, 0x06, 0x06, 0x15, 0x14, 0x16, 0x17, 0x16, 0x17, 0x36, + 0x36, 0x02, 0x3f, 0xc2, 0xeb, 0x1b, 0xef, 0x0d, 0x72, 0x5a, 0x70, 0x69, 0x37, 0x31, 0x32, 0x82, + 0xa4, 0x55, 0x50, 0x55, 0x6e, 0x57, 0x5b, 0x5a, 0xfb, 0xe9, 0xdf, 0xf1, 0x27, 0xed, 0x14, 0x7b, + 0x7b, 0x7a, 0x7e, 0x30, 0x33, 0x34, 0xb9, 0xce, 0xab, 0x6e, 0x67, 0x5a, 0x62, 0xeb, 0x01, 0xd3, + 0x3b, 0x3d, 0xac, 0x61, 0x60, 0x36, 0x32, 0x2f, 0x8b, 0x62, 0x61, 0x05, 0x93, 0x8d, 0x85, 0x19, + 0x3e, 0x43, 0x3b, 0x41, 0x29, 0x39, 0x15, 0x16, 0x1d, 0x25, 0x2a, 0x29, 0x7a, 0x57, 0x5d, 0x8f, + 0x1b, 0x28, 0x7f, 0x59, 0xa7, 0xb1, 0x8b, 0x95, 0x25, 0x50, 0x4b, 0x41, 0x50, 0x30, 0x3d, 0x16, + 0x17, 0x2b, 0x31, 0x9c, 0x70, 0x5d, 0x80, 0x23, 0x26, 0x88, 0x54, 0x95, 0xa4, 0xfc, 0xc5, 0x47, + 0x26, 0x26, 0x21, 0x0b, 0x4d, 0x41, 0x29, 0x37, 0x15, 0x14, 0x20, 0x05, 0x47, 0x00, 0x00, 0x01, + 0x00, 0x47, 0xfe, 0xf8, 0x04, 0x2f, 0x05, 0x81, 0x00, 0x0f, 0x00, 0x00, 0x41, 0x11, 0x23, 0x11, + 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x21, 0x15, 0x23, 0x11, 0x23, 0x11, 0x02, 0x4d, 0x9b, 0xa9, + 0xc2, 0xc5, 0xae, 0x02, 0x75, 0x83, 0x9c, 0x04, 0xf2, 0xfa, 0x06, 0x03, 0xbe, 0xb9, 0xaa, 0xa9, + 0xbf, 0x8f, 0xfa, 0x06, 0x05, 0xfa, 0x00, 0x01, 0x00, 0x8f, 0xff, 0xec, 0x04, 0xa9, 0x05, 0xcc, + 0x00, 0x33, 0x00, 0x00, 0x41, 0x14, 0x06, 0x23, 0x22, 0x27, 0x35, 0x16, 0x16, 0x33, 0x32, 0x36, + 0x35, 0x34, 0x26, 0x27, 0x26, 0x26, 0x35, 0x34, 0x36, 0x37, 0x36, 0x36, 0x35, 0x34, 0x26, 0x23, + 0x22, 0x06, 0x15, 0x11, 0x21, 0x11, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x07, 0x0e, + 0x02, 0x15, 0x14, 0x16, 0x16, 0x17, 0x16, 0x04, 0xa9, 0xc9, 0xba, 0x94, 0x72, 0x32, 0x87, 0x2f, + 0x51, 0x4a, 0x4c, 0x5d, 0x55, 0x54, 0x37, 0x39, 0x3d, 0x32, 0x5d, 0x58, 0x67, 0x6c, 0xfe, 0xe7, + 0xff, 0xf0, 0xce, 0xee, 0x44, 0x2c, 0x18, 0x35, 0x24, 0x0c, 0x46, 0x56, 0xa8, 0x01, 0x38, 0xa2, + 0xaa, 0x2b, 0xce, 0x17, 0x24, 0x45, 0x39, 0x34, 0x59, 0x3d, 0x37, 0x83, 0x4c, 0x36, 0x5e, 0x32, + 0x36, 0x51, 0x2d, 0x41, 0x4e, 0x7f, 0x8d, 0xfc, 0x0b, 0x03, 0xef, 0xea, 0xf3, 0xb4, 0x9b, 0x52, + 0x6f, 0x29, 0x16, 0x2e, 0x2d, 0x14, 0x10, 0x1b, 0x39, 0x40, 0x7c, 0x00, 0x00, 0x04, 0x00, 0x20, + 0xff, 0xf0, 0x05, 0xc6, 0x05, 0x96, 0x00, 0x13, 0x00, 0x27, 0x00, 0x35, 0x00, 0x3e, 0x00, 0x00, + 0x41, 0x14, 0x07, 0x06, 0x04, 0x23, 0x22, 0x27, 0x26, 0x02, 0x35, 0x34, 0x37, 0x36, 0x24, 0x33, + 0x32, 0x17, 0x16, 0x12, 0x07, 0x34, 0x27, 0x26, 0x24, 0x23, 0x22, 0x07, 0x06, 0x02, 0x15, 0x14, + 0x17, 0x16, 0x04, 0x33, 0x32, 0x37, 0x36, 0x12, 0x25, 0x11, 0x23, 0x11, 0x21, 0x32, 0x16, 0x15, + 0x14, 0x06, 0x07, 0x13, 0x23, 0x03, 0x13, 0x34, 0x26, 0x23, 0x23, 0x15, 0x33, 0x32, 0x36, 0x05, + 0xc6, 0x60, 0x61, 0xfe, 0xaf, 0xc1, 0xc4, 0xaa, 0xa9, 0xbc, 0x61, 0x61, 0x01, 0x50, 0xc1, 0xc2, + 0xa9, 0xa8, 0xc0, 0x70, 0x52, 0x52, 0xfe, 0xe4, 0xa3, 0x9d, 0x8c, 0x8c, 0xab, 0x52, 0x51, 0x01, + 0x19, 0xa4, 0xa4, 0x8e, 0x8e, 0xa3, 0xfd, 0x1e, 0xb2, 0x01, 0x4a, 0x99, 0x98, 0x60, 0x4e, 0xd5, + 0xc9, 0xb2, 0xa0, 0x4b, 0x45, 0x85, 0x90, 0x42, 0x43, 0x02, 0xc3, 0xc1, 0xa8, 0xa9, 0xc1, 0x65, + 0x65, 0x01, 0x4c, 0xbd, 0xc2, 0xa7, 0xa8, 0xc2, 0x61, 0x61, 0xfe, 0xb1, 0xc2, 0xa4, 0x8c, 0x8c, + 0xa4, 0x4e, 0x4e, 0xfe, 0xe5, 0xa9, 0xa3, 0x8e, 0x8e, 0xa4, 0x52, 0x52, 0x01, 0x1c, 0x42, 0xfe, + 0xc7, 0x03, 0x2f, 0x81, 0x71, 0x5e, 0x76, 0x19, 0xfe, 0xb0, 0x01, 0x39, 0x01, 0x02, 0x39, 0x3c, + 0xf6, 0x47, 0x00, 0x03, 0x00, 0x20, 0xff, 0xf0, 0x05, 0xc6, 0x05, 0x96, 0x00, 0x13, 0x00, 0x27, + 0x00, 0x3f, 0x00, 0x00, 0x41, 0x14, 0x07, 0x06, 0x04, 0x23, 0x22, 0x27, 0x26, 0x02, 0x35, 0x34, + 0x37, 0x36, 0x24, 0x33, 0x32, 0x17, 0x16, 0x12, 0x07, 0x34, 0x27, 0x26, 0x24, 0x23, 0x22, 0x07, + 0x06, 0x02, 0x15, 0x14, 0x17, 0x16, 0x04, 0x33, 0x32, 0x37, 0x36, 0x12, 0x25, 0x14, 0x16, 0x33, + 0x32, 0x37, 0x17, 0x06, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x20, 0x17, 0x07, 0x26, + 0x26, 0x23, 0x22, 0x06, 0x05, 0xc6, 0x60, 0x61, 0xfe, 0xaf, 0xc1, 0xc4, 0xaa, 0xa9, 0xbc, 0x61, + 0x61, 0x01, 0x50, 0xc1, 0xc2, 0xa9, 0xa8, 0xc0, 0x70, 0x52, 0x52, 0xfe, 0xe4, 0xa3, 0x9d, 0x8c, + 0x8c, 0xab, 0x52, 0x51, 0x01, 0x19, 0xa4, 0xa4, 0x8e, 0x8e, 0xa3, 0xfc, 0xca, 0x76, 0x6a, 0x8a, + 0x3a, 0xa0, 0x3a, 0xae, 0x7c, 0xc1, 0xd3, 0xcc, 0xbf, 0x01, 0x03, 0x5e, 0x9c, 0x1a, 0x61, 0x45, + 0x6d, 0x6f, 0x02, 0xc3, 0xc1, 0xa8, 0xa9, 0xc1, 0x65, 0x65, 0x01, 0x4c, 0xbd, 0xc2, 0xa7, 0xa8, + 0xc2, 0x61, 0x61, 0xfe, 0xb1, 0xc2, 0xa4, 0x8c, 0x8c, 0xa4, 0x4e, 0x4e, 0xfe, 0xe5, 0xa9, 0xa3, + 0x8e, 0x8e, 0xa4, 0x52, 0x52, 0x01, 0x1c, 0xa5, 0x87, 0x94, 0x8f, 0x2f, 0x7d, 0x70, 0xde, 0xca, + 0xcb, 0xd4, 0xe5, 0x29, 0x3d, 0x44, 0x8c, 0x00, 0x00, 0x01, 0x00, 0x57, 0x04, 0x9f, 0x02, 0x55, + 0x05, 0xde, 0x00, 0x05, 0x00, 0x00, 0x41, 0x01, 0x23, 0x35, 0x13, 0x21, 0x02, 0x55, 0xfe, 0xac, + 0xaa, 0xfc, 0x01, 0x02, 0x05, 0xb3, 0xfe, 0xec, 0x1f, 0x01, 0x20, 0x00, 0x00, 0x02, 0x00, 0x10, + 0x04, 0xaf, 0x02, 0x9b, 0x05, 0x8a, 0x00, 0x03, 0x00, 0x07, 0x00, 0x00, 0x41, 0x15, 0x23, 0x35, + 0x23, 0x15, 0x23, 0x35, 0x02, 0x9b, 0xd9, 0xdc, 0xd6, 0x05, 0x8a, 0xdb, 0xdb, 0xdb, 0xdb, 0x00, + 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x07, 0xb0, 0x05, 0x81, 0x00, 0x0f, 0x00, 0x13, 0x00, 0x00, + 0x41, 0x03, 0x21, 0x01, 0x21, 0x15, 0x21, 0x11, 0x21, 0x15, 0x21, 0x11, 0x21, 0x15, 0x21, 0x11, + 0x25, 0x21, 0x11, 0x23, 0x01, 0xe1, 0xac, 0xfe, 0xcf, 0x02, 0xbc, 0x04, 0xc7, 0xfd, 0x43, 0x02, + 0x7f, 0xfd, 0x81, 0x02, 0xe6, 0xfb, 0xf3, 0xfe, 0xa4, 0x01, 0x5c, 0x3d, 0x01, 0x68, 0xfe, 0x98, + 0x05, 0x81, 0xe3, 0xfe, 0x9d, 0xdd, 0xfe, 0x85, 0xe3, 0x01, 0x68, 0xde, 0x02, 0x62, 0x00, 0x03, + 0x00, 0x54, 0xff, 0xb7, 0x05, 0xe4, 0x05, 0xc1, 0x00, 0x16, 0x00, 0x1e, 0x00, 0x26, 0x00, 0x00, + 0x41, 0x14, 0x02, 0x04, 0x23, 0x22, 0x27, 0x07, 0x07, 0x37, 0x26, 0x11, 0x34, 0x12, 0x24, 0x33, + 0x32, 0x17, 0x37, 0x33, 0x07, 0x16, 0x12, 0x05, 0x14, 0x17, 0x01, 0x26, 0x23, 0x22, 0x02, 0x05, + 0x34, 0x27, 0x01, 0x16, 0x33, 0x32, 0x12, 0x05, 0xe4, 0xb0, 0xfe, 0xbf, 0xda, 0xd3, 0x95, 0x5b, + 0xc3, 0x9a, 0xd9, 0xa9, 0x01, 0x3f, 0xdf, 0xc5, 0x9d, 0x52, 0xc1, 0x8e, 0x70, 0x72, 0xfb, 0x99, + 0x54, 0x02, 0x1b, 0x5b, 0x76, 0xc6, 0xd8, 0x03, 0x3a, 0x56, 0xfd, 0xe3, 0x5b, 0x7a, 0xc7, 0xd7, + 0x02, 0xc7, 0xdd, 0xfe, 0xb7, 0xb5, 0x4d, 0x81, 0x01, 0xda, 0xc4, 0x01, 0x72, 0xe2, 0x01, 0x42, + 0xab, 0x4a, 0x75, 0xcb, 0x5e, 0xfe, 0xe3, 0xb4, 0xcc, 0x80, 0x03, 0x00, 0x33, 0xfe, 0xff, 0xe6, + 0xca, 0x7d, 0xfc, 0xfc, 0x37, 0x01, 0x05, 0x00, 0x00, 0x02, 0x00, 0x31, 0x00, 0x00, 0x04, 0x34, + 0x04, 0xf6, 0x00, 0x0b, 0x00, 0x0f, 0x00, 0x00, 0x41, 0x11, 0x23, 0x11, 0x21, 0x35, 0x21, 0x11, + 0x33, 0x11, 0x21, 0x15, 0x11, 0x15, 0x21, 0x35, 0x02, 0xa2, 0xe0, 0xfe, 0x6f, 0x01, 0x91, 0xe0, + 0x01, 0x92, 0xfb, 0xfd, 0x02, 0xc3, 0xfe, 0xab, 0x01, 0x55, 0xdf, 0x01, 0x54, 0xfe, 0xac, 0xdf, + 0xfe, 0x1c, 0xdf, 0xdf, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x04, 0x6a, 0x05, 0x81, 0x00, 0x16, + 0x00, 0x00, 0x65, 0x15, 0x21, 0x35, 0x21, 0x35, 0x21, 0x37, 0x21, 0x35, 0x21, 0x01, 0x21, 0x01, + 0x01, 0x21, 0x01, 0x21, 0x15, 0x21, 0x15, 0x21, 0x15, 0x02, 0xc0, 0xfe, 0xf0, 0xfe, 0xb0, 0x01, + 0x50, 0x02, 0xfe, 0xae, 0x01, 0x14, 0xfe, 0x94, 0x01, 0x21, 0x01, 0x0e, 0x01, 0x12, 0x01, 0x21, + 0xfe, 0x94, 0x01, 0x14, 0xfe, 0xae, 0x01, 0x52, 0xec, 0xec, 0xec, 0x93, 0xa2, 0x92, 0x02, 0xce, + 0xfd, 0xac, 0x02, 0x54, 0xfd, 0x32, 0x92, 0xa2, 0x93, 0x00, 0x00, 0x01, 0x00, 0x86, 0xfe, 0x56, + 0x04, 0xae, 0x04, 0x3a, 0x00, 0x20, 0x00, 0x00, 0x53, 0x11, 0x21, 0x11, 0x14, 0x16, 0x33, 0x32, + 0x36, 0x35, 0x11, 0x21, 0x03, 0x14, 0x16, 0x33, 0x32, 0x37, 0x15, 0x06, 0x06, 0x23, 0x22, 0x26, + 0x27, 0x23, 0x06, 0x06, 0x23, 0x22, 0x26, 0x27, 0x11, 0x86, 0x01, 0x19, 0x55, 0x5a, 0x59, 0x59, + 0x01, 0x19, 0x02, 0x29, 0x30, 0x20, 0x1e, 0x34, 0x4a, 0x36, 0x6a, 0x65, 0x0a, 0x06, 0x21, 0x70, + 0x4f, 0x34, 0x51, 0x17, 0xfe, 0x56, 0x05, 0xe4, 0xfd, 0xa3, 0x96, 0x86, 0x98, 0x9f, 0x02, 0x42, + 0xfd, 0x06, 0x5b, 0x45, 0x06, 0x98, 0x0d, 0x0d, 0x59, 0x65, 0x70, 0x56, 0x30, 0x2a, 0xfe, 0x10, + 0x00, 0x02, 0x00, 0x2d, 0x02, 0xd5, 0x02, 0xf6, 0x05, 0x8b, 0x00, 0x23, 0x00, 0x2d, 0x00, 0x00, + 0x41, 0x22, 0x26, 0x35, 0x34, 0x25, 0x37, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x27, 0x36, + 0x36, 0x33, 0x32, 0x16, 0x15, 0x15, 0x14, 0x16, 0x37, 0x36, 0x36, 0x37, 0x15, 0x06, 0x23, 0x22, + 0x26, 0x27, 0x23, 0x06, 0x27, 0x32, 0x36, 0x35, 0x35, 0x07, 0x06, 0x06, 0x15, 0x14, 0x01, 0x01, + 0x61, 0x73, 0x01, 0x1c, 0x93, 0x34, 0x34, 0x33, 0x38, 0x05, 0xbe, 0x12, 0x9d, 0x7e, 0x8a, 0x95, + 0x12, 0x21, 0x0c, 0x19, 0x0c, 0x40, 0x37, 0x47, 0x51, 0x05, 0x03, 0x48, 0x4f, 0x3d, 0x57, 0x5c, + 0x58, 0x3e, 0x02, 0xd5, 0x69, 0x61, 0xce, 0x05, 0x02, 0x2a, 0x3b, 0x3c, 0x2f, 0x2f, 0x09, 0x62, + 0x69, 0x7a, 0x71, 0xed, 0x30, 0x32, 0x01, 0x01, 0x03, 0x01, 0x6d, 0x12, 0x49, 0x3d, 0x89, 0x83, + 0x60, 0x41, 0x1b, 0x02, 0x03, 0x30, 0x32, 0x55, 0x00, 0x02, 0x00, 0x2d, 0x02, 0xd5, 0x02, 0xc9, + 0x05, 0x8b, 0x00, 0x0b, 0x00, 0x17, 0x00, 0x00, 0x41, 0x14, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, + 0x36, 0x33, 0x32, 0x16, 0x07, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, + 0x02, 0xc9, 0xb3, 0x9f, 0x98, 0xb2, 0xb0, 0x9e, 0xa0, 0xae, 0xc8, 0x3b, 0x49, 0x49, 0x41, 0x40, + 0x43, 0x4b, 0x40, 0x04, 0x31, 0xa2, 0xba, 0xb8, 0xa4, 0xa2, 0xb8, 0xb2, 0xa8, 0x6a, 0x61, 0x63, + 0x68, 0x6a, 0x66, 0x65, 0x00, 0x03, 0x00, 0x42, 0xff, 0xec, 0x06, 0xc8, 0x04, 0x4e, 0x00, 0x27, + 0x00, 0x2e, 0x00, 0x3d, 0x00, 0x00, 0x41, 0x02, 0x21, 0x20, 0x27, 0x06, 0x06, 0x23, 0x22, 0x26, + 0x35, 0x10, 0x25, 0x37, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x25, 0x36, 0x36, 0x33, 0x32, + 0x17, 0x36, 0x33, 0x32, 0x12, 0x11, 0x15, 0x21, 0x14, 0x16, 0x33, 0x32, 0x36, 0x37, 0x13, 0x26, + 0x26, 0x23, 0x22, 0x06, 0x07, 0x01, 0x14, 0x16, 0x33, 0x32, 0x37, 0x36, 0x36, 0x35, 0x35, 0x07, + 0x06, 0x07, 0x06, 0x06, 0x06, 0xb8, 0x73, 0xfe, 0xa0, 0xfe, 0xca, 0x7c, 0x43, 0xce, 0x8c, 0xa1, + 0xb3, 0x01, 0xb8, 0xf0, 0x50, 0x58, 0x55, 0x4c, 0x09, 0xfe, 0xdb, 0x1a, 0xed, 0xd0, 0xd9, 0x74, + 0x83, 0xcf, 0xe9, 0xf6, 0xfd, 0x4a, 0x76, 0x6b, 0x4a, 0x5f, 0x13, 0x09, 0x08, 0x6e, 0x5d, 0x63, + 0x6b, 0x03, 0xfd, 0x53, 0x4b, 0x3e, 0x45, 0x3a, 0x3a, 0x41, 0x98, 0x67, 0x2c, 0x2b, 0x2d, 0x01, + 0x12, 0xfe, 0xda, 0xe5, 0x73, 0x72, 0xac, 0x9a, 0x01, 0x4f, 0x0b, 0x04, 0x37, 0x6c, 0x65, 0x4a, + 0x4f, 0x0e, 0x9d, 0xa4, 0x6b, 0x6b, 0xfe, 0xcb, 0xfe, 0xd6, 0x13, 0x92, 0xa2, 0x41, 0x40, 0x01, + 0x6e, 0x83, 0x83, 0x8a, 0x7c, 0xfe, 0xb1, 0x4d, 0x4b, 0x27, 0x27, 0x82, 0x48, 0x2d, 0x02, 0x04, + 0x11, 0x12, 0x48, 0x00, 0x00, 0x03, 0x00, 0x01, 0xff, 0xc9, 0x04, 0xda, 0x04, 0x6d, 0x00, 0x13, + 0x00, 0x1b, 0x00, 0x23, 0x00, 0x00, 0x41, 0x10, 0x00, 0x21, 0x22, 0x27, 0x07, 0x23, 0x37, 0x26, + 0x35, 0x10, 0x00, 0x21, 0x32, 0x17, 0x37, 0x33, 0x07, 0x16, 0x05, 0x14, 0x17, 0x01, 0x26, 0x23, + 0x22, 0x06, 0x05, 0x34, 0x27, 0x01, 0x16, 0x33, 0x32, 0x36, 0x04, 0x93, 0xfe, 0xdc, 0xfe, 0xfe, + 0xbf, 0x85, 0x71, 0xb7, 0xc5, 0x76, 0x01, 0x20, 0x01, 0x03, 0xc7, 0x83, 0x65, 0xb8, 0xb8, 0x71, + 0xfc, 0xe4, 0x11, 0x01, 0x97, 0x3c, 0x6c, 0x80, 0x80, 0x01, 0xf6, 0x10, 0xfe, 0x69, 0x3e, 0x66, + 0x82, 0x81, 0x02, 0x1e, 0xfe, 0xf9, 0xfe, 0xd5, 0x59, 0x7c, 0xd7, 0x91, 0xed, 0x01, 0x05, 0x01, + 0x2b, 0x53, 0x72, 0xce, 0x8f, 0xf2, 0x5a, 0x49, 0x01, 0xcd, 0x45, 0xb7, 0xb8, 0x61, 0x41, 0xfe, + 0x34, 0x48, 0xb9, 0x00, 0x00, 0x02, 0x00, 0x72, 0xfe, 0xa4, 0x04, 0x81, 0x04, 0x3a, 0x00, 0x03, + 0x00, 0x1f, 0x00, 0x00, 0x41, 0x11, 0x21, 0x11, 0x01, 0x34, 0x36, 0x37, 0x37, 0x36, 0x37, 0x21, + 0x0e, 0x02, 0x07, 0x0e, 0x02, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, 0x37, 0x05, 0x06, 0x04, 0x23, + 0x22, 0x24, 0x03, 0x29, 0xfe, 0xdf, 0xfe, 0x6a, 0x57, 0x77, 0x4d, 0x83, 0x06, 0x01, 0x0b, 0x04, + 0x31, 0x5a, 0x42, 0x47, 0x56, 0x26, 0x73, 0x6a, 0x65, 0x89, 0x0c, 0x01, 0x1d, 0x1b, 0xfe, 0xe8, + 0xe0, 0xed, 0xfe, 0xf1, 0x04, 0x3a, 0xfe, 0xf2, 0x01, 0x0e, 0xfb, 0xfe, 0x61, 0x9a, 0x55, 0x37, + 0x60, 0x71, 0x44, 0x74, 0x65, 0x2e, 0x32, 0x51, 0x4f, 0x2f, 0x58, 0x66, 0x76, 0x61, 0x0c, 0xcb, + 0xe2, 0xd7, 0x00, 0x02, 0x00, 0xc2, 0xfe, 0xb9, 0x01, 0xe8, 0x04, 0x3a, 0x00, 0x03, 0x00, 0x07, + 0x00, 0x00, 0x41, 0x11, 0x21, 0x11, 0x03, 0x13, 0x33, 0x13, 0x01, 0xe8, 0xfe, 0xe0, 0x06, 0x20, + 0xe6, 0x20, 0x04, 0x3a, 0xfe, 0xf2, 0x01, 0x0e, 0xfa, 0x7f, 0x03, 0xd5, 0xfc, 0x2b, 0x00, 0x01, + 0x00, 0x54, 0x00, 0x8d, 0x04, 0x57, 0x03, 0x19, 0x00, 0x05, 0x00, 0x00, 0x41, 0x11, 0x23, 0x11, + 0x21, 0x35, 0x04, 0x57, 0xe0, 0xfc, 0xdd, 0x03, 0x19, 0xfd, 0x74, 0x01, 0xac, 0xe0, 0x00, 0x02, + 0x00, 0x5c, 0x00, 0x8d, 0x04, 0x17, 0x03, 0xac, 0x00, 0x08, 0x00, 0x11, 0x00, 0x00, 0x65, 0x15, + 0x23, 0x01, 0x35, 0x01, 0x33, 0x15, 0x03, 0x03, 0x15, 0x23, 0x01, 0x35, 0x01, 0x33, 0x15, 0x03, + 0x04, 0x17, 0xf0, 0xff, 0x00, 0x01, 0x00, 0xee, 0xfe, 0xcb, 0xee, 0xfe, 0xfe, 0x01, 0x02, 0xec, + 0xfe, 0xb0, 0x23, 0x01, 0x69, 0x47, 0x01, 0x6f, 0x25, 0xfe, 0x92, 0xfe, 0x97, 0x23, 0x01, 0x69, + 0x47, 0x01, 0x6f, 0x25, 0xfe, 0x92, 0x00, 0x02, 0x00, 0x5d, 0x00, 0x8d, 0x04, 0x18, 0x03, 0xac, + 0x00, 0x08, 0x00, 0x11, 0x00, 0x00, 0x65, 0x23, 0x35, 0x01, 0x03, 0x35, 0x33, 0x01, 0x15, 0x01, + 0x23, 0x35, 0x01, 0x03, 0x35, 0x33, 0x01, 0x15, 0x03, 0x16, 0xee, 0x01, 0x00, 0xfe, 0xec, 0x01, + 0x02, 0xfd, 0x35, 0xf0, 0x01, 0x00, 0xfe, 0xee, 0x01, 0x00, 0x8d, 0x23, 0x01, 0x69, 0x01, 0x6e, + 0x25, 0xfe, 0x91, 0x47, 0xfe, 0x97, 0x23, 0x01, 0x69, 0x01, 0x6e, 0x25, 0xfe, 0x91, 0x47, 0x00, + 0xff, 0xff, 0x00, 0x33, 0x00, 0x00, 0x05, 0x91, 0x07, 0x17, 0x06, 0x26, 0x00, 0x22, 0x00, 0x00, + 0x00, 0x07, 0x00, 0xc4, 0x01, 0x56, 0x00, 0x00, 0xff, 0xff, 0x00, 0x33, 0x00, 0x00, 0x05, 0x91, + 0x07, 0x1f, 0x06, 0x26, 0x00, 0x22, 0x00, 0x00, 0x00, 0x07, 0x00, 0xc8, 0x01, 0x8d, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x54, 0xff, 0xec, 0x05, 0xe3, 0x07, 0x1f, 0x06, 0x26, 0x00, 0x30, 0x00, 0x00, + 0x00, 0x07, 0x00, 0xc8, 0x01, 0xbe, 0x00, 0x00, 0x00, 0x03, 0x00, 0x31, 0x00, 0xaa, 0x04, 0x34, + 0x04, 0xaa, 0x00, 0x03, 0x00, 0x07, 0x00, 0x0b, 0x00, 0x00, 0x41, 0x15, 0x23, 0x35, 0x01, 0x15, + 0x21, 0x35, 0x01, 0x15, 0x23, 0x35, 0x02, 0xa8, 0xee, 0x02, 0x7a, 0xfb, 0xfd, 0x02, 0x77, 0xee, + 0x04, 0xaa, 0xe9, 0xe9, 0xfe, 0x6f, 0xe0, 0xe0, 0xfe, 0x7a, 0xe9, 0xe9, 0xff, 0xff, 0x00, 0x10, + 0xfe, 0x57, 0x04, 0x68, 0x05, 0x8a, 0x06, 0x26, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x89, + 0x00, 0xf1, 0x00, 0x00, 0x00, 0x01, 0xfe, 0x87, 0x00, 0x00, 0x02, 0xcf, 0x05, 0x81, 0x00, 0x03, + 0x00, 0x00, 0x41, 0x01, 0x23, 0x01, 0x02, 0xcf, 0xfc, 0x81, 0xc9, 0x03, 0x7f, 0x05, 0x81, 0xfa, + 0x7f, 0x05, 0x81, 0x00, 0xff, 0xff, 0x00, 0x33, 0x00, 0x00, 0x05, 0x91, 0x07, 0x2b, 0x06, 0x26, + 0x00, 0x22, 0x00, 0x00, 0x00, 0x07, 0x00, 0xc6, 0x01, 0x8d, 0x00, 0x00, 0xff, 0xff, 0x00, 0x89, + 0x00, 0x00, 0x05, 0x06, 0x07, 0x2b, 0x06, 0x26, 0x00, 0x26, 0x00, 0x00, 0x00, 0x07, 0x00, 0xc6, + 0x01, 0x73, 0x00, 0x00, 0xff, 0xff, 0x00, 0x33, 0x00, 0x00, 0x05, 0x91, 0x07, 0x17, 0x06, 0x26, + 0x00, 0x22, 0x00, 0x00, 0x00, 0x07, 0x00, 0xc5, 0x01, 0xe6, 0x00, 0x00, 0xff, 0xff, 0x00, 0x89, + 0x00, 0x00, 0x05, 0x06, 0x06, 0xd5, 0x06, 0x26, 0x00, 0x26, 0x00, 0x00, 0x00, 0x07, 0x00, 0xc7, + 0x01, 0x73, 0x00, 0x00, 0xff, 0xff, 0x00, 0x89, 0x00, 0x00, 0x05, 0x06, 0x07, 0x17, 0x06, 0x26, + 0x00, 0x26, 0x00, 0x00, 0x00, 0x07, 0x00, 0xc4, 0x01, 0x35, 0x00, 0x00, 0xff, 0xff, 0x00, 0x68, + 0x00, 0x00, 0x02, 0x66, 0x07, 0x17, 0x06, 0x26, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x06, 0x00, 0xc5, + 0x11, 0x00, 0xff, 0xff, 0xff, 0xab, 0x00, 0x00, 0x02, 0x8c, 0x07, 0x2b, 0x06, 0x26, 0x00, 0x2a, + 0x00, 0x00, 0x00, 0x06, 0x00, 0xc6, 0xc6, 0x00, 0xff, 0xff, 0xff, 0xd7, 0x00, 0x00, 0x02, 0x62, + 0x06, 0xd5, 0x06, 0x26, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x06, 0x00, 0xc7, 0xc8, 0x00, 0xff, 0xff, + 0xff, 0xd8, 0x00, 0x00, 0x01, 0xd5, 0x07, 0x17, 0x06, 0x26, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x06, + 0x00, 0xc4, 0x81, 0x00, 0xff, 0xff, 0x00, 0x54, 0xff, 0xec, 0x05, 0xe3, 0x07, 0x17, 0x06, 0x26, + 0x00, 0x30, 0x00, 0x00, 0x00, 0x07, 0x00, 0xc5, 0x02, 0x1a, 0x00, 0x00, 0xff, 0xff, 0x00, 0x54, + 0xff, 0xec, 0x05, 0xe3, 0x07, 0x2b, 0x06, 0x26, 0x00, 0x30, 0x00, 0x00, 0x00, 0x07, 0x00, 0xc6, + 0x01, 0xc5, 0x00, 0x00, 0xff, 0xff, 0x00, 0x54, 0xff, 0xec, 0x05, 0xe3, 0x07, 0x17, 0x06, 0x26, + 0x00, 0x30, 0x00, 0x00, 0x00, 0x07, 0x00, 0xc4, 0x01, 0xcc, 0x00, 0x00, 0xff, 0xff, 0x00, 0x7b, + 0xff, 0xec, 0x05, 0x4a, 0x07, 0x17, 0x06, 0x26, 0x00, 0x36, 0x00, 0x00, 0x00, 0x07, 0x00, 0xc5, + 0x01, 0xf9, 0x00, 0x00, 0xff, 0xff, 0x00, 0x7b, 0xff, 0xec, 0x05, 0x4a, 0x07, 0x2b, 0x06, 0x26, + 0x00, 0x36, 0x00, 0x00, 0x00, 0x07, 0x00, 0xc6, 0x01, 0x8b, 0x00, 0x00, 0xff, 0xff, 0x00, 0x7b, + 0xff, 0xec, 0x05, 0x4a, 0x07, 0x17, 0x06, 0x26, 0x00, 0x36, 0x00, 0x00, 0x00, 0x07, 0x00, 0xc4, + 0x01, 0x49, 0x00, 0x00, 0x00, 0x01, 0x00, 0x91, 0x00, 0x00, 0x01, 0xaa, 0x04, 0x3a, 0x00, 0x03, + 0x00, 0x00, 0x41, 0x11, 0x21, 0x11, 0x01, 0xaa, 0xfe, 0xe7, 0x04, 0x3a, 0xfb, 0xc6, 0x04, 0x3a, + 0x00, 0x01, 0x00, 0x00, 0x04, 0x9f, 0x02, 0xe1, 0x05, 0xf9, 0x00, 0x09, 0x00, 0x00, 0x51, 0x35, + 0x01, 0x33, 0x13, 0x15, 0x23, 0x27, 0x23, 0x07, 0x01, 0x02, 0xe5, 0xfa, 0x9f, 0xcb, 0x04, 0xd3, + 0x04, 0x9f, 0x1c, 0x01, 0x3e, 0xfe, 0xc2, 0x1c, 0xc0, 0xc0, 0x00, 0x01, 0xff, 0xf2, 0x04, 0x9f, + 0x02, 0xfe, 0x05, 0xc4, 0x00, 0x19, 0x00, 0x00, 0x41, 0x22, 0x26, 0x27, 0x26, 0x26, 0x23, 0x22, + 0x06, 0x07, 0x23, 0x36, 0x36, 0x33, 0x32, 0x16, 0x17, 0x16, 0x16, 0x33, 0x32, 0x36, 0x37, 0x33, + 0x06, 0x06, 0x02, 0x1f, 0x27, 0x52, 0x29, 0x2c, 0x52, 0x22, 0x29, 0x2b, 0x0e, 0x89, 0x0b, 0x75, + 0x61, 0x2d, 0x5e, 0x2d, 0x27, 0x46, 0x1c, 0x28, 0x2d, 0x0e, 0x87, 0x07, 0x71, 0x04, 0x9f, 0x23, + 0x16, 0x18, 0x2a, 0x2e, 0x4d, 0xac, 0x79, 0x2b, 0x19, 0x16, 0x21, 0x31, 0x4a, 0x9d, 0x88, 0x00, + 0x00, 0x02, 0x00, 0x27, 0x04, 0x70, 0x02, 0x23, 0x06, 0x6c, 0x00, 0x0f, 0x00, 0x1b, 0x00, 0x00, + 0x41, 0x14, 0x06, 0x06, 0x23, 0x22, 0x26, 0x26, 0x35, 0x34, 0x36, 0x36, 0x33, 0x32, 0x16, 0x16, + 0x07, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, 0x02, 0x23, 0x43, 0x73, + 0x48, 0x47, 0x74, 0x43, 0x45, 0x73, 0x46, 0x46, 0x73, 0x45, 0x7f, 0x49, 0x36, 0x33, 0x4a, 0x4a, + 0x33, 0x35, 0x4a, 0x05, 0x6e, 0x46, 0x73, 0x45, 0x45, 0x73, 0x46, 0x46, 0x73, 0x45, 0x45, 0x73, + 0x46, 0x33, 0x4a, 0x48, 0x35, 0x38, 0x48, 0x4a, 0x00, 0x01, 0x00, 0x60, 0xfe, 0x57, 0x01, 0xf4, + 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x45, 0x14, 0x06, 0x23, 0x22, 0x27, 0x35, 0x16, 0x33, 0x32, + 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x37, 0x33, 0x07, 0x16, 0x16, 0x01, 0xf4, 0x9c, 0x93, + 0x2d, 0x38, 0x20, 0x34, 0x89, 0x38, 0x42, 0x13, 0x1a, 0x07, 0x3e, 0x8f, 0x21, 0x5e, 0x5b, 0xeb, + 0x5e, 0x60, 0x06, 0x76, 0x07, 0x45, 0x23, 0x22, 0x01, 0x01, 0xac, 0x52, 0x05, 0x52, 0x00, 0x02, + 0x00, 0x9c, 0xfe, 0x39, 0x01, 0xa2, 0x05, 0xae, 0x00, 0x03, 0x00, 0x07, 0x00, 0x00, 0x41, 0x11, + 0x21, 0x11, 0x01, 0x11, 0x21, 0x11, 0x01, 0xa2, 0xfe, 0xfa, 0x01, 0x06, 0xfe, 0xfa, 0x05, 0xae, + 0xfc, 0xf6, 0x03, 0x0a, 0xfb, 0x96, 0xfc, 0xf5, 0x03, 0x0b, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, + 0x05, 0x71, 0x05, 0x81, 0x00, 0x0d, 0x00, 0x1b, 0x00, 0x00, 0x41, 0x14, 0x02, 0x04, 0x23, 0x21, + 0x11, 0x23, 0x35, 0x33, 0x11, 0x21, 0x20, 0x00, 0x01, 0x34, 0x26, 0x23, 0x23, 0x11, 0x21, 0x15, + 0x21, 0x11, 0x33, 0x32, 0x36, 0x36, 0x05, 0x71, 0xaf, 0xfe, 0xcb, 0xca, 0xfd, 0xc6, 0x81, 0x81, + 0x01, 0xfe, 0x01, 0x64, 0x01, 0x86, 0xfe, 0xd7, 0xea, 0xdd, 0xd1, 0x01, 0x64, 0xfe, 0x9c, 0xfa, + 0x80, 0xb9, 0x65, 0x02, 0xcb, 0xe1, 0xfe, 0xc0, 0xaa, 0x02, 0x52, 0xdb, 0x02, 0x54, 0xfe, 0x99, + 0xfe, 0xb1, 0xe1, 0xee, 0xfe, 0x93, 0xdb, 0xfe, 0x95, 0x75, 0xd9, 0x00, 0x00, 0x02, 0x00, 0x50, + 0xff, 0xee, 0x04, 0x93, 0x05, 0xdf, 0x00, 0x1b, 0x00, 0x27, 0x00, 0x00, 0x45, 0x22, 0x00, 0x35, + 0x34, 0x00, 0x21, 0x32, 0x17, 0x26, 0x27, 0x05, 0x35, 0x37, 0x26, 0x26, 0x27, 0x21, 0x16, 0x17, + 0x25, 0x15, 0x07, 0x16, 0x12, 0x15, 0x10, 0x00, 0x03, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, + 0x16, 0x33, 0x32, 0x36, 0x02, 0x6f, 0xfb, 0xfe, 0xdc, 0x01, 0x21, 0x01, 0x02, 0x68, 0x3b, 0x40, + 0x56, 0xfe, 0xdc, 0xa6, 0x2c, 0x81, 0x55, 0x01, 0x25, 0x61, 0x3f, 0x01, 0x0c, 0x79, 0x9e, 0x9d, + 0xfe, 0xdf, 0x05, 0x7e, 0x78, 0x80, 0x80, 0x7c, 0x77, 0x7d, 0x86, 0x12, 0x01, 0x0a, 0xe7, 0xe8, + 0x01, 0x06, 0x20, 0x87, 0x64, 0x7a, 0xb8, 0x46, 0x23, 0x59, 0x34, 0x30, 0x2e, 0x71, 0xbc, 0x31, + 0xa0, 0xfe, 0x96, 0xcb, 0xfe, 0xf8, 0xfe, 0xd9, 0x01, 0xef, 0xa0, 0x8f, 0x97, 0x98, 0x94, 0x9d, + 0x90, 0x00, 0xff, 0xff, 0x00, 0x23, 0x00, 0x00, 0x05, 0x35, 0x07, 0x17, 0x06, 0x26, 0x00, 0x3a, + 0x00, 0x00, 0x00, 0x07, 0x00, 0xc5, 0x01, 0xb5, 0x00, 0x00, 0xff, 0xff, 0x00, 0x10, 0xfe, 0x57, + 0x04, 0x68, 0x05, 0xde, 0x06, 0x26, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x88, 0x01, 0x46, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x89, 0x00, 0x00, 0x05, 0x10, 0x05, 0x81, 0x00, 0x0d, 0x00, 0x16, + 0x00, 0x00, 0x41, 0x14, 0x06, 0x06, 0x23, 0x21, 0x11, 0x21, 0x11, 0x21, 0x15, 0x21, 0x32, 0x04, + 0x05, 0x34, 0x26, 0x23, 0x21, 0x11, 0x21, 0x32, 0x36, 0x05, 0x10, 0x7c, 0xe6, 0xa0, 0xfe, 0xa2, + 0xfe, 0xd9, 0x01, 0x27, 0x01, 0x52, 0xfe, 0x01, 0x10, 0xfe, 0xd7, 0x83, 0x83, 0xfe, 0xcf, 0x01, + 0x39, 0x79, 0x85, 0x02, 0xe1, 0x85, 0xcd, 0x74, 0xfe, 0xe5, 0x05, 0x81, 0xe9, 0xe3, 0xd8, 0x6e, + 0x7c, 0xfe, 0x25, 0x7f, 0x00, 0x02, 0x00, 0x8f, 0xfe, 0x57, 0x04, 0x8f, 0x05, 0xcc, 0x00, 0x16, + 0x00, 0x22, 0x00, 0x00, 0x45, 0x11, 0x21, 0x11, 0x21, 0x11, 0x14, 0x06, 0x07, 0x33, 0x36, 0x36, + 0x33, 0x32, 0x12, 0x15, 0x10, 0x02, 0x23, 0x22, 0x27, 0x23, 0x16, 0x01, 0x34, 0x26, 0x23, 0x22, + 0x06, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, 0x01, 0xa8, 0xfe, 0xe7, 0x01, 0x19, 0x03, 0x01, 0x04, + 0x2f, 0xae, 0x7d, 0xbf, 0xce, 0xd9, 0xc6, 0xeb, 0x5d, 0x06, 0x06, 0x01, 0xc2, 0x6f, 0x70, 0x71, + 0x76, 0x77, 0x6e, 0x71, 0x70, 0x0a, 0xfe, 0x61, 0x07, 0x75, 0xfe, 0x32, 0x2a, 0x54, 0x2a, 0x64, + 0x63, 0xfe, 0xe7, 0xfc, 0xfe, 0xff, 0xfe, 0xe5, 0xc0, 0x1e, 0x01, 0x7a, 0xac, 0xa6, 0xb7, 0xa3, + 0xa3, 0xb1, 0xae, 0x00, 0x00, 0x01, 0x00, 0x56, 0x00, 0xa8, 0x04, 0x56, 0x04, 0xaa, 0x00, 0x0b, + 0x00, 0x00, 0x41, 0x01, 0x27, 0x01, 0x01, 0x37, 0x01, 0x01, 0x17, 0x01, 0x01, 0x07, 0x02, 0x58, + 0xfe, 0x9c, 0x9e, 0x01, 0x64, 0xfe, 0xa0, 0x9e, 0x01, 0x60, 0x01, 0x60, 0x9e, 0xfe, 0xa0, 0x01, + 0x60, 0x9e, 0x02, 0x0e, 0xfe, 0x9a, 0x9e, 0x01, 0x66, 0x01, 0x60, 0x9c, 0xfe, 0xa2, 0x01, 0x60, + 0x9e, 0xfe, 0x9e, 0xfe, 0xa2, 0xa0, 0x00, 0x01, 0x00, 0x52, 0x02, 0xb6, 0x02, 0x6a, 0x05, 0x86, + 0x00, 0x0a, 0x00, 0x00, 0x41, 0x15, 0x21, 0x35, 0x33, 0x11, 0x07, 0x35, 0x37, 0x33, 0x11, 0x02, + 0x6a, 0xfd, 0xe8, 0xb8, 0xad, 0xb4, 0xaf, 0x03, 0x2f, 0x79, 0x79, 0x01, 0xd4, 0x6c, 0x7a, 0x75, + 0xfd, 0xa9, 0x00, 0x01, 0x00, 0x33, 0x02, 0xb6, 0x02, 0x7f, 0x05, 0x92, 0x00, 0x1d, 0x00, 0x00, + 0x41, 0x15, 0x21, 0x27, 0x36, 0x36, 0x37, 0x36, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, + 0x27, 0x36, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x07, 0x06, 0x06, 0x07, 0x06, 0x07, 0x02, 0x7f, + 0xfd, 0xb6, 0x02, 0x1d, 0x6a, 0x5b, 0x56, 0x41, 0x28, 0x29, 0x2b, 0x2f, 0x05, 0xc2, 0x0d, 0x98, + 0x7c, 0x83, 0x94, 0x99, 0x34, 0x46, 0x13, 0x27, 0x10, 0x03, 0x40, 0x8a, 0x79, 0x3d, 0x69, 0x3b, + 0x38, 0x48, 0x28, 0x2e, 0x2d, 0x31, 0x31, 0x05, 0x63, 0x79, 0x6f, 0x63, 0x7d, 0x62, 0x21, 0x30, + 0x10, 0x1f, 0x21, 0x00, 0x00, 0x01, 0x00, 0x2c, 0x02, 0xac, 0x02, 0x7e, 0x05, 0x92, 0x00, 0x26, + 0x00, 0x00, 0x41, 0x14, 0x06, 0x23, 0x22, 0x26, 0x27, 0x37, 0x16, 0x33, 0x32, 0x35, 0x34, 0x23, + 0x23, 0x35, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x27, 0x36, 0x36, 0x33, + 0x32, 0x16, 0x15, 0x14, 0x06, 0x07, 0x15, 0x16, 0x16, 0x02, 0x7e, 0x96, 0x8a, 0x87, 0x9e, 0x0d, + 0xbd, 0x0b, 0x67, 0x66, 0x8b, 0x38, 0x33, 0x3f, 0x40, 0x2e, 0x2b, 0x2c, 0x31, 0x05, 0xba, 0x0b, + 0x99, 0x7d, 0x80, 0x8f, 0x49, 0x4f, 0x53, 0x58, 0x03, 0x7f, 0x63, 0x70, 0x68, 0x68, 0x0c, 0x5d, + 0x60, 0x5d, 0x7e, 0x2f, 0x2b, 0x27, 0x2c, 0x2d, 0x2c, 0x0c, 0x5e, 0x6e, 0x67, 0x55, 0x40, 0x5b, + 0x10, 0x02, 0x09, 0x5c, 0xff, 0xff, 0x00, 0x5e, 0xff, 0xff, 0x06, 0x4c, 0x05, 0x86, 0x04, 0x26, + 0x00, 0xba, 0x0c, 0x00, 0x00, 0x27, 0x00, 0x9d, 0x02, 0xbc, 0x00, 0x00, 0x00, 0x07, 0x00, 0xbb, + 0x03, 0xcd, 0xfd, 0x49, 0xff, 0xff, 0x00, 0x5e, 0x00, 0x00, 0x06, 0x4b, 0x05, 0x86, 0x04, 0x26, + 0x00, 0xba, 0x0c, 0x00, 0x00, 0x27, 0x00, 0x9d, 0x02, 0xd0, 0x00, 0x00, 0x00, 0x07, 0x00, 0xc3, + 0x03, 0xb2, 0xfd, 0x4b, 0xff, 0xff, 0x00, 0x67, 0x00, 0x00, 0x06, 0x4b, 0x05, 0x92, 0x04, 0x27, + 0x00, 0x9d, 0x02, 0xd0, 0x00, 0x00, 0x00, 0x27, 0x00, 0xc3, 0x03, 0xb2, 0xfd, 0x4b, 0x00, 0x06, + 0x00, 0xbc, 0x3b, 0x00, 0x00, 0x01, 0xff, 0xef, 0x05, 0xac, 0x04, 0x7c, 0x06, 0x0a, 0x00, 0x03, + 0x00, 0x00, 0x41, 0x15, 0x21, 0x35, 0x04, 0x7c, 0xfb, 0x73, 0x06, 0x0a, 0x5e, 0x5e, 0x00, 0x01, + 0x00, 0x8d, 0x02, 0x13, 0x01, 0xad, 0x03, 0x44, 0x00, 0x03, 0x00, 0x00, 0x41, 0x11, 0x21, 0x11, + 0x01, 0xad, 0xfe, 0xe0, 0x03, 0x44, 0xfe, 0xcf, 0x01, 0x31, 0x00, 0x02, 0x00, 0x39, 0x00, 0xaa, + 0x04, 0x39, 0x04, 0xac, 0x00, 0x1b, 0x00, 0x2b, 0x00, 0x00, 0x53, 0x34, 0x37, 0x27, 0x37, 0x17, + 0x36, 0x33, 0x32, 0x17, 0x37, 0x17, 0x07, 0x16, 0x15, 0x14, 0x07, 0x17, 0x07, 0x27, 0x06, 0x23, + 0x22, 0x27, 0x07, 0x27, 0x37, 0x26, 0x37, 0x14, 0x16, 0x16, 0x33, 0x32, 0x36, 0x36, 0x35, 0x34, + 0x26, 0x26, 0x23, 0x22, 0x06, 0x06, 0x86, 0x3c, 0x85, 0x9d, 0x83, 0x65, 0x77, 0x79, 0x62, 0x87, + 0x9e, 0x88, 0x3c, 0x3a, 0x86, 0x9e, 0x85, 0x65, 0x78, 0x7a, 0x62, 0x87, 0x9d, 0x87, 0x3a, 0xe2, + 0x38, 0x5f, 0x3a, 0x39, 0x5e, 0x39, 0x38, 0x5e, 0x3a, 0x3a, 0x5e, 0x39, 0x02, 0xac, 0x79, 0x64, + 0x85, 0x9c, 0x85, 0x3b, 0x3b, 0x87, 0x9e, 0x87, 0x63, 0x78, 0x77, 0x62, 0x85, 0xa0, 0x87, 0x3b, + 0x39, 0x89, 0x9e, 0x89, 0x62, 0x7b, 0x39, 0x5f, 0x39, 0x39, 0x60, 0x38, 0x3a, 0x5e, 0x39, 0x38, + 0x5f, 0x00, 0x00, 0x02, 0x00, 0x23, 0x02, 0xb6, 0x02, 0x99, 0x05, 0x86, 0x00, 0x0a, 0x00, 0x13, + 0x00, 0x00, 0x41, 0x15, 0x23, 0x35, 0x21, 0x35, 0x01, 0x33, 0x11, 0x33, 0x15, 0x01, 0x06, 0x06, + 0x07, 0x07, 0x33, 0x35, 0x34, 0x36, 0x02, 0x32, 0xb7, 0xfe, 0xa8, 0x01, 0x3c, 0xd3, 0x67, 0xfe, + 0xe6, 0x16, 0x1d, 0x0e, 0x8d, 0xca, 0x03, 0x03, 0x42, 0x8c, 0x8c, 0x94, 0x01, 0xb0, 0xfe, 0x48, + 0x8c, 0x01, 0xba, 0x25, 0x32, 0x15, 0xc2, 0xc2, 0x1b, 0x36, 0x00, 0x01, 0x00, 0x57, 0x05, 0xfa, + 0x02, 0x54, 0x07, 0x17, 0x00, 0x05, 0x00, 0x00, 0x41, 0x15, 0x23, 0x25, 0x35, 0x21, 0x02, 0x54, + 0xa9, 0xfe, 0xac, 0x01, 0x02, 0x06, 0x19, 0x1f, 0xf2, 0x2b, 0x00, 0x01, 0x00, 0x57, 0x05, 0xfa, + 0x02, 0x55, 0x07, 0x17, 0x00, 0x05, 0x00, 0x00, 0x41, 0x05, 0x23, 0x35, 0x37, 0x21, 0x02, 0x55, + 0xfe, 0xac, 0xaa, 0xfc, 0x01, 0x02, 0x06, 0xec, 0xf2, 0x1f, 0xfe, 0x00, 0x00, 0x01, 0xff, 0xe5, + 0x05, 0xfa, 0x02, 0xc6, 0x07, 0x2b, 0x00, 0x09, 0x00, 0x00, 0x43, 0x35, 0x01, 0x33, 0x13, 0x15, + 0x23, 0x27, 0x23, 0x07, 0x1b, 0x01, 0x02, 0xe5, 0xfa, 0x9f, 0xcb, 0x04, 0xd3, 0x05, 0xfa, 0x1d, + 0x01, 0x14, 0xfe, 0xec, 0x1d, 0x97, 0x97, 0x00, 0x00, 0x02, 0x00, 0x0f, 0x05, 0xfa, 0x02, 0x9a, + 0x06, 0xd5, 0x00, 0x03, 0x00, 0x07, 0x00, 0x00, 0x41, 0x15, 0x23, 0x35, 0x21, 0x15, 0x23, 0x35, + 0x02, 0x9a, 0xc5, 0xfe, 0xfc, 0xc2, 0x06, 0xd5, 0xdb, 0xdb, 0xdb, 0xdb, 0x00, 0x01, 0xff, 0xcf, + 0x05, 0xfa, 0x02, 0xdb, 0x07, 0x1f, 0x00, 0x19, 0x00, 0x00, 0x41, 0x22, 0x26, 0x27, 0x26, 0x26, + 0x23, 0x22, 0x06, 0x07, 0x23, 0x36, 0x36, 0x33, 0x32, 0x16, 0x17, 0x16, 0x16, 0x33, 0x32, 0x36, + 0x37, 0x33, 0x06, 0x06, 0x01, 0xfc, 0x2b, 0x59, 0x2c, 0x28, 0x4b, 0x1f, 0x29, 0x2b, 0x0e, 0x89, + 0x0b, 0x75, 0x61, 0x29, 0x58, 0x2a, 0x2b, 0x4c, 0x1f, 0x28, 0x2d, 0x0e, 0x87, 0x07, 0x71, 0x05, + 0xfa, 0x29, 0x17, 0x17, 0x24, 0x2e, 0x4d, 0xa7, 0x7e, 0x26, 0x17, 0x17, 0x27, 0x31, 0x4a, 0x9d, + 0x88, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xca, 0x01, 0x52, 0x00, 0x54, 0x00, 0x60, + 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x2d, 0x00, 0x64, + 0x00, 0xc2, 0x01, 0x12, 0x01, 0x72, 0x01, 0x81, 0x01, 0xa5, 0x01, 0xc8, 0x01, 0xe7, 0x01, 0xff, + 0x02, 0x15, 0x02, 0x22, 0x02, 0x30, 0x02, 0x40, 0x02, 0x70, 0x02, 0x88, 0x02, 0xc1, 0x02, 0xff, + 0x03, 0x26, 0x03, 0x59, 0x03, 0x95, 0x03, 0xb7, 0x03, 0xfe, 0x04, 0x3b, 0x04, 0x51, 0x04, 0x70, + 0x04, 0x85, 0x04, 0x99, 0x04, 0xaf, 0x04, 0xe6, 0x05, 0x6e, 0x05, 0x96, 0x05, 0xcf, 0x06, 0x00, + 0x06, 0x27, 0x06, 0x3f, 0x06, 0x55, 0x06, 0x8a, 0x06, 0xa4, 0x06, 0xb2, 0x06, 0xd2, 0x06, 0xf0, + 0x07, 0x00, 0x07, 0x37, 0x07, 0x57, 0x07, 0x8b, 0x07, 0xb1, 0x07, 0xf4, 0x08, 0x20, 0x08, 0x73, + 0x08, 0x86, 0x08, 0xa9, 0x08, 0xc9, 0x09, 0x08, 0x09, 0x29, 0x09, 0x42, 0x09, 0x59, 0x09, 0x6c, + 0x09, 0x7c, 0x09, 0x8f, 0x09, 0xa5, 0x09, 0xb2, 0x09, 0xc3, 0x0a, 0x11, 0x0a, 0x50, 0x0a, 0x7e, + 0x0a, 0xb9, 0x0a, 0xea, 0x0b, 0x0c, 0x0b, 0x56, 0x0b, 0x80, 0x0b, 0x95, 0x0b, 0xb7, 0x0b, 0xd5, + 0x0b, 0xe3, 0x0c, 0x23, 0x0c, 0x4f, 0x0c, 0x7d, 0x0c, 0xb9, 0x0c, 0xf4, 0x0d, 0x1e, 0x0d, 0x62, + 0x0d, 0x84, 0x0d, 0xae, 0x0d, 0xce, 0x0e, 0x0a, 0x0e, 0x2a, 0x0e, 0x5a, 0x0e, 0x71, 0x0e, 0xa6, + 0x0e, 0xb4, 0x0e, 0xe8, 0x0f, 0x11, 0x0f, 0x1d, 0x0f, 0x29, 0x0f, 0x35, 0x0f, 0x41, 0x0f, 0x4d, + 0x0f, 0x59, 0x0f, 0x65, 0x0f, 0x71, 0x0f, 0x7d, 0x0f, 0x89, 0x0f, 0x95, 0x0f, 0xa1, 0x0f, 0xad, + 0x0f, 0xb9, 0x0f, 0xc5, 0x0f, 0xd1, 0x0f, 0xdd, 0x0f, 0xe9, 0x0f, 0xf4, 0x10, 0x00, 0x10, 0x0b, + 0x10, 0x16, 0x10, 0x22, 0x10, 0x2e, 0x10, 0x3a, 0x10, 0x46, 0x10, 0x52, 0x10, 0x5e, 0x10, 0x6a, + 0x10, 0x76, 0x10, 0x82, 0x10, 0x8e, 0x10, 0xba, 0x10, 0xee, 0x11, 0x27, 0x11, 0x91, 0x11, 0xad, + 0x11, 0xf8, 0x12, 0x5b, 0x12, 0xbe, 0x12, 0xd0, 0x12, 0xe2, 0x13, 0x09, 0x13, 0x4e, 0x13, 0x6c, + 0x13, 0x97, 0x13, 0xca, 0x14, 0x0e, 0x14, 0x34, 0x14, 0x94, 0x14, 0xd4, 0x15, 0x0b, 0x15, 0x21, + 0x15, 0x31, 0x15, 0x55, 0x15, 0x7a, 0x15, 0x86, 0x15, 0x92, 0x15, 0x9e, 0x15, 0xb8, 0x15, 0xc4, + 0x15, 0xd4, 0x15, 0xe0, 0x15, 0xec, 0x15, 0xf8, 0x16, 0x04, 0x16, 0x10, 0x16, 0x1b, 0x16, 0x26, + 0x16, 0x31, 0x16, 0x3c, 0x16, 0x48, 0x16, 0x54, 0x16, 0x60, 0x16, 0x6c, 0x16, 0x78, 0x16, 0x84, + 0x16, 0x92, 0x16, 0xa7, 0x16, 0xd2, 0x16, 0xfe, 0x17, 0x21, 0x17, 0x37, 0x17, 0x68, 0x17, 0xab, + 0x17, 0xb7, 0x17, 0xc3, 0x17, 0xec, 0x18, 0x24, 0x18, 0x45, 0x18, 0x5b, 0x18, 0x8c, 0x18, 0xc4, + 0x18, 0xd4, 0x18, 0xe4, 0x18, 0xf4, 0x19, 0x01, 0x19, 0x0f, 0x19, 0x53, 0x19, 0x77, 0x19, 0x87, + 0x19, 0x98, 0x19, 0xae, 0x19, 0xc0, 0x19, 0xeb, 0x19, 0xeb, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x01, 0x54, 0x7b, 0xaf, 0x62, 0x6c, 0x23, 0x5f, 0x0f, 0x3c, 0xf5, 0x00, 0x03, 0x08, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xd9, 0xf8, 0xd2, 0x19, 0x00, 0x00, 0x00, 0x00, 0xdb, 0x70, 0x08, 0xed, + 0xfb, 0xa6, 0xfc, 0xe3, 0x16, 0x60, 0x08, 0x58, 0x00, 0x01, 0x00, 0x06, 0x00, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0xcd, 0x02, 0x39, 0x00, 0x00, 0x02, 0xaa, 0x00, 0xc1, + 0x03, 0xcb, 0x00, 0x87, 0x04, 0x73, 0x00, 0x23, 0x04, 0x73, 0x00, 0x1b, 0x07, 0x1d, 0x00, 0x33, + 0x05, 0xc7, 0x00, 0x5a, 0x01, 0xe7, 0x00, 0x6d, 0x02, 0xaa, 0x00, 0x66, 0x02, 0xaa, 0x00, 0x02, + 0x03, 0x1d, 0x00, 0x06, 0x04, 0xac, 0x00, 0x56, 0x02, 0x39, 0x00, 0x8b, 0x02, 0xaa, 0x00, 0x50, + 0x02, 0x39, 0x00, 0x8b, 0x02, 0x39, 0x00, 0x14, 0x04, 0x73, 0x00, 0x51, 0x04, 0x73, 0x00, 0x81, + 0x04, 0x73, 0x00, 0x47, 0x04, 0x73, 0x00, 0x2f, 0x04, 0x73, 0x00, 0x1f, 0x04, 0x73, 0x00, 0x3f, + 0x04, 0x73, 0x00, 0x4b, 0x04, 0x73, 0x00, 0x58, 0x04, 0x73, 0x00, 0x41, 0x04, 0x73, 0x00, 0x47, + 0x02, 0xaa, 0x00, 0xc5, 0x02, 0xaa, 0x00, 0xc3, 0x04, 0xac, 0x00, 0x56, 0x04, 0xac, 0x00, 0x55, + 0x04, 0xac, 0x00, 0x56, 0x04, 0xe3, 0x00, 0x5e, 0x07, 0xcd, 0x00, 0x75, 0x05, 0xc7, 0x00, 0x33, + 0x05, 0xc7, 0x00, 0x89, 0x05, 0xc7, 0x00, 0x54, 0x05, 0xc7, 0x00, 0x89, 0x05, 0x56, 0x00, 0x89, + 0x04, 0xe3, 0x00, 0x89, 0x06, 0x39, 0x00, 0x54, 0x05, 0xc7, 0x00, 0x89, 0x02, 0x39, 0x00, 0x89, + 0x04, 0x73, 0x00, 0x1f, 0x05, 0xc7, 0x00, 0x89, 0x04, 0xe3, 0x00, 0x89, 0x06, 0xaa, 0x00, 0x89, + 0x05, 0xc7, 0x00, 0x89, 0x06, 0x39, 0x00, 0x54, 0x05, 0x56, 0x00, 0x89, 0x06, 0x39, 0x00, 0x54, + 0x05, 0xc7, 0x00, 0x89, 0x05, 0x56, 0x00, 0x3b, 0x04, 0xe3, 0x00, 0x17, 0x05, 0xc7, 0x00, 0x7b, + 0x05, 0x56, 0x00, 0x0e, 0x07, 0x8d, 0x00, 0x02, 0x05, 0x56, 0x00, 0x12, 0x05, 0x56, 0x00, 0x23, + 0x04, 0xe3, 0x00, 0x3d, 0x02, 0xaa, 0x00, 0x73, 0x02, 0x39, 0x00, 0x15, 0x02, 0xaa, 0x00, 0x19, + 0x04, 0xac, 0x00, 0x2d, 0x04, 0x73, 0xff, 0xec, 0x02, 0xaa, 0x00, 0x42, 0x04, 0x73, 0x00, 0x3c, + 0x04, 0xe3, 0x00, 0x87, 0x04, 0x73, 0x00, 0x50, 0x04, 0xe3, 0x00, 0x54, 0x04, 0x73, 0x00, 0x50, + 0x02, 0xaa, 0x00, 0x23, 0x04, 0xe3, 0x00, 0x54, 0x04, 0xe3, 0x00, 0x8f, 0x02, 0x39, 0x00, 0x8f, + 0x02, 0x39, 0xff, 0xe0, 0x04, 0x73, 0x00, 0x8f, 0x02, 0x39, 0x00, 0x8f, 0x07, 0x1d, 0x00, 0x87, + 0x04, 0xe3, 0x00, 0x87, 0x04, 0xe3, 0x00, 0x50, 0x04, 0xe3, 0x00, 0x87, 0x04, 0xe3, 0x00, 0x54, + 0x03, 0x1d, 0x00, 0x87, 0x04, 0x73, 0x00, 0x48, 0x02, 0xaa, 0x00, 0x19, 0x04, 0xe3, 0x00, 0x7f, + 0x04, 0x73, 0x00, 0x08, 0x06, 0x39, 0xff, 0xfa, 0x04, 0x73, 0x00, 0x0e, 0x04, 0x73, 0x00, 0x10, + 0x04, 0x00, 0x00, 0x52, 0x03, 0x1d, 0x00, 0x21, 0x02, 0x3d, 0x00, 0x9c, 0x03, 0x1d, 0x00, 0x2b, + 0x04, 0xac, 0x00, 0x51, 0x05, 0xc7, 0x00, 0x33, 0x05, 0xc7, 0x00, 0x33, 0x05, 0xc7, 0x00, 0x54, + 0x05, 0x56, 0x00, 0x89, 0x05, 0xc7, 0x00, 0x89, 0x06, 0x39, 0x00, 0x54, 0x05, 0xc7, 0x00, 0x7b, + 0x04, 0x73, 0x00, 0x34, 0x04, 0x73, 0x00, 0x34, 0x04, 0x73, 0x00, 0x34, 0x04, 0x73, 0x00, 0x34, + 0x04, 0x73, 0x00, 0x34, 0x04, 0x73, 0x00, 0x34, 0x04, 0x73, 0x00, 0x50, 0x04, 0x73, 0x00, 0x50, + 0x04, 0x73, 0x00, 0x50, 0x04, 0x73, 0x00, 0x50, 0x04, 0x73, 0x00, 0x50, 0x02, 0x39, 0x00, 0x72, + 0x02, 0x39, 0xff, 0xc0, 0x02, 0x39, 0xff, 0xad, 0x02, 0x39, 0xff, 0xd8, 0x04, 0xe3, 0x00, 0x87, + 0x04, 0xe3, 0x00, 0x50, 0x04, 0xe3, 0x00, 0x50, 0x04, 0xe3, 0x00, 0x50, 0x04, 0xe3, 0x00, 0x50, + 0x04, 0xe3, 0x00, 0x50, 0x04, 0xe3, 0x00, 0x7f, 0x04, 0xe3, 0x00, 0x7f, 0x04, 0xe3, 0x00, 0x7f, + 0x04, 0xe3, 0x00, 0x7f, 0x03, 0x33, 0x00, 0x5a, 0x04, 0x73, 0x00, 0x33, 0x04, 0x73, 0x00, 0x15, + 0x04, 0x73, 0x00, 0x35, 0x04, 0x73, 0x00, 0x47, 0x04, 0xe3, 0x00, 0x8f, 0x05, 0xe5, 0x00, 0x20, + 0x05, 0xe5, 0x00, 0x20, 0x02, 0xaa, 0x00, 0x57, 0x02, 0xaa, 0x00, 0x10, 0x08, 0x00, 0x00, 0x04, + 0x06, 0x39, 0x00, 0x54, 0x04, 0x64, 0x00, 0x31, 0x04, 0x73, 0x00, 0x08, 0x04, 0xcd, 0x00, 0x86, + 0x02, 0xf6, 0x00, 0x2d, 0x02, 0xec, 0x00, 0x2d, 0x07, 0x1d, 0x00, 0x42, 0x04, 0xe3, 0x00, 0x01, + 0x04, 0xe3, 0x00, 0x72, 0x02, 0xaa, 0x00, 0xc2, 0x04, 0xac, 0x00, 0x54, 0x04, 0x73, 0x00, 0x5c, + 0x04, 0x73, 0x00, 0x5d, 0x05, 0xc7, 0x00, 0x33, 0x05, 0xc7, 0x00, 0x33, 0x06, 0x39, 0x00, 0x54, + 0x04, 0x64, 0x00, 0x31, 0x04, 0x73, 0x00, 0x10, 0x01, 0x56, 0xfe, 0x87, 0x05, 0xc7, 0x00, 0x33, + 0x05, 0x56, 0x00, 0x89, 0x05, 0xc7, 0x00, 0x33, 0x05, 0x56, 0x00, 0x89, 0x05, 0x56, 0x00, 0x89, + 0x02, 0x39, 0x00, 0x68, 0x02, 0x39, 0xff, 0xab, 0x02, 0x39, 0xff, 0xd7, 0x02, 0x39, 0xff, 0xd8, + 0x06, 0x39, 0x00, 0x54, 0x06, 0x39, 0x00, 0x54, 0x06, 0x39, 0x00, 0x54, 0x05, 0xc7, 0x00, 0x7b, + 0x05, 0xc7, 0x00, 0x7b, 0x05, 0xc7, 0x00, 0x7b, 0x02, 0x39, 0x00, 0x91, 0x02, 0xaa, 0x00, 0x00, + 0x02, 0xaa, 0xff, 0xf2, 0x02, 0xaa, 0x00, 0x27, 0x02, 0xaa, 0x00, 0x60, 0x02, 0x3d, 0x00, 0x9c, + 0x05, 0xc7, 0x00, 0x08, 0x04, 0xe3, 0x00, 0x50, 0x05, 0x56, 0x00, 0x23, 0x04, 0x73, 0x00, 0x10, + 0x05, 0x56, 0x00, 0x89, 0x04, 0xe3, 0x00, 0x8f, 0x04, 0xac, 0x00, 0x56, 0x02, 0xaa, 0x00, 0x52, + 0x02, 0xaa, 0x00, 0x33, 0x02, 0xaa, 0x00, 0x2c, 0x06, 0xac, 0x00, 0x5e, 0x06, 0xac, 0x00, 0x5e, + 0x06, 0xac, 0x00, 0x67, 0x04, 0x6b, 0xff, 0xef, 0x02, 0xaa, 0x00, 0x8d, 0x04, 0x73, 0x00, 0x39, + 0x02, 0xaa, 0x00, 0x23, 0x02, 0xaa, 0x00, 0x57, 0x02, 0xaa, 0x00, 0x57, 0x02, 0xaa, 0xff, 0xe5, + 0x02, 0xaa, 0x00, 0x0f, 0x02, 0xaa, 0xff, 0xcf, 0x02, 0x39, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x07, 0x3e, 0xfe, 0x4e, 0x00, 0x43, 0x16, 0xb2, 0xfb, 0xa6, 0xfa, 0x7a, 0x16, 0x60, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xca, + 0x00, 0x04, 0x04, 0xa6, 0x02, 0xbc, 0x00, 0x05, 0x00, 0x00, 0x05, 0x33, 0x04, 0xcd, 0x00, 0x00, + 0x00, 0x9a, 0x05, 0x33, 0x04, 0xcd, 0x00, 0x00, 0x02, 0xcd, 0x00, 0x66, 0x02, 0x12, 0x00, 0x00, + 0x02, 0x0b, 0x06, 0x04, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x4f, 0x4f, 0x47, 0x00, 0xa0, + 0x00, 0x20, 0x00, 0xff, 0x07, 0x3e, 0xfe, 0x4e, 0x00, 0x43, 0x08, 0x58, 0x03, 0x1d, 0x60, 0x00, + 0x01, 0xbf, 0xdf, 0xf7, 0x00, 0x00, 0x04, 0x3a, 0x05, 0x81, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x14, 0x00, 0x03, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x14, 0x00, 0x04, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x06, 0x00, 0x04, 0x00, 0x01, + 0x00, 0x02, 0x00, 0x7e, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x20, 0x00, 0xa0, 0xff, 0xff, + 0xff, 0xe1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xc9, 0x00, 0x94, + 0x00, 0x81, 0x00, 0x82, 0x00, 0xc2, 0x00, 0x8d, 0x00, 0xb2, 0x00, 0x83, 0x00, 0x89, 0x00, 0x87, + 0x00, 0x8f, 0x00, 0x96, 0x00, 0x95, 0x00, 0x0e, 0x00, 0x86, 0x00, 0xc0, 0x00, 0x80, 0x00, 0x8c, + 0x00, 0xbb, 0x00, 0xbc, 0x00, 0x88, 0x00, 0x8e, 0x00, 0x84, 0x00, 0xc1, 0x00, 0xb1, 0x00, 0xba, + 0x00, 0x90, 0x00, 0x97, 0x00, 0xbe, 0x00, 0xbd, 0x00, 0xbf, 0x00, 0x93, 0x00, 0x98, 0x00, 0xa0, + 0x00, 0x9e, 0x00, 0x99, 0x00, 0x60, 0x00, 0x61, 0x00, 0x8a, 0x00, 0x62, 0x00, 0xa2, 0x00, 0x63, + 0x00, 0x9f, 0x00, 0xa1, 0x00, 0xa6, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xb3, 0x00, 0x64, + 0x00, 0xa9, 0x00, 0xa7, 0x00, 0xa8, 0x00, 0x9a, 0x00, 0x65, 0x00, 0xb9, 0x00, 0x8b, 0x00, 0xac, + 0x00, 0xaa, 0x00, 0xab, 0x00, 0x66, 0x00, 0xb5, 0x00, 0xb7, 0x00, 0x85, 0x00, 0x68, 0x00, 0x67, + 0x00, 0x69, 0x00, 0x6b, 0x00, 0x6a, 0x00, 0x6c, 0x00, 0x91, 0x00, 0x6d, 0x00, 0x6f, 0x00, 0x6e, + 0x00, 0x70, 0x00, 0x71, 0x00, 0x73, 0x00, 0x72, 0x00, 0x74, 0x00, 0x75, 0x00, 0xb4, 0x00, 0x76, + 0x00, 0x78, 0x00, 0x77, 0x00, 0x79, 0x00, 0x7b, 0x00, 0x7a, 0x00, 0x9b, 0x00, 0x92, 0x00, 0x7d, + 0x00, 0x7c, 0x00, 0x7e, 0x00, 0x7f, 0x00, 0xb6, 0x00, 0xb8, 0x00, 0x9c, 0xb8, 0x01, 0xff, 0x85, + 0xb0, 0x04, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x8a, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, + 0x00, 0x00, 0x00, 0x9e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x01, 0x00, 0x0a, + 0x00, 0x9e, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x02, 0x00, 0x08, 0x00, 0xa8, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x03, 0x00, 0x28, 0x00, 0xb0, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, + 0x00, 0x04, 0x00, 0x14, 0x00, 0xd8, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x05, 0x00, 0x18, + 0x00, 0xec, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x06, 0x00, 0x14, 0x01, 0x04, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x01, 0x00, 0x00, 0x0c, 0x01, 0x18, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, + 0x01, 0x03, 0x00, 0x08, 0x00, 0xa8, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x01, 0x07, 0x00, 0x0c, + 0x01, 0x24, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x01, 0x08, 0x00, 0x0a, 0x01, 0x30, 0x00, 0x43, + 0x00, 0x6f, 0x00, 0x70, 0x00, 0x79, 0x00, 0x72, 0x00, 0x69, 0x00, 0x67, 0x00, 0x68, 0x00, 0x74, + 0x00, 0x20, 0x00, 0x32, 0x00, 0x30, 0x00, 0x32, 0x00, 0x30, 0x00, 0x20, 0x00, 0x54, 0x00, 0x68, + 0x00, 0x65, 0x00, 0x20, 0x00, 0x41, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6d, 0x00, 0x6f, 0x00, 0x20, + 0x00, 0x50, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x6a, 0x00, 0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x20, + 0x00, 0x41, 0x00, 0x75, 0x00, 0x74, 0x00, 0x68, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x73, 0x00, 0x20, + 0x00, 0x28, 0x00, 0x68, 0x00, 0x74, 0x00, 0x74, 0x00, 0x70, 0x00, 0x73, 0x00, 0x3a, 0x00, 0x2f, + 0x00, 0x2f, 0x00, 0x67, 0x00, 0x69, 0x00, 0x74, 0x00, 0x68, 0x00, 0x75, 0x00, 0x62, 0x00, 0x2e, + 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x2f, 0x00, 0x67, 0x00, 0x6f, 0x00, 0x6f, 0x00, 0x67, + 0x00, 0x6c, 0x00, 0x65, 0x00, 0x66, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x73, 0x00, 0x2f, + 0x00, 0x61, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6d, 0x00, 0x6f, 0x00, 0x29, 0x00, 0x41, 0x00, 0x72, + 0x00, 0x69, 0x00, 0x6d, 0x00, 0x6f, 0x00, 0x42, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x64, 0x00, 0x31, + 0x00, 0x2e, 0x00, 0x33, 0x00, 0x33, 0x00, 0x3b, 0x00, 0x47, 0x00, 0x4f, 0x00, 0x4f, 0x00, 0x47, + 0x00, 0x3b, 0x00, 0x41, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6d, 0x00, 0x6f, 0x00, 0x2d, 0x00, 0x42, + 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x64, 0x00, 0x41, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6d, 0x00, 0x6f, + 0x00, 0x20, 0x00, 0x42, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x64, 0x00, 0x56, 0x00, 0x65, 0x00, 0x72, + 0x00, 0x73, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x31, 0x00, 0x2e, 0x00, 0x33, + 0x00, 0x33, 0x00, 0x41, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6d, 0x00, 0x6f, 0x00, 0x2d, 0x00, 0x42, + 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x64, 0x00, 0x57, 0x00, 0x65, 0x00, 0x69, 0x00, 0x67, 0x00, 0x68, + 0x00, 0x74, 0x00, 0x49, 0x00, 0x74, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x69, 0x00, 0x63, 0x00, 0x52, + 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0x27, 0x00, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0xff, 0xff, 0x00, 0x0f, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x9a, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x46, + 0x00, 0x62, 0x00, 0x03, 0x63, 0x79, 0x72, 0x6c, 0x00, 0x14, 0x67, 0x72, 0x65, 0x6b, 0x00, 0x1e, + 0x6c, 0x61, 0x74, 0x6e, 0x00, 0x22, 0x00, 0x18, 0x00, 0x01, 0x53, 0x52, 0x42, 0x20, 0x00, 0x20, + 0x00, 0x0e, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x01, 0x4d, 0x41, 0x48, 0x20, 0x00, 0x12, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0xff, 0xff, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, + 0x6b, 0x65, 0x72, 0x6e, 0x00, 0x0e, 0x6b, 0x65, 0x72, 0x6e, 0x00, 0x16, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x02, + 0x00, 0x08, 0x00, 0x01, 0x00, 0x08, 0x00, 0x01, 0x00, 0x2a, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, + 0x00, 0x4e, 0x00, 0x5c, 0x00, 0x62, 0x00, 0x84, 0x00, 0x92, 0x00, 0xac, 0x00, 0xbe, 0x00, 0xd0, + 0x01, 0x1a, 0x01, 0x50, 0x01, 0x86, 0x01, 0xc4, 0x01, 0xca, 0x01, 0xde, 0x01, 0xd4, 0x01, 0xde, + 0x00, 0x01, 0x00, 0x10, 0x00, 0x01, 0x00, 0x12, 0x00, 0x22, 0x00, 0x27, 0x00, 0x2d, 0x00, 0x31, + 0x00, 0x33, 0x00, 0x35, 0x00, 0x37, 0x00, 0x38, 0x00, 0x3a, 0x00, 0x47, 0x00, 0x53, 0x00, 0x57, + 0x00, 0x58, 0x00, 0x5a, 0x00, 0x03, 0x00, 0x22, 0xff, 0xb4, 0x00, 0x35, 0x00, 0x00, 0x00, 0x3a, + 0xff, 0xdb, 0x00, 0x01, 0x00, 0x12, 0xff, 0x8f, 0x00, 0x08, 0x00, 0x01, 0xff, 0xb4, 0x00, 0x35, + 0xff, 0x68, 0x00, 0x37, 0xff, 0x68, 0x00, 0x38, 0xff, 0x8f, 0x00, 0x3a, 0xff, 0x44, 0x00, 0x57, + 0xff, 0xb4, 0x00, 0x58, 0xff, 0xdb, 0x00, 0x5a, 0xff, 0xb4, 0x00, 0x03, 0x00, 0x0d, 0xff, 0x1d, + 0x00, 0x0f, 0xff, 0x1d, 0x00, 0x22, 0xff, 0x8f, 0x00, 0x06, 0x00, 0x01, 0xff, 0xdb, 0x00, 0x35, + 0xff, 0x68, 0x00, 0x37, 0xff, 0x68, 0x00, 0x38, 0xff, 0x8f, 0x00, 0x3a, 0xff, 0x44, 0x00, 0x5a, + 0xff, 0xb4, 0x00, 0x04, 0x00, 0x01, 0xff, 0xdb, 0x00, 0x0d, 0xfe, 0xf8, 0x00, 0x0f, 0xfe, 0xf8, + 0x00, 0x22, 0xff, 0x68, 0x00, 0x04, 0x00, 0x35, 0x00, 0x00, 0x00, 0x37, 0xff, 0xdb, 0x00, 0x38, + 0xff, 0xdb, 0x00, 0x3a, 0xff, 0xb4, 0x00, 0x12, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0d, 0xff, 0x1d, + 0x00, 0x0e, 0xff, 0x8f, 0x00, 0x0f, 0xff, 0x1d, 0x00, 0x1b, 0xff, 0x1d, 0x00, 0x1c, 0xff, 0x1d, + 0x00, 0x22, 0xff, 0x68, 0x00, 0x30, 0xff, 0xdb, 0x00, 0x42, 0xff, 0x68, 0x00, 0x44, 0xff, 0x68, + 0x00, 0x46, 0xff, 0x68, 0x00, 0x4a, 0xff, 0xdb, 0x00, 0x50, 0xff, 0x68, 0x00, 0x53, 0xff, 0x8f, + 0x00, 0x54, 0xff, 0x68, 0x00, 0x56, 0xff, 0x68, 0x00, 0x58, 0xff, 0x68, 0x00, 0x5a, 0xff, 0x68, + 0x00, 0x0d, 0x00, 0x0d, 0xff, 0x44, 0x00, 0x0e, 0xff, 0x8f, 0x00, 0x0f, 0xff, 0x44, 0x00, 0x1b, + 0xff, 0x8f, 0x00, 0x1c, 0xff, 0x8f, 0x00, 0x22, 0xff, 0x68, 0x00, 0x42, 0xff, 0x8f, 0x00, 0x46, + 0xff, 0x8f, 0x00, 0x4a, 0xff, 0xdb, 0x00, 0x50, 0xff, 0x68, 0x00, 0x53, 0xff, 0x8f, 0x00, 0x56, + 0xff, 0xb4, 0x00, 0x5a, 0xff, 0xb4, 0x00, 0x0d, 0x00, 0x0d, 0xff, 0x8f, 0x00, 0x0e, 0xff, 0xd7, + 0x00, 0x0f, 0xff, 0x8f, 0x00, 0x1b, 0xff, 0xdb, 0x00, 0x1c, 0xff, 0xdb, 0x00, 0x22, 0xff, 0x8f, + 0x00, 0x42, 0xff, 0xb4, 0x00, 0x46, 0xff, 0xdb, 0x00, 0x4a, 0xff, 0xee, 0x00, 0x50, 0xff, 0xdb, + 0x00, 0x53, 0xff, 0xdb, 0x00, 0x56, 0xff, 0xdb, 0x00, 0x5a, 0xff, 0xdb, 0x00, 0x0f, 0x00, 0x01, + 0xff, 0xdb, 0x00, 0x0d, 0xff, 0x1d, 0x00, 0x0e, 0xff, 0x8f, 0x00, 0x0f, 0xff, 0x1d, 0x00, 0x1b, + 0xff, 0x68, 0x00, 0x1c, 0xff, 0x68, 0x00, 0x22, 0xff, 0x44, 0x00, 0x42, 0xff, 0x8f, 0x00, 0x46, + 0xff, 0x8f, 0x00, 0x4a, 0xff, 0xb4, 0x00, 0x50, 0xff, 0x68, 0x00, 0x51, 0xff, 0x8f, 0x00, 0x52, + 0xff, 0x68, 0x00, 0x56, 0xff, 0x8f, 0x00, 0x57, 0xff, 0x8f, 0x00, 0x01, 0x00, 0x47, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x0d, 0xff, 0x8f, 0x00, 0x0f, 0xff, 0x8f, 0x00, 0x02, 0x00, 0x0d, 0xff, 0xb4, + 0x00, 0x0f, 0xff, 0xb4, 0x00, 0x02, 0x00, 0x0d, 0xff, 0x68, 0x00, 0x0f, 0xff, 0x68, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x28, 0x00, 0x2a, 0x00, 0x04, 0x63, 0x79, 0x72, 0x6c, + 0x00, 0x1a, 0x67, 0x72, 0x65, 0x6b, 0x00, 0x1a, 0x68, 0x65, 0x62, 0x72, 0x00, 0x1a, 0x6c, 0x61, + 0x74, 0x6e, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, + 0x00, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x02, 0x00, 0x00, 0x00, 0x24, 0x00, 0x02, + 0x77, 0x67, 0x68, 0x74, 0x01, 0x00, 0x00, 0x00, 0x69, 0x74, 0x61, 0x6c, 0x01, 0x07, 0x00, 0x01, + 0x00, 0x04, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x02, 0xbc, 0x00, 0x00, + 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00 +}; + +/* vim: set ts=4 sw=4 et : */ +#endif /* Z_NORMAL_BOLD_TTF_H */ diff --git a/backend/gif.c b/backend/gif.c index 4f89285c..7dd70e70 100644 --- a/backend/gif.c +++ b/backend/gif.c @@ -1,7 +1,7 @@ /* gif.c - Handles output to gif file */ /* libzint - the open source barcode library - Copyright (C) 2009-2025 Robin Stuart + Copyright (C) 2009-2026 Robin Stuart Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -241,7 +241,7 @@ static void gif_lzw(struct gif_state *pState, unsigned char paletteBitSize) { INTERNAL int zint_gif_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf) { struct filemem fm; unsigned char outbuf[10]; - unsigned char paletteRGB[10][3]; + unsigned char paletteRGB[256][3]; int paletteCount, i; unsigned char paletteBitSize; int paletteSize; @@ -254,6 +254,7 @@ INTERNAL int zint_gif_pixel_plot(struct zint_symbol *symbol, unsigned char *pixe unsigned char RGBbg[3]; unsigned char fgalpha; unsigned char bgalpha; + const int grayscale = zint_out_grayscale(symbol); const size_t bitmapSize = (size_t) symbol->bitmap_height * symbol->bitmap_width; @@ -336,6 +337,19 @@ INTERNAL int zint_gif_pixel_plot(struct zint_symbol *symbol, unsigned char *pixe paletteBitSize = 4; } } + } else if (grayscale) { + const int diff_red = RGBfg[0] - RGBbg[0]; + const int diff_green = RGBfg[1] - RGBbg[1]; + const int diff_blue = RGBfg[2] - RGBbg[2]; + for (paletteCount = 0; paletteCount <= 0xFF; paletteCount++) { + paletteRGB[paletteCount][0] = RGBbg[0] + (diff_red * paletteCount) / 0xFF; + paletteRGB[paletteCount][1] = RGBbg[1] + (diff_green * paletteCount) / 0xFF; + paletteRGB[paletteCount][2] = RGBbg[2] + (diff_blue * paletteCount) / 0xFF; + State.map[paletteCount] = paletteCount; + } + bgindex = 0; + fgindex = 0xFF; + paletteBitSize = 8; } else { State.map['0'] = (unsigned char) (bgindex = 0); memcpy(paletteRGB[bgindex], RGBbg, 3); diff --git a/backend/gs1.c b/backend/gs1.c index 1c0f27d7..7d32f021 100644 --- a/backend/gs1.c +++ b/backend/gs1.c @@ -1921,16 +1921,22 @@ static int gs1_hrt_conv_parsed(struct zint_symbol *symbol, const unsigned char s int i, j; int warn_number = 0; const int text_size = ARRAY_SIZE(symbol->text); + const int gs1_newline = symbol->show_hrt & ZINT_HRT_GS1_NEWLINE; + int first_ai = 1; + #ifdef NDEBUG (void)length; #endif for (i = 0, j = 0; i < ai_count && j < text_size; i++) { const int ai_len = 2 + (ai_vals[i] >= 100) + (ai_vals[i] >= 1000); - if (j + 1 + ai_len + 1 + data_lens[i] >= text_size) { + if (j + 1 + ai_len + 1 + data_lens[i] + (!first_ai && gs1_newline) >= text_size) { warn_number = ZINT_WARN_HRT_TRUNCATED; break; } + if (!first_ai && gs1_newline) { + symbol->text[j++] = '\n'; + } symbol->text[j++] = '('; memcpy(symbol->text + j, source + ai_locs[i], ai_len); j += ai_len; @@ -1938,11 +1944,12 @@ static int gs1_hrt_conv_parsed(struct zint_symbol *symbol, const unsigned char s assert(data_locs[i] + data_lens[i] <= length); memcpy(symbol->text + j, source + data_locs[i], data_lens[i]); j += data_lens[i]; + first_ai = 0; } - if (j == text_size) { + if (j >= text_size) { warn_number = ZINT_WARN_HRT_TRUNCATED; - j--; + j = text_size - 1; } symbol->text_length = j; symbol->text[j] = '\0'; @@ -1966,16 +1973,50 @@ INTERNAL int zint_test_gs1_hrt_conv_parsed(struct zint_symbol *symbol, const uns /* Helper to set HRT when have GS1PARENS_MODE - truncates if too long for HRT buffer */ static int gs1_hrt_cpy(struct zint_symbol *symbol, const unsigned char source[], const int length, const int no_errtxt) { - int warn_number; + int warn_number = 0; const int text_size = ARRAY_SIZE(symbol->text); + const int gs1_newline = symbol->show_hrt & ZINT_HRT_GS1_NEWLINE; assert(symbol->input_mode & GS1PARENS_MODE); assert(source[0] == '('); - if (length < text_size) { + if (gs1_newline) { + int i, j = 1, last_opening_bracket = 0; + assert(source[0] == '('); + symbol->text[0] = '('; + for (i = 1; i < length && j < text_size; i++) { + if (source[i] == '\\' && i + 1 < length && (source[i + 1] == '\\' || source[i + 1] == '(')) { + if (j + 1 >= text_size) { + break; + } + symbol->text[j++] = source[i++]; + } else if (source[i] == '(') { + if (j + 1 >= text_size) { + break; + } + last_opening_bracket = j; + symbol->text[j++] = '\n'; + } + symbol->text[j++] = source[i]; + } + if (i < length || j >= text_size) { + if (j < text_size && source[i] == '(') { + /* Finished at end of AI data */ + symbol->text_length = j; + symbol->text[j] = '\0'; + } else { + /* Use last full AI + data */ + symbol->text_length = last_opening_bracket; + symbol->text[last_opening_bracket] = '\0'; + } + warn_number = ZINT_WARN_HRT_TRUNCATED; + } else { + symbol->text_length = j; + symbol->text[j] = '\0'; + } + } else if (length < text_size) { memcpy(symbol->text, source, length + 1); /* Include terminating NUL */ symbol->text_length = length; - warn_number = 0; } else { /* Find last full AI - need to scan forward to track escaped opening parens */ int i, last_opening_bracket = 0; @@ -1998,9 +2039,9 @@ static int gs1_hrt_cpy(struct zint_symbol *symbol, const unsigned char source[], symbol->text[last_opening_bracket] = '\0'; } warn_number = ZINT_WARN_HRT_TRUNCATED; - if (!no_errtxt) { - z_errtxt(0, symbol, 801, "Human Readable Text truncated"); - } + } + if (warn_number && !no_errtxt) { + z_errtxt(0, symbol, 801, "Human Readable Text truncated"); } return warn_number; } @@ -2016,37 +2057,48 @@ INTERNAL int zint_test_gs1_hrt_cpy(struct zint_symbol *symbol, const unsigned ch & truncates if too long for HRT buffer */ static int gs1_hrt_conv_brackets(struct zint_symbol *symbol, const unsigned char source[], const int length, const int no_errtxt) { - int i; + int i, j; int warn_number = 0; int bracket_level = 0; /* Non-compliant closing square brackets may be in text */ int last_opening_bracket = 0; const int text_size = ARRAY_SIZE(symbol->text); const int max_len = length > text_size ? text_size : length; + const int gs1_newline = symbol->show_hrt & ZINT_HRT_GS1_NEWLINE; + int first_ai = 1; assert((symbol->input_mode & GS1PARENS_MODE) == 0); assert(source[0] == '['); - for (i = 0; i < max_len; i++) { + for (i = 0, j = 0; i < max_len && j < text_size; i++) { if (source[i] == '[') { - symbol->text[i] = '('; + const int do_gs1_newline = !first_ai && gs1_newline; + if (j + 1 + do_gs1_newline >= text_size) { + warn_number = ZINT_WARN_HRT_TRUNCATED; + break; + } + if (do_gs1_newline) { + symbol->text[j++] = '\n'; + } + symbol->text[j++] = '('; bracket_level++; - last_opening_bracket = i; + last_opening_bracket = j - (1 + do_gs1_newline); } else if (source[i] == ']' && bracket_level) { - symbol->text[i] = ')'; + symbol->text[j++] = ')'; bracket_level--; } else { - symbol->text[i] = source[i]; + symbol->text[j++] = source[i]; } + first_ai = 0; } - if (i == text_size) { - i--; + if (j == text_size) { + j--; if (source[i] != '[') { - i = last_opening_bracket; + j = last_opening_bracket; } warn_number = ZINT_WARN_HRT_TRUNCATED; } - symbol->text_length = i; - symbol->text[i] = '\0'; + symbol->text_length = j; + symbol->text[j] = '\0'; if (warn_number && !no_errtxt) { z_errtxt(0, symbol, 798, "Human Readable Text truncated"); diff --git a/backend/imail.c b/backend/imail.c index 4b933073..c823a15d 100644 --- a/backend/imail.c +++ b/backend/imail.c @@ -449,6 +449,10 @@ INTERNAL int zint_usps_imail(struct zint_symbol *symbol, unsigned char source[], symbol->rows = 3; symbol->width = read - 1; + if ((symbol->show_hrt & 0x7) >= ZINT_HRT_LINEAR_ALL) { + z_hrt_cpy_nochk(symbol, source, length); + } + if (content_segs && z_ct_cpy(symbol, source, length)) { return ZINT_ERROR_MEMORY; /* `z_ct_cpy()` only fails with OOM */ } diff --git a/backend/library.c b/backend/library.c index 9ec0c305..f1f4a2b9 100644 --- a/backend/library.c +++ b/backend/library.c @@ -66,7 +66,7 @@ static void set_symbol_defaults(struct zint_symbol *symbol) { memcpy(symbol->outfile, "out.png", 8); #endif symbol->option_1 = -1; - symbol->show_hrt = 1; /* Show human readable text */ + symbol->show_hrt = ZINT_HRT_DEFAULT; /* Show human readable text (HRT) for most linear barcodes */ symbol->input_mode = DATA_MODE; /* symbol->eci = 0; Default 0 uses ECI 3 */ symbol->dot_size = 0.8f; /* 0.4 / 0.5 */ @@ -988,13 +988,21 @@ int ZBarcode_Encode_Segs(struct zint_symbol *symbol, const struct zint_seg segs[ return error_tag(ZINT_ERROR_INVALID_DATA, symbol, 771, "Too many input segments (maximum 256)"); } - if ((symbol->input_mode & 0x07) > 2) { + if ((symbol->input_mode & 0x07) > GS1_MODE) { symbol->input_mode = DATA_MODE; /* Reset completely */ warn_number = error_tag(ZINT_WARN_INVALID_OPTION, symbol, 212, "Invalid input mode - reset to DATA_MODE"); if (warn_number >= ZINT_ERROR) { return warn_number; } } + if ((symbol->show_hrt & 0x7) > ZINT_HRT_ALL) { + symbol->show_hrt = ZINT_HRT_DEFAULT; /* Reset completely */ + warn_number = error_tag(ZINT_WARN_INVALID_OPTION, symbol, 210, + "Invalid show HRT - reset to ZINT_HRT_DEFAULT"); + if (warn_number >= ZINT_ERROR) { + return warn_number; + } + } /* Check the symbology field */ if (!ZBarcode_ValidID(symbol->symbology)) { @@ -1069,8 +1077,8 @@ int ZBarcode_Encode_Segs(struct zint_symbol *symbol, const struct zint_seg segs[ " output_options: 0x%X, fg: \"%s\", bg: \"%s\"\n" " outfile: \"%s\"\n" " primary (%d): \"%s\"\n" - " option_1/2/3: (%d, %d, %d), show_hrt: %d, input_mode: 0x%X, ECI: %d, dpmm: %g" - ", dot_size: %g\n" + " option_1/2/3: (%d, %d, %d), show_hrt: 0x%X, input_mode: 0x%X, ECI: %d" + ", dpmm: %g, dot_size: %g\n" " text_gap: %g, guard_descent: %g, structapp index/count/id: (%d, %d, \"%s\")" ", warn_level: %d, seg_count %d\n" " %ssource%s (%d): \"%s\"\n", @@ -1130,6 +1138,12 @@ int ZBarcode_Encode_Segs(struct zint_symbol *symbol, const struct zint_seg segs[ if (symbol->scale < 0.01f || symbol->scale > 200.0f) { return error_tag(ZINT_ERROR_INVALID_OPTION, symbol, 227, "Scale out of range (0.01 to 200)"); } + if (symbol->show_hrt & 0xFF0000) { + const int hrt_font_height = (symbol->show_hrt >> 16) & 0xFF; + if (hrt_font_height < 10 || hrt_font_height > 200) { + return error_tag(ZINT_ERROR_INVALID_OPTION, symbol, 764, "Font height out of range (10 to 200) "); + } + } if (symbol->dot_size < 0.01f || symbol->dot_size > 20.0f) { return error_tag(ZINT_ERROR_INVALID_OPTION, symbol, 221, "Dot size out of range (0.01 to 20)"); } diff --git a/backend/mailmark.c b/backend/mailmark.c index b6cb420d..453f4cc2 100644 --- a/backend/mailmark.c +++ b/backend/mailmark.c @@ -501,6 +501,10 @@ INTERNAL int zint_mailmark_4s(struct zint_symbol *symbol, unsigned char source[] symbol->rows = 3; symbol->width = j - 1; + if ((symbol->show_hrt & 0x7) >= ZINT_HRT_LINEAR_ALL) { + z_hrt_cpy_nochk(symbol, local_source, length); + } + if (content_segs && z_ct_cpy(symbol, local_source, length)) { return ZINT_ERROR_MEMORY; /* `z_ct_cpy()` only fails with OOM */ } @@ -662,6 +666,10 @@ INTERNAL int zint_mailmark_2d(struct zint_symbol *symbol, unsigned char source[] segs[0].source = local_source; segs[0].length = length; + if ((symbol->show_hrt & 0x7) >= ZINT_HRT_ALL) { + (void) z_hrt_cpy_iso8859_1(symbol, local_source, length); + } + if (content_segs) { if ((symbol->input_mode & 0x07) == DATA_MODE) { if (z_ct_cpy(symbol, local_source, length)) { diff --git a/backend/medical.c b/backend/medical.c index 9a8764d7..f69e60a3 100644 --- a/backend/medical.c +++ b/backend/medical.c @@ -99,6 +99,10 @@ INTERNAL int zint_pharma(struct zint_symbol *symbol, unsigned char source[], int (void) z_set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/); } + if ((symbol->show_hrt & 0x7) >= ZINT_HRT_LINEAR_ALL) { + z_hrt_cpy_nochk(symbol, source, length); + } + if (content_segs && z_ct_cpy(symbol, source, length)) { return ZINT_ERROR_MEMORY; /* `z_ct_cpy()` only fails with OOM */ } @@ -190,6 +194,10 @@ INTERNAL int zint_pharma_two(struct zint_symbol *symbol, unsigned char source[], (void) z_set_height(symbol, 0.0f, 10.0f, 0.0f, 1 /*no_errtxt*/); } + if ((symbol->show_hrt & 0x7) >= ZINT_HRT_LINEAR_ALL) { + z_hrt_cpy_nochk(symbol, source, length); + } + if (content_segs && z_ct_cpy(symbol, source, length)) { return ZINT_ERROR_MEMORY; /* `z_ct_cpy()` only fails with OOM */ } diff --git a/backend/output.c b/backend/output.c index c7fdf975..2368548a 100644 --- a/backend/output.c +++ b/backend/output.c @@ -760,8 +760,8 @@ INTERNAL int zint_out_process_upcean(const struct zint_symbol *symbol, const int /* Isolate add-on text */ for (i = 6; i < symbol->text_length && j < 5; i++) { if (latch == 1) { - /* Use dummy space-filled add-on if no hrt */ - addon[j] = symbol->show_hrt ? symbol->text[i] : ' '; + /* Use dummy space-filled add-on if no HRT */ + addon[j] = (symbol->show_hrt & 0x7) ? symbol->text[i] : ' '; j++; } else if (symbol->text[i] == '+') { latch = 1; @@ -786,29 +786,29 @@ INTERNAL int zint_out_process_upcean(const struct zint_symbol *symbol, const int case 16: /* EAN-13 + EAN-2 */ case 19: /* EAN-13 + EAN-5 */ main_width = 95 + comp_xoffset; /* EAN-13 main symbol 95 modules wide */ - upceanflag = 13; + upceanflag = OUT_UPCEANFLAG_EAN13; break; case 2: /* EAN-2 can't have add-on or be composite */ - upceanflag = 2; + upceanflag = OUT_UPCEANFLAG_EAN2; break; case 5: /* EAN-5 can't have add-on or be composite */ - upceanflag = 5; + upceanflag = OUT_UPCEANFLAG_EAN5; break; default: main_width = 68 + comp_xoffset; /* EAN-8 main symbol 68 modules wide */ - upceanflag = 8; + upceanflag = OUT_UPCEANFLAG_EAN8; break; } } else if (symbol->symbology == BARCODE_UPCA || symbol->symbology == BARCODE_UPCA_CHK || symbol->symbology == BARCODE_UPCA_CC) { main_width = 95 + comp_xoffset; /* UPC-A main symbol 95 modules wide */ - upceanflag = 12; + upceanflag = OUT_UPCEANFLAG_UPCA; } else if (symbol->symbology == BARCODE_UPCE || symbol->symbology == BARCODE_UPCE_CHK || symbol->symbology == BARCODE_UPCE_CC) { main_width = 51 + comp_xoffset; /* UPC-E main symbol 51 modules wide */ - upceanflag = 6; + upceanflag = OUT_UPCEANFLAG_UPCE; } *p_main_width = main_width; @@ -890,6 +890,13 @@ INTERNAL float zint_out_large_bar_height(struct zint_symbol *symbol, const int s return large_bar_height; } +/* Whether output will be in 8-bit grayscale or not */ +INTERNAL int zint_out_grayscale(const struct zint_symbol *symbol) { + const int hide_text = !(symbol->show_hrt & 0x7) || symbol->text[0] == '\0'; + + return !hide_text && (symbol->show_hrt & ZINT_HRT_GRAYSCALE); +} + #ifdef _WIN32 /* Convert UTF-8 to Windows wide chars. Ticket #288, props Marcel */ /* Note if change this, change versions in "frontend/main.c" and "backend/tests/testcommon.c" also */ diff --git a/backend/output.h b/backend/output.h index 59153f02..a9f4c094 100644 --- a/backend/output.h +++ b/backend/output.h @@ -39,6 +39,19 @@ extern "C" { #include /* For FILE */ +/* EAN/UPC types */ +#define OUT_UPCEANFLAG_EAN2 2 +#define OUT_UPCEANFLAG_EAN5 5 +#define OUT_UPCEANFLAG_UPCE 6 +#define OUT_UPCEANFLAG_EAN8 8 +#define OUT_UPCEANFLAG_UPCA 12 +#define OUT_UPCEANFLAG_EAN13 13 + +/* Alignment flags `textflags` */ +#define OUT_HALIGN_CENTRE 0 +#define OUT_HALIGN_LEFT 1 +#define OUT_HALIGN_RIGHT 2 + /* Check colour options are good (`symbol->fgcolour`, `symbol->bgcolour`) */ INTERNAL int zint_out_check_colour_options(struct zint_symbol *symbol); @@ -70,6 +83,9 @@ INTERNAL int zint_out_process_upcean(const struct zint_symbol *symbol, const int INTERNAL float zint_out_large_bar_height(struct zint_symbol *symbol, const int si, int *row_heights_si, int *symbol_height_si); +/* Whether output will be in 8-bit grayscale or not */ +INTERNAL int zint_out_grayscale(const struct zint_symbol *symbol); + /* Create output file, creating sub-directories if necessary. Returns `fopen()` FILE pointer */ INTERNAL FILE *zint_out_fopen(char filename[256], const char *mode); diff --git a/backend/pcx.c b/backend/pcx.c index c30b529b..b3a6e559 100644 --- a/backend/pcx.c +++ b/backend/pcx.c @@ -41,6 +41,7 @@ /* ZSoft PCX File Format Technical Reference Manual http://bespin.org/~qz/pc-gpe/pcx.txt */ INTERNAL int zint_pcx_pixel_plot(struct zint_symbol *symbol, const unsigned char *pixelbuf) { unsigned char fgred, fggrn, fgblu, fgalpha, bgred, bggrn, bgblu, bgalpha; + int diff_red, diff_grn, diff_blu; int row, column, i, colour; int run_count; struct filemem fm; @@ -49,12 +50,16 @@ INTERNAL int zint_pcx_pixel_plot(struct zint_symbol *symbol, const unsigned char unsigned char previous; const unsigned char *pb; const int bytes_per_line = symbol->bitmap_width + (symbol->bitmap_width & 1); /* Must be even */ + const int grayscale = zint_out_grayscale(symbol); unsigned char *rle_row = (unsigned char *) z_alloca(bytes_per_line); rle_row[bytes_per_line - 1] = 0; /* Will remain zero if bitmap_width odd */ (void) zint_out_colour_get_rgb(symbol->fgcolour, &fgred, &fggrn, &fgblu, &fgalpha); (void) zint_out_colour_get_rgb(symbol->bgcolour, &bgred, &bggrn, &bgblu, &bgalpha); + diff_red = fgred - bgred; + diff_grn = fggrn - bggrn; + diff_blu = fgblu - bgblu; header.manufacturer = 10; /* ZSoft */ header.version = 5; /* Version 3.0 */ @@ -98,21 +103,27 @@ INTERNAL int zint_pcx_pixel_plot(struct zint_symbol *symbol, const unsigned char const unsigned char ch = pb[column]; switch (colour) { case 0: - if (ch == '0' || ch == '1') { + if (grayscale) { + rle_row[column] = bgred + (diff_red * ch) / 0xFF; + } else if (ch == '0' || ch == '1') { rle_row[column] = ch != '0' ? fgred : bgred; } else { zint_out_colour_char_to_rgb(ch, &rle_row[column], NULL, NULL); } break; case 1: - if (ch == '0' || ch == '1') { + if (grayscale) { + rle_row[column] = bggrn + (diff_grn * ch) / 0xFF; + } else if (ch == '0' || ch == '1') { rle_row[column] = ch != '0' ? fggrn : bggrn; } else { zint_out_colour_char_to_rgb(ch, NULL, &rle_row[column], NULL); } break; case 2: - if (ch == '0' || ch == '1') { + if (grayscale) { + rle_row[column] = bgblu + (diff_blu * ch) / 0xFF; + } else if (ch == '0' || ch == '1') { rle_row[column] = ch != '0' ? fgblu : bgblu; } else { zint_out_colour_char_to_rgb(ch, NULL, NULL, &rle_row[column]); diff --git a/backend/png.c b/backend/png.c index 8c020274..ac8da526 100644 --- a/backend/png.c +++ b/backend/png.c @@ -108,13 +108,14 @@ INTERNAL int zint_png_pixel_plot(struct zint_symbol *symbol, const unsigned char png_color bg, fg; unsigned char bg_alpha, fg_alpha; unsigned char map[128]; - png_color palette[32]; + png_color palette[256]; int num_palette; - unsigned char trans_alpha[32]; + unsigned char trans_alpha[256]; int num_trans; /* Note initialize below to avoid gcc -Wclobbered warning due to `longjmp()` */ int bit_depth; int compression_strategy; const unsigned char *pb; + const int grayscale = zint_out_grayscale(symbol); unsigned char *outdata = (unsigned char *) z_alloca(symbol->bitmap_width); zpng_error.symbol = symbol; @@ -176,6 +177,25 @@ INTERNAL int zint_png_pixel_plot(struct zint_symbol *symbol, const unsigned char } } } + } else if (grayscale) { + const int diff_red = fg.red - bg.red; + const int diff_green = fg.green - bg.green; + const int diff_blue = fg.blue - bg.blue; + for (num_palette = 0; num_palette <= 0xFF; num_palette++) { + png_color color; + color.red = bg.red + (diff_red * num_palette) / 0xFF; + color.green = bg.green + (diff_green * num_palette) / 0xFF; + color.blue = bg.blue + (diff_blue * num_palette) / 0xFF; + palette[num_palette] = color; + } + if (bg_alpha != 0xFF || fg_alpha != 0xFF) { + trans_alpha[num_trans++] = bg_alpha; + if (fg_alpha != 0xFF) { + for (; num_trans <= 0xFF; num_trans++) { + trans_alpha[num_trans] = fg_alpha; + } + } + } } else { int bg_idx = 0, fg_idx = 1; /* Do alphas first so can swop indexes if background not alpha */ @@ -200,8 +220,10 @@ INTERNAL int zint_png_pixel_plot(struct zint_symbol *symbol, const unsigned char if (num_palette <= 2) { bit_depth = 1; - } else { + } else if (num_palette <= 16) { bit_depth = 4; + } else { + bit_depth = 8; } /* Open output file in binary mode */ @@ -280,7 +302,7 @@ INTERNAL int zint_png_pixel_plot(struct zint_symbol *symbol, const unsigned char /* write row contents to file */ png_write_row(png_ptr, outdata); } - } else { /* Bit depth 4 */ + } else if (bit_depth == 4) { for (row = 0; row < symbol->bitmap_height; row++) { if (row && memcmp(pb, pb - symbol->bitmap_width, symbol->bitmap_width) == 0) { pb += symbol->bitmap_width; @@ -303,6 +325,12 @@ INTERNAL int zint_png_pixel_plot(struct zint_symbol *symbol, const unsigned char } #endif } + } else { /* Bit depth 8 */ + for (row = 0; row < symbol->bitmap_height; row++) { + /* write row contents to file */ + png_write_row(png_ptr, pb); + pb += symbol->bitmap_width; + } } /* End the file */ diff --git a/backend/postal.c b/backend/postal.c index 3a52d9ef..230f4d12 100644 --- a/backend/postal.c +++ b/backend/postal.c @@ -165,6 +165,10 @@ INTERNAL int zint_postnet(struct zint_symbol *symbol, unsigned char source[], in symbol->rows = 2; symbol->width = writer - 1; + if ((symbol->show_hrt & 0x7) >= ZINT_HRT_LINEAR_ALL) { + z_hrt_cpy_cat_nochk(symbol, source, length, (char) z_itoc(check_digit), NULL /*cat*/, 0); + } + if (content_segs && z_ct_cpy_cat(symbol, source, length, (char) z_itoc(check_digit), NULL /*cat*/, 0)) { return ZINT_ERROR_MEMORY; /* `z_ct_cpy_cat()` only fails with OOM */ } @@ -279,6 +283,10 @@ INTERNAL int zint_fim(struct zint_symbol *symbol, unsigned char source[], int le (void) z_set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/); } + if ((symbol->show_hrt & 0x7) >= ZINT_HRT_LINEAR_ALL) { + z_hrt_cpy_nochk(symbol, source, length); + } + if (content_segs && z_ct_cpy(symbol, source, length)) { return ZINT_ERROR_MEMORY; /* `z_ct_cpy()` only fails with OOM */ } @@ -457,6 +465,10 @@ INTERNAL int zint_rm4scc(struct zint_symbol *symbol, unsigned char source[], int (void) zint_daft_set_height(symbol, 0.0f, 0.0f); } + if ((symbol->show_hrt & 0x7) >= ZINT_HRT_LINEAR_ALL) { + z_hrt_cpy_cat_nochk(symbol, source, length, check_digit, NULL /*cat*/, 0); + } + if (content_segs && z_ct_cpy_cat(symbol, source, length, check_digit, NULL /*cat*/, 0)) { return ZINT_ERROR_MEMORY; /* `z_ct_cpy_cat()` only fails with OOM */ } @@ -547,6 +559,10 @@ INTERNAL int zint_flat(struct zint_symbol *symbol, unsigned char source[], int l /* TODO: Find documentation on BARCODE_FLAT dimensions/height */ + if ((symbol->show_hrt & 0x7) >= ZINT_HRT_LINEAR_ALL) { + z_hrt_cpy_nochk(symbol, source, length); + } + if (content_segs && z_ct_cpy(symbol, source, length)) { return ZINT_ERROR_MEMORY; /* `z_ct_cpy()` only fails with OOM */ } @@ -659,6 +675,10 @@ INTERNAL int zint_japanpost(struct zint_symbol *symbol, unsigned char source[], (void) zint_daft_set_height(symbol, 0.0f, 0.0f); } + if ((symbol->show_hrt & 0x7) >= ZINT_HRT_LINEAR_ALL) { + z_hrt_cpy_nochk(symbol, source, length); + } + /* Note: check char is in KASUTSET and not truly representable in raw text's SHKASUTSET_F */ if (content_segs && z_ct_cpy(symbol, source, length)) { return ZINT_ERROR_MEMORY; /* `z_ct_cpy()` only fails with OOM */ diff --git a/backend/raster.c b/backend/raster.c index 5ab86838..1ae4c3b8 100644 --- a/backend/raster.c +++ b/backend/raster.c @@ -40,19 +40,13 @@ #include "common.h" #include "output.h" -#include "zfiletypes.h" - #include "raster_font.h" /* Font for human readable text */ +#include "zfiletypes.h" +#include "zfont.h" #define DEFAULT_INK '1' /* Black */ #define DEFAULT_PAPER '0' /* White */ -/* Flags for `draw_string()`/`draw_letter()` */ -#define ZFONT_HALIGN_CENTRE 0 -#define ZFONT_HALIGN_LEFT 1 -#define ZFONT_HALIGN_RIGHT 2 -#define ZFONT_UPCEAN_TEXT 4 /* Helper flag to indicate dealing with EAN/UPC */ - #ifdef ZINT_TEST /* For testing `malloc()` failure */ @@ -126,8 +120,8 @@ static void *raster_malloc(size_t size, size_t prev_size) { return rast_malloc(id, size); } +/* Place pixelbuffer into symbol */ static int buffer_plot(struct zint_symbol *symbol, const unsigned char *pixelbuf) { - /* Place pixelbuffer into symbol */ unsigned char alpha[2]; unsigned char map[91][3] = { {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, /* 0x00-0F */ @@ -238,7 +232,7 @@ static int save_raster_image_to_file(struct zint_symbol *symbol, const int image return z_errtxt(ZINT_ERROR_MEMORY, symbol, 650, "Insufficient memory for pixel buffer"); } #ifdef ZINT_SANITIZEM /* Suppress clang -fsanitize=memory false positive */ - memset(rotated_pixbuf, DEFAULT_PAPER, image_size); + memset(rotated_pixbuf, zint_out_grayscale(symbol) ? 0x00 : DEFAULT_PAPER, image_size); #endif } @@ -527,9 +521,9 @@ static void draw_string(unsigned char *pixelbuf, const unsigned char input_strin length = (int) z_ustrlen(input_string); } - if (textflags & ZFONT_HALIGN_LEFT) { + if (textflags & OUT_HALIGN_LEFT) { string_left_hand = xposn; - } else if (textflags & ZFONT_HALIGN_RIGHT) { + } else if (textflags & OUT_HALIGN_RIGHT) { string_left_hand = xposn - ((letter_width * length - letter_gap) * half_si); } else { string_left_hand = xposn - (int) roundf(((letter_width * length - letter_gap) * half_si) / 2.0f); @@ -610,7 +604,7 @@ static void draw_mp_circle(unsigned char *pixelbuf, const int image_width, const /* Draw central bullseye finder in Maxicode symbols */ static void draw_bullseye(unsigned char *pixelbuf, const int image_width, const int image_height, const int hex_width, const int hex_height, const int hx_start, const int hx_end, - const int hex_image_height, const int xoffset_si, const int yoffset_si) { + const int hex_image_height, const int xoffset_si, const int yoffset_si, const int ink, const int paper) { /* ISO/IEC 16023:2000 4.11.4 and 4.2.1.1 */ @@ -627,24 +621,24 @@ static void draw_bullseye(unsigned char *pixelbuf, const int image_width, const r_incr -= hx_end; } - draw_mp_circle(pixelbuf, image_width, image_height, x, y, r1 + r_incr * 5, DEFAULT_INK); - draw_mp_circle(pixelbuf, image_width, image_height, x, y, r1 + r_incr * 4, DEFAULT_PAPER); - draw_mp_circle(pixelbuf, image_width, image_height, x, y, r1 + r_incr * 3, DEFAULT_INK); - draw_mp_circle(pixelbuf, image_width, image_height, x, y, r1 + r_incr * 2, DEFAULT_PAPER); - draw_mp_circle(pixelbuf, image_width, image_height, x, y, r1 + r_incr, DEFAULT_INK); - draw_mp_circle(pixelbuf, image_width, image_height, x, y, r1, DEFAULT_PAPER); + draw_mp_circle(pixelbuf, image_width, image_height, x, y, r1 + r_incr * 5, ink); + draw_mp_circle(pixelbuf, image_width, image_height, x, y, r1 + r_incr * 4, paper); + draw_mp_circle(pixelbuf, image_width, image_height, x, y, r1 + r_incr * 3, ink); + draw_mp_circle(pixelbuf, image_width, image_height, x, y, r1 + r_incr * 2, paper); + draw_mp_circle(pixelbuf, image_width, image_height, x, y, r1 + r_incr, ink); + draw_mp_circle(pixelbuf, image_width, image_height, x, y, r1, paper); } /* Put a hexagon into the pixel buffer */ static void draw_hexagon(unsigned char *pixelbuf, const int image_width, const int image_height, const unsigned char *scaled_hexagon, const int hex_width, const int hex_height, - const int xposn, const int yposn) { + const int xposn, const int yposn, const int ink) { int i, j; for (i = 0; i < hex_height; i++) { for (j = 0; j < hex_width; j++) { - if (scaled_hexagon[(i * hex_width) + j] == DEFAULT_INK) { - draw_pt(pixelbuf, image_width, image_height, xposn + j, yposn + i, DEFAULT_INK); + if (scaled_hexagon[(i * hex_width) + j] == ink) { + draw_pt(pixelbuf, image_width, image_height, xposn + j, yposn + i, ink); } } } @@ -654,7 +648,7 @@ static void draw_hexagon(unsigned char *pixelbuf, const int image_width, const i * Creative Commons Attribution-ShareAlike License * https://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License */ static void plot_hexline(unsigned char *scaled_hexagon, const int hex_width, const int hex_height, - int start_x, int start_y, const int end_x, const int end_y) { + int start_x, int start_y, const int end_x, const int end_y, const int ink) { const int dx = abs(end_x - start_x); const int sx = start_x < end_x ? 1 : -1; const int dy = -abs(end_y - start_y); @@ -663,7 +657,7 @@ static void plot_hexline(unsigned char *scaled_hexagon, const int hex_width, con for (;;) { int e2; - draw_pt(scaled_hexagon, hex_width, hex_height, start_x, start_y, DEFAULT_INK); + draw_pt(scaled_hexagon, hex_width, hex_height, start_x, start_y, ink); if (start_x == end_x && start_y == end_y) { break; } @@ -681,7 +675,7 @@ static void plot_hexline(unsigned char *scaled_hexagon, const int hex_width, con /* Create a hexagon shape and fill it */ static void plot_hexagon(unsigned char *scaled_hexagon, const int hex_width, const int hex_height, - const int hx_start, const int hy_start, const int hx_end, const int hy_end) { + const int hx_start, const int hy_start, const int hx_end, const int hy_end, const int ink) { int line, i; int not_top; @@ -704,7 +698,7 @@ static void plot_hexagon(unsigned char *scaled_hexagon, const int hex_width, con } /* Plot line of top left quadrant */ - plot_hexline(scaled_hexagon, hex_width, hex_height, hx_start, start_y, end_x, hy_start); + plot_hexline(scaled_hexagon, hex_width, hex_height, hx_start, start_y, end_x, hy_start, ink); /* Fill to right */ not_top = 0; @@ -712,15 +706,16 @@ static void plot_hexagon(unsigned char *scaled_hexagon, const int hex_width, con int first = -1; for (i = hx_start; i < hx_start + hx_radius + hx_width_odd; i++) { if (first != -1) { - scaled_hexagon[(hex_width * line) + i] = DEFAULT_INK; + scaled_hexagon[(hex_width * line) + i] = ink; not_top = 1; - } else if (scaled_hexagon[(hex_width * line) + i] == DEFAULT_INK) { + } else if (scaled_hexagon[(hex_width * line) + i] == ink) { first = i + 1; } } - if (not_top && first == -1) { /* Fill empty lines at bottom */ + if (not_top && first == -1) { + /* Fill empty lines at bottom */ for (i = hx_start; i < hx_start + hx_radius + hx_width_odd; i++) { - scaled_hexagon[(hex_width * line) + i] = DEFAULT_INK; + scaled_hexagon[(hex_width * line) + i] = ink; } } } @@ -728,8 +723,8 @@ static void plot_hexagon(unsigned char *scaled_hexagon, const int hex_width, con /* Copy left quadrant to right, flipping horizontally */ for (line = hy_start; line < hy_start + hy_radius + hy_height_odd; line++) { for (i = hx_start; i < hx_start + hx_radius + hx_width_odd; i++) { - if (scaled_hexagon[(hex_width * line) + i] == DEFAULT_INK) { - scaled_hexagon[(hex_width * line) + hex_width - hx_end - (i - hx_start + 1)] = DEFAULT_INK; + if (scaled_hexagon[(hex_width * line) + i] == ink) { + scaled_hexagon[(hex_width * line) + hex_width - hx_end - (i - hx_start + 1)] = ink; } } } @@ -737,8 +732,8 @@ static void plot_hexagon(unsigned char *scaled_hexagon, const int hex_width, con /* Copy top to bottom, flipping vertically */ for (line = hy_start; line < hy_start + hy_radius + hy_height_odd; line++) { for (i = hx_start; i < hex_width; i++) { - if (scaled_hexagon[(hex_width * line) + i] == DEFAULT_INK) { - scaled_hexagon[(hex_width * (hex_height - hy_end - (line - hy_start + 1))) + i] = DEFAULT_INK; + if (scaled_hexagon[(hex_width * line) + i] == ink) { + scaled_hexagon[(hex_width * (hex_height - hy_end - (line - hy_start + 1))) + i] = ink; } } } @@ -748,7 +743,7 @@ static void plot_hexagon(unsigned char *scaled_hexagon, const int hex_width, con static void draw_bind_box(const struct zint_symbol *symbol, unsigned char *pixelbuf, const int xoffset_si, const int yoffset_si, const int symbol_height_si, const int dot_overspill_si, const int upceanflag, const int textoffset_si, const int image_width, const int image_height, - const int si) { + const int si, const int ink) { if (symbol->border_width > 0 && (symbol->output_options & (BARCODE_BOX | BARCODE_BIND | BARCODE_BIND_TOP))) { const int no_extend = symbol->symbology == BARCODE_CODABLOCKF || symbol->symbology == BARCODE_HIBC_BLOCKF || symbol->symbology == BARCODE_DPD; @@ -759,24 +754,23 @@ static void draw_bind_box(const struct zint_symbol *symbol, unsigned char *pixel if (horz_outside) { ybind_top = 0; ybind_bot = image_height - bwidth_si; - } else if (upceanflag == 2 || upceanflag == 5) { + } else if (upceanflag == OUT_UPCEANFLAG_EAN2 || upceanflag == OUT_UPCEANFLAG_EAN5) { ybind_top += textoffset_si; ybind_bot += textoffset_si; } /* Horizontal boundary bars */ if ((symbol->output_options & BARCODE_BOX) || !no_extend) { /* Box or not CodaBlockF/DPD */ - draw_bar(pixelbuf, 0, image_width, ybind_top, bwidth_si, image_width, image_height, DEFAULT_INK); + draw_bar(pixelbuf, 0, image_width, ybind_top, bwidth_si, image_width, image_height, ink); if (!(symbol->output_options & BARCODE_BIND_TOP)) { /* Trumps BARCODE_BOX & BARCODE_BIND */ - draw_bar(pixelbuf, 0, image_width, ybind_bot, bwidth_si, image_width, image_height, DEFAULT_INK); + draw_bar(pixelbuf, 0, image_width, ybind_bot, bwidth_si, image_width, image_height, ink); } } else { /* CodaBlockF/DPD bind - does not extend over horizontal whitespace */ const int width_si = symbol->width * si; - draw_bar(pixelbuf, xoffset_si, width_si, ybind_top, bwidth_si, image_width, image_height, DEFAULT_INK); + draw_bar(pixelbuf, xoffset_si, width_si, ybind_top, bwidth_si, image_width, image_height, ink); if (!(symbol->output_options & BARCODE_BIND_TOP)) { /* Trumps BARCODE_BOX & BARCODE_BIND */ - draw_bar(pixelbuf, xoffset_si, width_si, ybind_bot, bwidth_si, image_width, image_height, - DEFAULT_INK); + draw_bar(pixelbuf, xoffset_si, width_si, ybind_bot, bwidth_si, image_width, image_height, ink); } } /* BARCODE_BIND_TOP trumps BARCODE_BOX */ @@ -788,11 +782,11 @@ static void draw_bind_box(const struct zint_symbol *symbol, unsigned char *pixel if (horz_outside) { box_top = bwidth_si; box_height = image_height - bwidth_si * 2; - } else if (upceanflag == 2 || upceanflag == 5) { + } else if (upceanflag == OUT_UPCEANFLAG_EAN2 || upceanflag == OUT_UPCEANFLAG_EAN5) { box_top += textoffset_si; } - draw_bar(pixelbuf, 0, bwidth_si, box_top, box_height, image_width, image_height, DEFAULT_INK); - draw_bar(pixelbuf, xbox_right, bwidth_si, box_top, box_height, image_width, image_height, DEFAULT_INK); + draw_bar(pixelbuf, 0, bwidth_si, box_top, box_height, image_width, image_height, ink); + draw_bar(pixelbuf, xbox_right, bwidth_si, box_top, box_height, image_width, image_height, ink); } } } @@ -814,6 +808,10 @@ static int plot_raster_maxicode(struct zint_symbol *symbol, const int rotate_ang int yposn_offset; int xoffset_si, yoffset_si, roffset_si, boffset_si; + const int grayscale = zint_out_grayscale(symbol); + const int ink = grayscale ? 0xFF : DEFAULT_INK; + const int paper = grayscale ? 0x00 : DEFAULT_PAPER; + const float two_div_sqrt3 = 1.1547f; /* 2 / √3 */ const float sqrt3_div_two = 0.866f; /* √3 / 2 == 1.5 / √3 */ @@ -854,16 +852,16 @@ static int plot_raster_maxicode(struct zint_symbol *symbol, const int rotate_ang if (!(pixelbuf = (unsigned char *) raster_malloc_mc_pixelbuf(image_size, 0 /*prev_size*/))) { return z_errtxt(ZINT_ERROR_MEMORY, symbol, 655, "Insufficient memory for pixel buffer"); } - memset(pixelbuf, DEFAULT_PAPER, image_size); + memset(pixelbuf, paper, image_size); hex_size = (size_t) hex_width * hex_height; if (!(scaled_hexagon = (unsigned char *) raster_malloc_mc_hexagon(hex_size, image_size))) { free(pixelbuf); return z_errtxt(ZINT_ERROR_MEMORY, symbol, 656, "Insufficient memory for pixel buffer"); } - memset(scaled_hexagon, DEFAULT_PAPER, hex_size); + memset(scaled_hexagon, paper, hex_size); - plot_hexagon(scaled_hexagon, hex_width, hex_height, hx_start, hy_start, hx_end, hy_end); + plot_hexagon(scaled_hexagon, hex_width, hex_height, hx_start, hy_start, hx_end, hy_end, ink); for (row = 0; row < symbol->rows; row++) { const int odd_row = row & 1; /* Odd (reduced) row, even (full) row */ @@ -873,16 +871,16 @@ static int plot_raster_maxicode(struct zint_symbol *symbol, const int rotate_ang const int xposn = column * hex_width + xposn_offset; if (z_module_is_set(symbol, row, column)) { draw_hexagon(pixelbuf, image_width, image_height, scaled_hexagon, hex_width, hex_height, xposn, - yposn); + yposn, ink); } } } draw_bullseye(pixelbuf, image_width, image_height, hex_width, hex_height, hx_start, hx_end, hex_image_height, - xoffset_si, yoffset_si); + xoffset_si, yoffset_si, ink, paper); draw_bind_box(symbol, pixelbuf, xoffset_si, yoffset_si, hex_image_height, 0 /*dot_overspill_si*/, - 0 /*upceanflag*/, 0 /*textoffset_si*/, image_width, image_height, (int) scaler); + 0 /*upceanflag*/, 0 /*textoffset_si*/, image_width, image_height, (int) scaler, ink); error_number = save_raster_image_to_file(symbol, image_height, image_width, pixelbuf, rotate_angle, file_type); free(scaled_hexagon); @@ -916,6 +914,10 @@ static int plot_raster_dotty(struct zint_symbol *symbol, const int rotate_angle, int xoffset_si, yoffset_si, roffset_si, boffset_si; int symbol_height_si; + const int grayscale = zint_out_grayscale(symbol); + const int ink = grayscale ? 0xFF : DEFAULT_INK; + const int paper = grayscale ? 0x00 : DEFAULT_PAPER; + if (scaler < 2.0f) { scaler = 2.0f; } @@ -932,7 +934,8 @@ static int plot_raster_dotty(struct zint_symbol *symbol, const int rotate_angle, dot_overspill_si = 0; /* Offset (1 - dot_size) / 2 + dot_radius == (1 - dot_size + dot_size) / 2 == 1 / 2 */ dot_offset_s = scaler / 2.0f; - } else { /* Allow for exceeding 1X */ + } else { + /* Allow for exceeding 1X */ dot_overspill_si = (int) ceilf((symbol->dot_size - 1.0f) * scaler); dot_offset_s = dot_radius_s; } @@ -948,7 +951,7 @@ static int plot_raster_dotty(struct zint_symbol *symbol, const int rotate_angle, if (!(scaled_pixelbuf = (unsigned char *) raster_malloc_dotty_scaled(scale_size, 0 /*prev_size*/))) { return z_errtxt(ZINT_ERROR_MEMORY, symbol, 657, "Insufficient memory for pixel buffer"); } - memset(scaled_pixelbuf, DEFAULT_PAPER, scale_size); + memset(scaled_pixelbuf, paper, scale_size); /* Plot the body of the symbol to the pixel buffer */ for (r = 0; r < symbol->rows; r++) { @@ -956,14 +959,13 @@ static int plot_raster_dotty(struct zint_symbol *symbol, const int rotate_angle, for (i = 0; i < symbol->width; i++) { if (z_module_is_set(symbol, r, i)) { draw_circle(scaled_pixelbuf, scale_width, scale_height, - (int) (i * scaler + xoffset_si + dot_offset_s), - row_si, dot_radius_si, DEFAULT_INK); + (int) (i * scaler + xoffset_si + dot_offset_s), row_si, dot_radius_si, ink); } } } draw_bind_box(symbol, scaled_pixelbuf, xoffset_si, yoffset_si, symbol_height_si, dot_overspill_si, - 0 /*upceanflag*/, 0 /*textoffset_si*/, scale_width, scale_height, (int) scaler); + 0 /*upceanflag*/, 0 /*textoffset_si*/, scale_width, scale_height, (int) scaler, ink); error_number = save_raster_image_to_file(symbol, scale_height, scale_width, scaled_pixelbuf, rotate_angle, file_type); @@ -974,45 +976,6 @@ static int plot_raster_dotty(struct zint_symbol *symbol, const int rotate_angle, return error_number; } -/* Convert UTF-8 to ISO/IEC 8859-1 for `draw_string()` human readable text */ -static void to_iso8859_1(const unsigned char source[], unsigned char preprocessed[]) { - int j, i, input_length; - - input_length = (int) z_ustrlen(source); - - j = 0; - i = 0; - while (i < input_length) { - switch (source[i]) { - case 0xC2: - /* UTF-8 C2xxh */ - /* Character range: C280h (latin: 80h) to C2BFh (latin: BFh) */ - assert(i + 1 < input_length); - i++; - preprocessed[j] = source[i]; - j++; - break; - case 0xC3: - /* UTF-8 C3xx */ - /* Character range: C380h (latin: C0h) to C3BFh (latin: FFh) */ - assert(i + 1 < input_length); - i++; - preprocessed[j] = source[i] + 64; - j++; - break; - default: - /* Process ASCII (< 80h), all other unicode points are ignored */ - if (z_isascii(source[i])) { - preprocessed[j] = source[i]; - j++; - } - break; - } - i++; - } - preprocessed[j] = '\0'; -} - static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angle, const int file_type) { int error_number, warn_number = 0; int main_width; @@ -1028,13 +991,17 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl int hide_text; int i, r; int block_width = 0; - int font_height; /* Font pixel size (so whole integers) */ float guard_descent; float large_bar_height; + struct zfont zfnt_s; + struct zfont *const zfnt = &zfnt_s; const int upcean_guard_whitespace = !(symbol->output_options & BARCODE_NO_QUIET_ZONES) && (symbol->output_options & EANUPC_GUARD_WHITESPACE); const int is_codablockf = symbol->symbology == BARCODE_CODABLOCKF || symbol->symbology == BARCODE_HIBC_BLOCKF; + const int grayscale = zint_out_grayscale(symbol); + const int ink = grayscale ? 0xFF : DEFAULT_INK; + const int paper = grayscale ? 0x00 : DEFAULT_PAPER; int textflags = 0; int xoffset_si, yoffset_si, roffset_si, boffset_si, qz_right_si; int xoffset_comp_si; @@ -1077,7 +1044,11 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl upceanflag = zint_out_process_upcean(symbol, comp_xoffset, &main_width, addon, &addon_len, &addon_gap); } - hide_text = !symbol->show_hrt || symbol->text_length == 0 || scaler < 1.0f; + hide_text = !(symbol->show_hrt & 0x7) || symbol->text_length == 0 || (scaler < 1.0f && !grayscale); + + if ((error_number = zint_font_init(zfnt, symbol, upceanflag))) { + return error_number; + } zint_out_set_whitespace_offsets(symbol, hide_text, comp_xoffset, &xoffset, &yoffset, &roffset, &boffset, NULL /*qz_right*/, si, &xoffset_si, &yoffset_si, &roffset_si, &boffset_si, @@ -1090,24 +1061,30 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl /* Note font sizes halved as in pixels */ if (upceanflag) { textflags = ZFONT_UPCEAN_TEXT | (symbol->output_options & SMALL_TEXT); /* Bold not available for EAN/UPC */ - font_height = (UPCEAN_FONT_HEIGHT + 1) / 2; /* Height of guard bar descent (none for EAN-2 and EAN-5) */ - guard_descent = upceanflag >= 6 ? symbol->guard_descent : 0.0f; + guard_descent = upceanflag >= OUT_UPCEANFLAG_UPCE ? symbol->guard_descent : 0.0f; } else { textflags = symbol->output_options & (SMALL_TEXT | BOLD_TEXT); - font_height = textflags & SMALL_TEXT ? (SMALL_FONT_HEIGHT + 1) / 2 : (NORMAL_FONT_HEIGHT + 1) / 2; guard_descent = 0.0f; } + if ((error_number = zint_font_text_height(zfnt, symbol, si, image_width, addon, addon_len))) { + goto errexit; + } + if (hide_text) { textoffset = guard_descent; - if (addon_len && large_bar_height + textoffset < font_height + symbol->text_gap) { - textoffset = font_height + symbol->text_gap - large_bar_height; + if (addon_len && large_bar_height + textoffset < zfnt->text_height + symbol->text_gap) { + textoffset = zfnt->text_height + symbol->text_gap - large_bar_height; } } else { - textoffset = font_height + symbol->text_gap; - if (upceanflag && textoffset < guard_descent) { - textoffset = guard_descent; + if (upceanflag) { + textoffset = zfnt->text_height + symbol->text_gap; + if (textoffset < guard_descent) { + textoffset = guard_descent; + } + } else { + textoffset = zfnt->text_height + symbol->text_gap; } } textoffset_si = (int) ceilf(textoffset * si); @@ -1121,9 +1098,10 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl image_size = (size_t) image_width * image_height; if (!(pixelbuf = (unsigned char *) raster_malloc_pixelbuf(image_size, 0 /*prev_size*/))) { - return z_errtxt(ZINT_ERROR_MEMORY, symbol, 658, "Insufficient memory for pixel buffer"); + error_number = z_errtxt(ZINT_ERROR_MEMORY, symbol, 658, "Insufficient memory for pixel buffer"); + goto errexit; } - memset(pixelbuf, DEFAULT_PAPER, image_size); + memset(pixelbuf, paper, image_size); yposn_si = yoffset_si; @@ -1147,7 +1125,8 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl yposn_si += row_height_si; } - } else if (upceanflag >= 6) { /* UPC-E, EAN-8, UPC-A, EAN-13 */ + /* UPC-E, EAN-8, UPC-A, EAN-13 */ + } else if (upceanflag >= OUT_UPCEANFLAG_UPCE) { for (r = 0; r < symbol->rows; r++) { int row_height_si = row_heights_si[r]; @@ -1157,7 +1136,7 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl && z_module_is_set(symbol, r, i + block_width) == fill; block_width++); if (r == symbol->rows - 1 && i > main_width && addon_latch == 0) { int addon_row_height_si; - const int addon_row_adj_si = (int) ceilf((font_height + symbol->text_gap) * si); + const int addon_row_adj_si = (int) ceilf((zfnt->text_height + symbol->text_gap) * si); copy_bar_line(pixelbuf, xoffset_si, main_width * si, yposn_si, row_height_si, image_width, image_height); addon_text_yposn = yposn_si; @@ -1174,8 +1153,7 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl } if (fill) { /* a bar */ - draw_bar_line(pixelbuf, i * si + xoffset_si, block_width * si, yposn_si, image_width, - DEFAULT_INK); + draw_bar_line(pixelbuf, i * si + xoffset_si, block_width * si, yposn_si, image_width, ink); } } if (addon_latch) { @@ -1204,9 +1182,8 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl for (block_width = 1; (i + block_width < symbol->width) && z_module_is_set(symbol, r, i + block_width) == fill; block_width++); if (fill) { - /* a bar */ - draw_bar_line(pixelbuf, i * si + xoffset_si, block_width * si, yposn_si, image_width, - DEFAULT_INK); + /* A bar */ + draw_bar_line(pixelbuf, i * si + xoffset_si, block_width * si, yposn_si, image_width, ink); } } copy_bar_line(pixelbuf, xoffset_si, image_width - xoffset_si - roffset_si, yposn_si, row_height_si, @@ -1215,30 +1192,33 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl } } - if (guard_descent && upceanflag >= 6) { /* UPC-E, EAN-8, UPC-A, EAN-13 */ - /* Guard bar extension */ + /* Guard bar extension UPC-E, EAN-8, UPC-A, EAN-13 */ + if (guard_descent && upceanflag >= OUT_UPCEANFLAG_UPCE) { const int guard_yoffset_si = yoffset_si + symbol_height_si; const int guard_descent_si = guard_descent * si; int copy_bar_width; - if (upceanflag == 6) { /* UPC-E */ - draw_bar_line(pixelbuf, 0 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, DEFAULT_INK); - draw_bar_line(pixelbuf, 2 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, DEFAULT_INK); - draw_bar_line(pixelbuf, 46 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, DEFAULT_INK); - draw_bar_line(pixelbuf, 48 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, DEFAULT_INK); - draw_bar_line(pixelbuf, 50 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, DEFAULT_INK); + if (upceanflag == OUT_UPCEANFLAG_UPCE) { + draw_bar_line(pixelbuf, 0 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, ink); + draw_bar_line(pixelbuf, 2 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, ink); + draw_bar_line(pixelbuf, 46 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, ink); + draw_bar_line(pixelbuf, 48 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, ink); + draw_bar_line(pixelbuf, 50 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, ink); copy_bar_width = (50 + 1) * si; - } else if (upceanflag == 8) { /* EAN-8 */ - draw_bar_line(pixelbuf, 0 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, DEFAULT_INK); - draw_bar_line(pixelbuf, 2 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, DEFAULT_INK); - draw_bar_line(pixelbuf, 32 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, DEFAULT_INK); - draw_bar_line(pixelbuf, 34 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, DEFAULT_INK); - draw_bar_line(pixelbuf, 64 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, DEFAULT_INK); - draw_bar_line(pixelbuf, 66 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, DEFAULT_INK); + /* EAN-8 */ + } else if (upceanflag == OUT_UPCEANFLAG_EAN8) { + draw_bar_line(pixelbuf, 0 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, ink); + draw_bar_line(pixelbuf, 2 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, ink); + draw_bar_line(pixelbuf, 32 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, ink); + draw_bar_line(pixelbuf, 34 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, ink); + draw_bar_line(pixelbuf, 64 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, ink); + draw_bar_line(pixelbuf, 66 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, ink); copy_bar_width = (66 + 1) * si; - } else if (upceanflag == 12) { /* UPC-A */ + /* UPC-A */ + } else if (upceanflag == OUT_UPCEANFLAG_UPCA) { + assert(symbol->rows >= 1); /* Suppress clang-tidy-23 clang-analyzer-security.ArrayBound (again) */ for (i = 0 + comp_xoffset; i < 11 + comp_xoffset; i += block_width) { const int fill = z_module_is_set(symbol, symbol->rows - 1, i); for (block_width = 1; (i + block_width < symbol->width) @@ -1246,11 +1226,11 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl block_width++); if (fill) { draw_bar_line(pixelbuf, i * si + xoffset_si, block_width * si, guard_yoffset_si, image_width, - DEFAULT_INK); + ink); } } - draw_bar_line(pixelbuf, 46 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, DEFAULT_INK); - draw_bar_line(pixelbuf, 48 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, DEFAULT_INK); + draw_bar_line(pixelbuf, 46 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, ink); + draw_bar_line(pixelbuf, 48 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, ink); for (i = 85 + comp_xoffset; i < 96 + comp_xoffset; i += block_width) { const int fill = z_module_is_set(symbol, symbol->rows - 1, i); for (block_width = 1; (i + block_width < symbol->width) @@ -1258,18 +1238,20 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl block_width++); if (fill) { draw_bar_line(pixelbuf, i * si + xoffset_si, block_width * si, guard_yoffset_si, image_width, - DEFAULT_INK); + ink); } } copy_bar_width = 95 * si; - } else { /* EAN-13 */ - draw_bar_line(pixelbuf, 0 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, DEFAULT_INK); - draw_bar_line(pixelbuf, 2 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, DEFAULT_INK); - draw_bar_line(pixelbuf, 46 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, DEFAULT_INK); - draw_bar_line(pixelbuf, 48 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, DEFAULT_INK); - draw_bar_line(pixelbuf, 92 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, DEFAULT_INK); - draw_bar_line(pixelbuf, 94 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, DEFAULT_INK); + /* EAN-13 */ + } else { + assert(upceanflag == OUT_UPCEANFLAG_EAN13); + draw_bar_line(pixelbuf, 0 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, ink); + draw_bar_line(pixelbuf, 2 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, ink); + draw_bar_line(pixelbuf, 46 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, ink); + draw_bar_line(pixelbuf, 48 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, ink); + draw_bar_line(pixelbuf, 92 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, ink); + draw_bar_line(pixelbuf, 94 * si + xoffset_comp_si, 1 * si, guard_yoffset_si, image_width, ink); copy_bar_width = (94 + 1) * si; } copy_bar_line(pixelbuf, xoffset_comp_si, copy_bar_width, guard_yoffset_si, guard_descent_si, image_width, @@ -1280,7 +1262,8 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl if (!hide_text) { - if (upceanflag >= 6) { /* UPC-E, EAN-8, UPC-A, EAN-13 */ + /* UPC-E, EAN-8, UPC-A, EAN-13 */ + if (upceanflag >= OUT_UPCEANFLAG_UPCE) { /* Note font sizes halved as in pixels */ const int upcea_height_adj = ((UPCEAN_FONT_HEIGHT - UPCEAN_SMALL_FONT_HEIGHT) * si + 1) / 2; @@ -1291,10 +1274,10 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl text_yposn += symbol->border_width * si; } - if (upceanflag == 6) { /* UPC-E */ + if (upceanflag == OUT_UPCEANFLAG_UPCE) { int text_xposn = -5 * si + xoffset_comp_si; draw_string(pixelbuf, symbol->text, 1, text_xposn, text_yposn + upcea_height_adj, - textflags | SMALL_TEXT | ZFONT_HALIGN_RIGHT, image_width, image_height, si); + textflags | SMALL_TEXT | OUT_HALIGN_RIGHT, image_width, image_height, si); text_xposn = 24 * si + xoffset_comp_si; draw_string(pixelbuf, symbol->text + 1, 6, text_xposn, text_yposn, textflags, image_width, image_height, si); @@ -1302,7 +1285,7 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl 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); + textflags | SMALL_TEXT | OUT_HALIGN_LEFT, image_width, image_height, si); if (addon_len) { text_xposn = ((addon_len == 2 ? 61 : 75) + addon_gap) * si + xoffset_comp_si; draw_string(pixelbuf, addon, addon_len, text_xposn, addon_text_yposn, textflags, @@ -1310,16 +1293,16 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl if (upcean_guard_whitespace) { text_xposn = symbol->width * si + qz_right_si + xoffset_si; draw_string(pixelbuf, (const unsigned char *) ">", 1, text_xposn, addon_text_yposn, - textflags | ZFONT_HALIGN_RIGHT, image_width, image_height, si); + textflags | OUT_HALIGN_RIGHT, image_width, image_height, si); } } - } else if (upceanflag == 8) { /* EAN-8 */ + } else if (upceanflag == OUT_UPCEANFLAG_EAN8) { int text_xposn; if (upcean_guard_whitespace) { text_xposn = -7 * si + xoffset_comp_si; draw_string(pixelbuf, (const unsigned char *) "<", 1, text_xposn, text_yposn, - textflags | ZFONT_HALIGN_LEFT, image_width, image_height, si); + textflags | OUT_HALIGN_LEFT, image_width, image_height, si); } text_xposn = 17 * si + xoffset_comp_si; draw_string(pixelbuf, symbol->text, 4, text_xposn, text_yposn, textflags, image_width, image_height, @@ -1334,18 +1317,18 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl if (upcean_guard_whitespace) { text_xposn = symbol->width * si + qz_right_si + xoffset_si; draw_string(pixelbuf, (const unsigned char *) ">", 1, text_xposn, addon_text_yposn, - textflags | ZFONT_HALIGN_RIGHT, image_width, image_height, si); + textflags | OUT_HALIGN_RIGHT, image_width, image_height, si); } } else if (upcean_guard_whitespace) { text_xposn = symbol->width * si + qz_right_si + xoffset_si; draw_string(pixelbuf, (const unsigned char *) ">", 1, text_xposn, text_yposn, - textflags | ZFONT_HALIGN_RIGHT, image_width, image_height, si); + textflags | OUT_HALIGN_RIGHT, image_width, image_height, si); } - } else if (upceanflag == 12) { /* UPC-A */ + } else if (upceanflag == OUT_UPCEANFLAG_UPCA) { int text_xposn = -5 * si + xoffset_comp_si; draw_string(pixelbuf, symbol->text, 1, text_xposn, text_yposn + upcea_height_adj, - textflags | SMALL_TEXT | ZFONT_HALIGN_RIGHT, image_width, image_height, si); + textflags | SMALL_TEXT | OUT_HALIGN_RIGHT, image_width, image_height, si); text_xposn = 28 * si + xoffset_comp_si; draw_string(pixelbuf, symbol->text + 1, 5, text_xposn, text_yposn, textflags, image_width, image_height, si); @@ -1356,7 +1339,7 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl 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); + textflags | SMALL_TEXT | OUT_HALIGN_LEFT, image_width, image_height, si); if (addon_len) { text_xposn = ((addon_len == 2 ? 105 : 119) + addon_gap) * si + xoffset_comp_si; draw_string(pixelbuf, addon, addon_len, text_xposn, addon_text_yposn, textflags, @@ -1364,13 +1347,15 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl if (upcean_guard_whitespace) { text_xposn = symbol->width * si + qz_right_si + xoffset_si; draw_string(pixelbuf, (const unsigned char *) ">", 1, text_xposn, addon_text_yposn, - textflags | ZFONT_HALIGN_RIGHT, image_width, image_height, si); + textflags | OUT_HALIGN_RIGHT, image_width, image_height, si); } } - } else { /* EAN-13 */ + /* EAN-13 */ + } else { int text_xposn = -5 * si + xoffset_comp_si; - draw_string(pixelbuf, symbol->text, 1, text_xposn, text_yposn, textflags | ZFONT_HALIGN_RIGHT, + assert(upceanflag == OUT_UPCEANFLAG_EAN13); + draw_string(pixelbuf, symbol->text, 1, text_xposn, text_yposn, textflags | OUT_HALIGN_RIGHT, image_width, image_height, si); text_xposn = 24 * si + xoffset_comp_si; draw_string(pixelbuf, symbol->text + 1, 6, text_xposn, text_yposn, textflags, image_width, @@ -1385,17 +1370,19 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl if (upcean_guard_whitespace) { text_xposn = symbol->width * si + qz_right_si + xoffset_si; draw_string(pixelbuf, (const unsigned char *) ">", 1, text_xposn, addon_text_yposn, - textflags | ZFONT_HALIGN_RIGHT, image_width, image_height, si); + textflags | OUT_HALIGN_RIGHT, image_width, image_height, si); } } else if (upcean_guard_whitespace) { text_xposn = symbol->width * si + qz_right_si + xoffset_si; draw_string(pixelbuf, (const unsigned char *) ">", 1, text_xposn, text_yposn, - textflags | ZFONT_HALIGN_RIGHT, image_width, image_height, si); + textflags | OUT_HALIGN_RIGHT, image_width, image_height, si); } } - } else if (upceanflag) { /* EAN-2, EAN-5 (standalone add-ons) */ + /* EAN-2, EAN-5 (standalone add-ons) */ + } else if (upceanflag) { int text_xposn = (int) ((main_width / 2.0f) * si) + xoffset_si; int text_yposn = yoffset_si; + assert(upceanflag == OUT_UPCEANFLAG_EAN2 || upceanflag == OUT_UPCEANFLAG_EAN5); if (symbol->border_width > 0 && (symbol->output_options & (BARCODE_BOX | BARCODE_BIND | BARCODE_BIND_TOP))) { text_yposn -= symbol->border_width * si; @@ -1405,20 +1392,26 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl if (upcean_guard_whitespace) { text_xposn = symbol->width * si + qz_right_si + xoffset_comp_si; draw_string(pixelbuf, (const unsigned char *) ">", 1, text_xposn, text_yposn, - textflags | ZFONT_HALIGN_RIGHT, image_width, image_height, si); + textflags | OUT_HALIGN_RIGHT, image_width, image_height, si); } } else { - /* Suppress clang-analyzer-core.CallAndMessage warning */ - unsigned char local_text[sizeof(symbol->text)] = {0}; - int text_xposn = (int) ((main_width / 2.0f) * si) + xoffset_si; int text_yposn = yoffset_si + symbol_height_si + (int) (symbol->text_gap * si); + assert(!upceanflag); if (symbol->border_width > 0 && (symbol->output_options & (BARCODE_BOX | BARCODE_BIND)) && !(symbol->output_options & BARCODE_BIND_TOP)) { /* Trumps BARCODE_BOX & BARCODE_BIND */ text_yposn += symbol->border_width * si; } - to_iso8859_1(symbol->text, local_text); + if (symbol->show_hrt & ZINT_HRT_HALIGN_LEFT) { + textflags |= OUT_HALIGN_LEFT; + } else if (symbol->show_hrt & ZINT_HRT_HALIGN_RIGHT) { + textflags |= OUT_HALIGN_RIGHT; + } /* Put the human readable text at the bottom */ - draw_string(pixelbuf, local_text, -1, text_xposn, text_yposn, textflags, image_width, image_height, si); + for (i = 0; i < zfnt->lines; i++) { + zint_font_text_render(zfnt, symbol, pixelbuf, i, main_width * si, xoffset_si, roffset_si, text_yposn, + textflags, image_width, image_height, si); + text_yposn += zfnt->line_advance; + } } } @@ -1444,13 +1437,13 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl } for (r = 1; r < symbol->rows; r++) { draw_bar(pixelbuf, sep_xoffset_si, sep_width_si, sep_yoffset_si, sep_height_si, image_width, image_height, - DEFAULT_INK); + ink); sep_yoffset_si += row_heights_si[r]; } } draw_bind_box(symbol, pixelbuf, xoffset_si, yoffset_si, symbol_height_si, 0 /*dot_overspill_si*/, upceanflag, - textoffset_si, image_width, image_height, si); + textoffset_si, image_width, image_height, si, ink); if (!half_int_scaling) { size_t prev_image_row; @@ -1462,9 +1455,10 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl if (!(scaled_pixelbuf = (unsigned char *) raster_malloc_scaled((size_t) scale_width * scale_height, image_size))) { free(pixelbuf); - return z_errtxt(ZINT_ERROR_MEMORY, symbol, 659, "Insufficient memory for scaled pixel buffer"); + error_number = z_errtxt(ZINT_ERROR_MEMORY, symbol, 659, "Insufficient memory for scaled pixel buffer"); + goto errexit; } - memset(scaled_pixelbuf, DEFAULT_PAPER, (size_t) scale_width * scale_height); + memset(scaled_pixelbuf, paper, (size_t) scale_width * scale_height); /* Interpolate */ for (r = 0; r < scale_height; r++) { @@ -1494,6 +1488,10 @@ static int plot_raster_default(struct zint_symbol *symbol, const int rotate_angl free(pixelbuf); } } + +errexit: + zint_font_free(zfnt, si); + return error_number ? error_number : warn_number; } diff --git a/backend/rss.c b/backend/rss.c index 38ec2c54..a1498c6b 100644 --- a/backend/rss.c +++ b/backend/rss.c @@ -304,7 +304,8 @@ INTERNAL int zint_dbar_stk_set_height(struct zint_symbol *symbol, const int firs symbol->row_height[second_row] = 0.7f; /* 0.7f is actually 0.699999988 (0x3F333333) */ } else { symbol->row_height[second_row] = z_stripf(symbol->height - fixed_height - symbol->row_height[first_row]); - /* (h - 1) * 5/12 >= 0.5 -> h - 1 >= 0.5 * 12/5 -> h >= 2.2 -> rh[sr] >= (2.2 - 1 - 0.5) -> rh[sr] >= 0.7 */ + /* (h - 1) * 5/12 >= 0.5 -> h - 1 >= 0.5 * 12/5 -> h >= 2.2 -> rh[sr] >= (2.2 - 1 - 0.5) + -> rh[sr] >= 0.7 */ assert(symbol->row_height[second_row] >= 0.7f); } } @@ -469,9 +470,6 @@ INTERNAL int zint_dbar_omn_cc(struct zint_symbol *symbol, unsigned char source[] } symbol->rows++; - /* Set human readable text */ - dbar_set_gtin14_hrt(symbol, source, length); - if (symbol->output_options & COMPLIANT_HEIGHT) { /* Minimum height is 13X for truncated symbol ISO/IEC 24724:2011 5.3.1 Default height is 33X for DataBar Omnidirectional ISO/IEC 24724:2011 5.2 */ @@ -581,6 +579,12 @@ INTERNAL int zint_dbar_omn_cc(struct zint_symbol *symbol, unsigned char source[] } } + if (symbol->symbology == BARCODE_DBAR_OMN || symbol->symbology == BARCODE_DBAR_OMN_CC + || (symbol->show_hrt & 0x7) >= ZINT_HRT_STACKED) { + /* Set human readable text */ + dbar_set_gtin14_hrt(symbol, source, length); + } + if (content_segs) { unsigned char buf[14]; if (z_ct_cpy_cat(symbol, ZCUCP("01"), 2, '\xFF' /*none*/, dbar_gtin14(source, length, buf), 14)) { @@ -1218,7 +1222,8 @@ INTERNAL int zint_dbar_exp_cc(struct zint_symbol *symbol, unsigned char source[] int reduced_length; /* Allow for 8 bits + 5-bit latch per char + 200 bits overhead/padding */ char *binary_string = (char *) z_alloca(13 * length + 200 + 1); - const int set_hrt = symbol->symbology == BARCODE_DBAR_EXP || symbol->symbology == BARCODE_DBAR_EXP_CC; + const int set_hrt = symbol->symbology == BARCODE_DBAR_EXP || symbol->symbology == BARCODE_DBAR_EXP_CC + || (symbol->show_hrt & 0x7) >= ZINT_HRT_STACKED; const int content_segs = symbol->output_options & BARCODE_CONTENT_SEGS; const int debug_print = symbol->debug & ZINT_DEBUG_PRINT; diff --git a/backend/stb_truetype_zint.h b/backend/stb_truetype_zint.h new file mode 100644 index 00000000..07f3b55e --- /dev/null +++ b/backend/stb_truetype_zint.h @@ -0,0 +1,2497 @@ +/* stb_truetype.h - v1.26 - public domain + authored from 2009-2021 by Sean Barrett / RAD Game Tools */ +/* +------------------------------------------------------------------------------ +This software is available under 2 licenses -- choose whichever you prefer. +------------------------------------------------------------------------------ +ALTERNATIVE A - MIT License +Copyright (c) 2017 Sean Barrett +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +------------------------------------------------------------------------------ +ALTERNATIVE B - Public Domain (www.unlicense.org) +This is free and unencumbered software released into the public domain. +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------ +*/ + +/* ZINT: stb_truetype PRs/Issues (2026-06-02): + + Cannot reproduce using https://github.com/mozilla/Fira/blob/master/ttf/FiraMono-Medium.ttf + https://github.com/nothings/stb/issues/1956 + 2026-05-29 "z->direction assert in rasterize_sorted_edges" + + N/A (Pack stuff) + https://github.com/nothings/stb/issues/1953 + 2026-05-15 "stb_truetype: heap buffer overflow write in stbtt_PackFontRangesRenderIntoRects" + + *** Applied *** + https://github.com/nothings/stb/pull/1923 + 2026-03-24 "Add delta to all cases in format 4 cmap parsing" + + N/A (already fixed by PR 1756 below) + https://github.com/nothings/stb/pull/1914 + 2026-03-15 "fix: compound glyph translation and scaling factor" + + N/A (in SDF stuff) + https://github.com/nothings/stb/pull/1901 + 2026-03-05 "stb_truetype: rename internal symbol equal() to stbtt__equal()" + + N/A (in unused `stbtt_GetGlyphBitmapSubpixel()` & SDF stuff) + https://github.com/nothings/stb/pull/1867 + 2025-12-19 "stb_truetype: fix integer overflow in bitmap/SDF allocation" + + Not currently needed (see 1320) + https://github.com/nothings/stb/pull/1830 + 2025-08-14 "Added more macro declaration/definitions overrides" + + *** Applied *** + https://github.com/nothings/stb/pull/1756 + 2025-03-04 "[stb_truetype] fix compound glyph scaling" + + *** Applied *** + https://github.com/nothings/stb/pull/1705 + 2024-10-12 "Fixed kerning advance in fonts with both GPOS and kern tables" + + Not currently needed + https://github.com/nothings/stb/pull/1564 + 2023-10-22 "Add underline metrics" + + N/A (Pack stuff) + https://github.com/nothings/stb/pull/1509 + 2023-08-13 "Fixed missing glyph lookup when multiple ranges are used with stbtt_PackFontRanges" + + *** Applied *** + https://github.com/nothings/stb/pull/1422 + 2022-12-19 "stb_truetype: Add missing return keyword" + + Not currently needed + https://github.com/nothings/stb/pull/1418 + 2022-12-09 "stb_truetype: Support vertical layout" + + *** Applied *** + https://github.com/nothings/stb/pull/1389 + 2022-10-09 "stb_truetype: Missing a return in stbtt_GetGlyphBox" + + N/A (in removed comment) + https://github.com/nothings/stb/pull/1388 + 2022-10-09 "stb_truetype: Fix typo in comment (import -> important)" + + N/A (in unused `stbtt_GetFontBoundingBox()`) + https://github.com/nothings/stb/pull/1374 + 2022-09-13 "Added null checking for stbtt_GetFontBoundingBox" + + N/A (in removed comment) + https://github.com/nothings/stb/pull/1327 + 2022-05-19 "Fixed missing uppercase" + + Not currently needed + https://github.com/nothings/stb/pull/1320 + 2022-04-14 "stb_truetype: allow user defined STBTT_DEF" + + *** Applied *** + https://github.com/nothings/stb/issues/1316 + 2022-03-29 "stb_truetype: division by 0 in stbtt__fill_active_edges_new()" + + *** Applied *** + https://github.com/nothings/stb/issues/1296 + 2022-02-23 "[stb_truetype, MacOs] Heap buffer overflow in font Times.ttc stbtt_GetGlyphShape(glyph_index=38)" + + N/A (in removed comment) + https://github.com/nothings/stb/pull/1269 + 2021-12-29 "Add a codespell action and fix the typos it found" + + Not currently needed + https://github.com/nothings/stb/pull/1211 + 2021-09-21 "stb_truetype: added stbtt_ScaleForPixelWidth" + + Already fixed in v1.26 + https://github.com/nothings/stb/pull/1184 + 2021-08-02 "stb_truetype.h: Use STBTT_assert macro" + + N/A (closed PR - all such up to this date seem to be either N/A or fixed in v1.26) + https://github.com/nothings/stb/pull/1116 + 2021-03-23 "stb_truetype -- fix artifacts in generated SDF" + + Not currently needed + https://github.com/nothings/stb/pull/1037 + 2020-10-16 "stb_truetype Added a function for getting the default english name of a font" + + N/A (in removed comments) + https://github.com/nothings/stb/pull/758 + 2019-04-30 "stb_truetype: Fixed a memory leak in example code" + + "needs significant new work" + https://github.com/nothings/stb/pull/654 + 2018-09-10 "More robust. eg. loading wqy-microhei.ttc" +*/ +#ifdef STB_TRUETYPE_IMPLEMENTATION + #ifndef stbtt_uint8 + typedef unsigned char stbtt_uint8; + typedef signed char stbtt_int8; + typedef unsigned short stbtt_uint16; + typedef signed short stbtt_int16; + typedef unsigned int stbtt_uint32; + typedef signed int stbtt_int32; + #endif + + typedef char stbtt__check_size32[sizeof(stbtt_int32)==4 ? 1 : -1]; + typedef char stbtt__check_size16[sizeof(stbtt_int16)==2 ? 1 : -1]; + + #ifndef STBTT_ifloor + #include + #define STBTT_ifloor(x) ((int) floor(x)) + #define STBTT_iceil(x) ((int) ceil(x)) + #endif + + #ifndef STBTT_sqrt + #include + #define STBTT_sqrt(x) sqrt(x) + #endif + + #ifndef STBTT_fabs + #include + #define STBTT_fabs(x) fabs(x) + #endif + + #ifndef STBTT_malloc + #include + #define STBTT_malloc(x,u) ((void)(u),malloc(x)) + #define STBTT_free(x,u) ((void)(u),free(x)) + #endif + + #ifndef STBTT_assert + #include + #define STBTT_assert(x) assert(x) + #endif + + #ifndef STBTT_memcpy + #include + #define STBTT_memcpy memcpy + #define STBTT_memset memset + #endif +#endif + +#ifndef __STB_INCLUDE_STB_TRUETYPE_H__ +#define __STB_INCLUDE_STB_TRUETYPE_H__ + +#ifdef STBTT_STATIC +#define STBTT_DEF static +#else +#define STBTT_DEF extern +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct +{ + unsigned char *data; + int cursor; + int size; +} stbtt__buf; + +typedef struct stbtt_fontinfo stbtt_fontinfo; + +struct stbtt_fontinfo +{ + void * userdata; + unsigned char * data; /* pointer to .ttf file */ + int fontstart; /* offset of start of font */ + + int numGlyphs; /* number of glyphs, needed for range checking */ + + int loca,head,glyf,hhea,hmtx,kern,gpos,svg; /* table locations as offset from start of .ttf */ + int index_map; /* a cmap mapping for our chosen character encoding */ + int indexToLocFormat; /* format needed to map from glyph index to glyph */ + + stbtt__buf cff; /* cff font data */ + stbtt__buf charstrings; /* the charstring index */ + stbtt__buf gsubrs; /* global charstring subroutines index */ + stbtt__buf subrs; /* private charstring subroutines index */ + stbtt__buf fontdicts; /* array of font dicts */ + stbtt__buf fdselect; /* map from glyph to fontdict */ +}; + +/* ZINT: only require above in "font.h" so wrap following */ +#ifdef STB_TRUETYPE_IMPLEMENTATION + +#ifndef STBTT_vmove /* you can predefine these to use different values (but why?) */ + enum { + STBTT_vmove=1, + STBTT_vline, + STBTT_vcurve, + STBTT_vcubic + }; +#endif + +#ifndef stbtt_vertex /* you can predefine this to use different values */ + /* (we share this with other code at RAD) */ + #define stbtt_vertex_type short /* can't use stbtt_int16 because that's not visible in the header file */ + typedef struct + { + stbtt_vertex_type x,y,cx,cy,cx1,cy1; + unsigned char type,padding; + } stbtt_vertex; +#endif + +STBTT_DEF int stbtt_GetGlyphShape(const stbtt_fontinfo *info, int glyph_index, stbtt_vertex **vertices); + +typedef struct +{ + int w,h,stride; + unsigned char *pixels; +} stbtt__bitmap; + +/* some of the values for the IDs are below; for more see the truetype spec: */ +/* http://developer.apple.com/textfonts/TTRefMan/RM06/Chap6name.html */ +/* http://www.microsoft.com/typography/otspec/name.htm */ + +enum { /* platformID */ + STBTT_PLATFORM_ID_UNICODE =0, + STBTT_PLATFORM_ID_MAC =1, + STBTT_PLATFORM_ID_ISO =2, + STBTT_PLATFORM_ID_MICROSOFT =3 +}; + +enum { /* encodingID for STBTT_PLATFORM_ID_MICROSOFT */ + STBTT_MS_EID_SYMBOL =0, + STBTT_MS_EID_UNICODE_BMP =1, + STBTT_MS_EID_SHIFTJIS =2, + STBTT_MS_EID_UNICODE_FULL =10 +}; + +enum { /* languageID for STBTT_PLATFORM_ID_MICROSOFT; same as LCID... */ + /* problematic because there are e.g. 16 english LCIDs and 16 arabic LCIDs */ + STBTT_MS_LANG_ENGLISH =0x0409, STBTT_MS_LANG_ITALIAN =0x0410, + STBTT_MS_LANG_CHINESE =0x0804, STBTT_MS_LANG_JAPANESE =0x0411, + STBTT_MS_LANG_DUTCH =0x0413, STBTT_MS_LANG_KOREAN =0x0412, + STBTT_MS_LANG_FRENCH =0x040c, STBTT_MS_LANG_RUSSIAN =0x0419, + STBTT_MS_LANG_GERMAN =0x0407, STBTT_MS_LANG_SPANISH =0x0409, + STBTT_MS_LANG_HEBREW =0x040d, STBTT_MS_LANG_SWEDISH =0x041D +}; + +#endif /* ZINT: STB_TRUETYPE_IMPLEMENTATION */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STB_INCLUDE_STB_TRUETYPE_H__ */ + +#ifdef STB_TRUETYPE_IMPLEMENTATION + +#ifdef _MSC_VER +#define STBTT__NOTUSED(v) (void)(v) +#else +#define STBTT__NOTUSED(v) (void)sizeof(v) +#endif + +static stbtt_uint8 stbtt__buf_get8(stbtt__buf *b) +{ + if (b->cursor >= b->size) + return 0; + return b->data[b->cursor++]; +} + +static stbtt_uint8 stbtt__buf_peek8(stbtt__buf *b) +{ + if (b->cursor >= b->size) + return 0; + return b->data[b->cursor]; +} + +static void stbtt__buf_seek(stbtt__buf *b, int o) +{ + STBTT_assert(!(o > b->size || o < 0)); + b->cursor = (o > b->size || o < 0) ? b->size : o; +} + +static void stbtt__buf_skip(stbtt__buf *b, int o) +{ + stbtt__buf_seek(b, b->cursor + o); +} + +static stbtt_uint32 stbtt__buf_get(stbtt__buf *b, int n) +{ + stbtt_uint32 v = 0; + int i; + STBTT_assert(n >= 1 && n <= 4); + for (i = 0; i < n; i++) + v = (v << 8) | stbtt__buf_get8(b); + return v; +} + +static stbtt__buf stbtt__new_buf(const void *p, size_t size) +{ + stbtt__buf r; + STBTT_assert(size < 0x40000000); + r.data = (stbtt_uint8*) p; + r.size = (int) size; + r.cursor = 0; + return r; +} + +#define stbtt__buf_get16(b) stbtt__buf_get((b), 2) +#define stbtt__buf_get32(b) stbtt__buf_get((b), 4) + +static stbtt__buf stbtt__buf_range(const stbtt__buf *b, int o, int s) +{ + stbtt__buf r = stbtt__new_buf(NULL, 0); + if (o < 0 || s < 0 || o > b->size || s > b->size - o) return r; + r.data = b->data + o; + r.size = s; + return r; +} + +static stbtt__buf stbtt__cff_get_index(stbtt__buf *b) +{ + int count, start, offsize; + start = b->cursor; + count = stbtt__buf_get16(b); + if (count) { + offsize = stbtt__buf_get8(b); + STBTT_assert(offsize >= 1 && offsize <= 4); + stbtt__buf_skip(b, offsize * count); + stbtt__buf_skip(b, stbtt__buf_get(b, offsize) - 1); + } + return stbtt__buf_range(b, start, b->cursor - start); +} + +static stbtt_uint32 stbtt__cff_int(stbtt__buf *b) +{ + int b0 = stbtt__buf_get8(b); + if (b0 >= 32 && b0 <= 246) return b0 - 139; + else if (b0 >= 247 && b0 <= 250) return (b0 - 247)*256 + stbtt__buf_get8(b) + 108; + else if (b0 >= 251 && b0 <= 254) return -(b0 - 251)*256 - stbtt__buf_get8(b) - 108; + else if (b0 == 28) return stbtt__buf_get16(b); + else if (b0 == 29) return stbtt__buf_get32(b); + STBTT_assert(0); + return 0; +} + +static void stbtt__cff_skip_operand(stbtt__buf *b) { + int v, b0 = stbtt__buf_peek8(b); + STBTT_assert(b0 >= 28); + if (b0 == 30) { + stbtt__buf_skip(b, 1); + while (b->cursor < b->size) { + v = stbtt__buf_get8(b); + if ((v & 0xF) == 0xF || (v >> 4) == 0xF) + break; + } + } else { + stbtt__cff_int(b); + } +} + +static stbtt__buf stbtt__dict_get(stbtt__buf *b, int key) +{ + stbtt__buf_seek(b, 0); + while (b->cursor < b->size) { + int start = b->cursor, end, op; + while (stbtt__buf_peek8(b) >= 28) + stbtt__cff_skip_operand(b); + end = b->cursor; + op = stbtt__buf_get8(b); + if (op == 12) op = stbtt__buf_get8(b) | 0x100; + if (op == key) return stbtt__buf_range(b, start, end-start); + } + return stbtt__buf_range(b, 0, 0); +} + +static void stbtt__dict_get_ints(stbtt__buf *b, int key, int outcount, stbtt_uint32 *out) +{ + int i; + stbtt__buf operands = stbtt__dict_get(b, key); + for (i = 0; i < outcount && operands.cursor < operands.size; i++) + out[i] = stbtt__cff_int(&operands); +} + +static int stbtt__cff_index_count(stbtt__buf *b) +{ + stbtt__buf_seek(b, 0); + return stbtt__buf_get16(b); +} + +static stbtt__buf stbtt__cff_index_get(stbtt__buf b, int i) +{ + int count, offsize, start, end; + stbtt__buf_seek(&b, 0); + count = stbtt__buf_get16(&b); + offsize = stbtt__buf_get8(&b); + STBTT_assert(i >= 0 && i < count); + STBTT_assert(offsize >= 1 && offsize <= 4); + stbtt__buf_skip(&b, i*offsize); + start = stbtt__buf_get(&b, offsize); + end = stbtt__buf_get(&b, offsize); + return stbtt__buf_range(&b, 2+(count+1)*offsize+start, end - start); +} + +#define ttBYTE(p) (* (stbtt_uint8 *) (p)) +#define ttCHAR(p) (* (stbtt_int8 *) (p)) + +static stbtt_uint16 ttUSHORT(stbtt_uint8 *p) { return p[0]*256 + p[1]; } +static stbtt_int16 ttSHORT(stbtt_uint8 *p) { return p[0]*256 + p[1]; } +static stbtt_uint32 ttULONG(stbtt_uint8 *p) { return (p[0]<<24) + (p[1]<<16) + (p[2]<<8) + p[3]; } + +#define stbtt_tag4(p,c0,c1,c2,c3) ((p)[0] == (c0) && (p)[1] == (c1) && (p)[2] == (c2) && (p)[3] == (c3)) +#define stbtt_tag(p,str) stbtt_tag4(p,str[0],str[1],str[2],str[3]) + +static stbtt_uint32 stbtt__find_table(stbtt_uint8 *data, stbtt_uint32 fontstart, const char *tag) +{ + stbtt_int32 num_tables = ttUSHORT(data+fontstart+4); + stbtt_uint32 tabledir = fontstart + 12; + stbtt_int32 i; + for (i=0; i < num_tables; ++i) { + stbtt_uint32 loc = tabledir + 16*i; + if (stbtt_tag(data+loc+0, tag)) + return ttULONG(data+loc+8); + } + return 0; +} + +static stbtt__buf stbtt__get_subrs(stbtt__buf cff, stbtt__buf fontdict) +{ + stbtt_uint32 subrsoff = 0, private_loc[2] = { 0, 0 }; + stbtt__buf pdict; + stbtt__dict_get_ints(&fontdict, 18, 2, private_loc); + if (!private_loc[1] || !private_loc[0]) return stbtt__new_buf(NULL, 0); + pdict = stbtt__buf_range(&cff, private_loc[1], private_loc[0]); + stbtt__dict_get_ints(&pdict, 19, 1, &subrsoff); + if (!subrsoff) return stbtt__new_buf(NULL, 0); + stbtt__buf_seek(&cff, private_loc[1]+subrsoff); + return stbtt__cff_get_index(&cff); +} + +static int stbtt_InitFont_internal(stbtt_fontinfo *info, unsigned char *data, int fontstart) +{ + stbtt_uint32 cmap, t; + stbtt_int32 i,numTables; + + info->data = data; + info->fontstart = fontstart; + info->cff = stbtt__new_buf(NULL, 0); + + cmap = stbtt__find_table(data, fontstart, "cmap"); /* required */ + info->loca = stbtt__find_table(data, fontstart, "loca"); /* required */ + info->head = stbtt__find_table(data, fontstart, "head"); /* required */ + info->glyf = stbtt__find_table(data, fontstart, "glyf"); /* required */ + info->hhea = stbtt__find_table(data, fontstart, "hhea"); /* required */ + info->hmtx = stbtt__find_table(data, fontstart, "hmtx"); /* required */ + info->kern = stbtt__find_table(data, fontstart, "kern"); /* not required */ + info->gpos = stbtt__find_table(data, fontstart, "GPOS"); /* not required */ + + if (!cmap || !info->head || !info->hhea || !info->hmtx) + return 0; + if (info->glyf) { + /* required for truetype */ + if (!info->loca) return 0; + } else { + /* initialization for CFF / Type2 fonts (OTF) */ + stbtt__buf b, topdict, topdictidx; + stbtt_uint32 cstype = 2, charstrings = 0, fdarrayoff = 0, fdselectoff = 0; + stbtt_uint32 cff; + + cff = stbtt__find_table(data, fontstart, "CFF "); + if (!cff) return 0; + + info->fontdicts = stbtt__new_buf(NULL, 0); + info->fdselect = stbtt__new_buf(NULL, 0); + + info->cff = stbtt__new_buf(data+cff, 512*1024*1024); + b = info->cff; + + stbtt__buf_skip(&b, 2); + stbtt__buf_seek(&b, stbtt__buf_get8(&b)); /* hdrsize */ + + stbtt__cff_get_index(&b); /* name INDEX */ + topdictidx = stbtt__cff_get_index(&b); + topdict = stbtt__cff_index_get(topdictidx, 0); + stbtt__cff_get_index(&b); /* string INDEX */ + info->gsubrs = stbtt__cff_get_index(&b); + + stbtt__dict_get_ints(&topdict, 17, 1, &charstrings); + stbtt__dict_get_ints(&topdict, 0x100 | 6, 1, &cstype); + stbtt__dict_get_ints(&topdict, 0x100 | 36, 1, &fdarrayoff); + stbtt__dict_get_ints(&topdict, 0x100 | 37, 1, &fdselectoff); + info->subrs = stbtt__get_subrs(b, topdict); + + if (cstype != 2) return 0; + if (charstrings == 0) return 0; + + if (fdarrayoff) { + if (!fdselectoff) return 0; + stbtt__buf_seek(&b, fdarrayoff); + info->fontdicts = stbtt__cff_get_index(&b); + info->fdselect = stbtt__buf_range(&b, fdselectoff, b.size-fdselectoff); + } + + stbtt__buf_seek(&b, charstrings); + info->charstrings = stbtt__cff_get_index(&b); + } + + t = stbtt__find_table(data, fontstart, "maxp"); + if (t) + info->numGlyphs = ttUSHORT(data+t+4); + else + info->numGlyphs = 0xffff; + + info->svg = -1; + + numTables = ttUSHORT(data + cmap + 2); + info->index_map = 0; + for (i=0; i < numTables; ++i) { + stbtt_uint32 encoding_record = cmap + 4 + 8 * i; + switch(ttUSHORT(data+encoding_record)) { + case STBTT_PLATFORM_ID_MICROSOFT: + switch (ttUSHORT(data+encoding_record+2)) { + case STBTT_MS_EID_UNICODE_BMP: + case STBTT_MS_EID_UNICODE_FULL: + info->index_map = cmap + ttULONG(data+encoding_record+4); + break; + } + break; + case STBTT_PLATFORM_ID_UNICODE: + info->index_map = cmap + ttULONG(data+encoding_record+4); + break; + } + } + if (info->index_map == 0) + return 0; + + info->indexToLocFormat = ttUSHORT(data+info->head + 50); + return 1; +} + +STBTT_DEF int stbtt_FindGlyphIndex(const stbtt_fontinfo *info, int unicode_codepoint) +{ + stbtt_uint8 *data = info->data; + stbtt_uint32 index_map = info->index_map; + + stbtt_uint16 format = ttUSHORT(data + index_map + 0); + if (format == 0) { /* apple byte encoding */ + stbtt_int32 bytes = ttUSHORT(data + index_map + 2); + if (unicode_codepoint < bytes-6) + return ttBYTE(data + index_map + 6 + unicode_codepoint); + return 0; + } else if (format == 6) { + stbtt_uint32 first = ttUSHORT(data + index_map + 6); + stbtt_uint32 count = ttUSHORT(data + index_map + 8); + if ((stbtt_uint32) unicode_codepoint >= first && (stbtt_uint32) unicode_codepoint < first+count) + return ttUSHORT(data + index_map + 10 + (unicode_codepoint - first)*2); + return 0; + } else if (format == 2) { + STBTT_assert(0); /* @TODO: high-byte mapping for japanese/chinese/korean */ + return 0; + } else if (format == 4) { /* standard mapping for windows fonts: binary search collection of ranges */ + stbtt_uint16 segcount = ttUSHORT(data+index_map+6) >> 1; + stbtt_uint16 searchRange = ttUSHORT(data+index_map+8) >> 1; + stbtt_uint16 entrySelector = ttUSHORT(data+index_map+10); + stbtt_uint16 rangeShift = ttUSHORT(data+index_map+12) >> 1; + + /* do a binary search of the segments */ + stbtt_uint32 endCount = index_map + 14; + stbtt_uint32 search = endCount; + + if (unicode_codepoint > 0xffff) + return 0; + + /* they lie from endCount .. endCount + segCount */ + /* but searchRange is the nearest power of two, so... */ + if (unicode_codepoint >= ttUSHORT(data + search + rangeShift*2)) + search += rangeShift*2; + + search -= 2; + while (entrySelector) { + stbtt_uint16 end; + searchRange >>= 1; + end = ttUSHORT(data + search + searchRange*2); + if (unicode_codepoint > end) + search += searchRange*2; + --entrySelector; + } + search += 2; + + { + stbtt_uint16 offset, start, last, index; /* https://github.com/nothings/stb/pull/1923 */ + stbtt_int16 delta; /* https://github.com/nothings/stb/pull/1923 */ + stbtt_uint16 item = (stbtt_uint16) ((search - endCount) >> 1); + + start = ttUSHORT(data + index_map + 14 + segcount*2 + 2 + 2*item); + last = ttUSHORT(data + endCount + 2*item); + if (unicode_codepoint < start || unicode_codepoint > last) + return 0; + + delta = ttSHORT(data + index_map + 14 + segcount*4 + 2 + 2*item); /* https://github.com/nothings/stb/pull/1923 */ + offset = ttUSHORT(data + index_map + 14 + segcount*6 + 2 + 2*item); + if (offset == 0) + return (stbtt_uint16) (unicode_codepoint + delta); /* https://github.com/nothings/stb/pull/1923 */ + + /* https://github.com/nothings/stb/pull/1923 */ + index = ttUSHORT(data + offset + (unicode_codepoint-start)*2 + index_map + 14 + segcount*6 + 2 + 2*item); + if (index != 0) { + index = (stbtt_uint16) (index + delta); + } + + return index; /* https://github.com/nothings/stb/pull/1923 */ + } + } else if (format == 12 || format == 13) { + stbtt_uint32 ngroups = ttULONG(data+index_map+12); + stbtt_int32 low,high; + low = 0; high = (stbtt_int32)ngroups; + while (low < high) { + stbtt_int32 mid = low + ((high-low) >> 1); /* rounds down, so low <= mid < high */ + stbtt_uint32 start_char = ttULONG(data+index_map+16+mid*12); + stbtt_uint32 end_char = ttULONG(data+index_map+16+mid*12+4); + if ((stbtt_uint32) unicode_codepoint < start_char) + high = mid; + else if ((stbtt_uint32) unicode_codepoint > end_char) + low = mid+1; + else { + stbtt_uint32 start_glyph = ttULONG(data+index_map+16+mid*12+8); + if (format == 12) + return start_glyph + unicode_codepoint-start_char; + else /* format == 13 */ + return start_glyph; + } + } + return 0; /* not found */ + } + STBTT_assert(0); + return 0; +} + +static void stbtt_setvertex(stbtt_vertex *v, stbtt_uint8 type, stbtt_int32 x, stbtt_int32 y, stbtt_int32 cx, stbtt_int32 cy) +{ + v->type = type; + v->x = (stbtt_int16) x; + v->y = (stbtt_int16) y; + v->cx = (stbtt_int16) cx; + v->cy = (stbtt_int16) cy; +} + +static int stbtt__GetGlyfOffset(const stbtt_fontinfo *info, int glyph_index) +{ + int g1,g2; + + STBTT_assert(!info->cff.size); + + if (glyph_index >= info->numGlyphs) return -1; /* glyph index out of range */ + if (info->indexToLocFormat >= 2) return -1; /* unknown index->glyph map format */ + + if (info->indexToLocFormat == 0) { + g1 = info->glyf + ttUSHORT(info->data + info->loca + glyph_index * 2) * 2; + g2 = info->glyf + ttUSHORT(info->data + info->loca + glyph_index * 2 + 2) * 2; + } else { + g1 = info->glyf + ttULONG (info->data + info->loca + glyph_index * 4); + g2 = info->glyf + ttULONG (info->data + info->loca + glyph_index * 4 + 4); + } + + return g1==g2 ? -1 : g1; /* if length is 0, return -1 */ +} + +static int stbtt__close_shape(stbtt_vertex *vertices, int num_vertices, int was_off, int start_off, + stbtt_int32 sx, stbtt_int32 sy, stbtt_int32 scx, stbtt_int32 scy, stbtt_int32 cx, stbtt_int32 cy) +{ + if (start_off) { + if (was_off) + stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve, (cx+scx)>>1, (cy+scy)>>1, cx,cy); + stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve, sx,sy,scx,scy); + } else { + if (was_off) + stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve,sx,sy,cx,cy); + else + stbtt_setvertex(&vertices[num_vertices++], STBTT_vline,sx,sy,0,0); + } + return num_vertices; +} + +static int stbtt__GetGlyphShapeTT(const stbtt_fontinfo *info, int glyph_index, stbtt_vertex **pvertices) +{ + stbtt_int16 numberOfContours; + stbtt_uint8 *endPtsOfContours; + stbtt_uint8 *data = info->data; + stbtt_vertex *vertices=0; + int num_vertices=0; + int g = stbtt__GetGlyfOffset(info, glyph_index); + + *pvertices = NULL; + + if (g < 0) return 0; + + numberOfContours = ttSHORT(data + g); + + if (numberOfContours > 0) { + stbtt_uint8 flags=0,flagcount; + stbtt_int32 ins, i,j=0,m,n, next_move, was_off=0, off, start_off=0; + stbtt_int32 x,y,cx,cy,sx,sy, scx,scy; + stbtt_uint8 *points; + endPtsOfContours = (data + g + 10); + ins = ttUSHORT(data + g + 10 + numberOfContours * 2); + points = data + g + 10 + numberOfContours * 2 + 2 + ins; + + n = 1+ttUSHORT(endPtsOfContours + numberOfContours*2-2); + + m = n + 2*numberOfContours; /* a loose bound on how many vertices we might need */ + vertices = (stbtt_vertex *) STBTT_malloc(m * sizeof(vertices[0]), info->userdata); + if (vertices == 0) + return 0; + + next_move = 0; + flagcount=0; + + /* in first pass, we load uninterpreted data into the allocated array */ + /* above, shifted to the end of the array so we won't overwrite it when */ + /* we create our final data starting from the front */ + + off = m - n; /* starting offset for uninterpreted data, regardless of how m ends up being calculated */ + + /* first load flags */ + + for (i=0; i < n; ++i) { + if (flagcount == 0) { + flags = *points++; + if (flags & 8) + flagcount = *points++; + } else + --flagcount; + vertices[off+i].type = flags; + } + + /* now load x coordinates */ + x=0; + for (i=0; i < n; ++i) { + flags = vertices[off+i].type; + if (flags & 2) { + stbtt_int16 dx = *points++; + x += (flags & 16) ? dx : -dx; /* ??? */ + } else { + if (!(flags & 16)) { + x = x + (stbtt_int16) (points[0]*256 + points[1]); + points += 2; + } + } + vertices[off+i].x = (stbtt_int16) x; + } + + /* now load y coordinates */ + y=0; + for (i=0; i < n; ++i) { + flags = vertices[off+i].type; + if (flags & 4) { + stbtt_int16 dy = *points++; + y += (flags & 32) ? dy : -dy; /* ??? */ + } else { + if (!(flags & 32)) { + y = y + (stbtt_int16) (points[0]*256 + points[1]); + points += 2; + } + } + vertices[off+i].y = (stbtt_int16) y; + } + + /* now convert them to our format */ + num_vertices=0; + sx = sy = cx = cy = scx = scy = 0; + for (i=0; i < n; ++i) { + flags = vertices[off+i].type; + x = (stbtt_int16) vertices[off+i].x; + y = (stbtt_int16) vertices[off+i].y; + + if (next_move == i) { + if (i != 0) + num_vertices = stbtt__close_shape(vertices, num_vertices, was_off, start_off, sx,sy,scx,scy,cx,cy); + + /* now start the new one */ + start_off = !(flags & 1); + if (start_off && i + 1 < n) { /* https://github.com/nothings/stb/issues/1296 */ + /* if we start off with an off-curve point, then when we need to find a point on the curve */ + /* where we can start, and we need to save some state for when we wraparound. */ + scx = x; + scy = y; + if (!(vertices[off+i+1].type & 1)) { + /* next point is also a curve point, so interpolate an on-point curve */ + sx = (x + (stbtt_int32) vertices[off+i+1].x) >> 1; + sy = (y + (stbtt_int32) vertices[off+i+1].y) >> 1; + } else { + /* otherwise just use the next point as our start point */ + sx = (stbtt_int32) vertices[off+i+1].x; + sy = (stbtt_int32) vertices[off+i+1].y; + ++i; /* we're using point i+1 as the starting point, so skip it */ + } + } else { + sx = x; + sy = y; + } + stbtt_setvertex(&vertices[num_vertices++], STBTT_vmove,sx,sy,0,0); + was_off = 0; + next_move = 1 + ttUSHORT(endPtsOfContours+j*2); + ++j; + } else { + if (!(flags & 1)) { /* if it's a curve */ + if (was_off) /* two off-curve control points in a row means interpolate an on-curve midpoint */ + stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve, (cx+x)>>1, (cy+y)>>1, cx, cy); + cx = x; + cy = y; + was_off = 1; + } else { + if (was_off) + stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve, x,y, cx, cy); + else + stbtt_setvertex(&vertices[num_vertices++], STBTT_vline, x,y,0,0); + was_off = 0; + } + } + } + num_vertices = stbtt__close_shape(vertices, num_vertices, was_off, start_off, sx,sy,scx,scy,cx,cy); + } else if (numberOfContours < 0) { + /* Compound shapes. */ + int more = 1; + stbtt_uint8 *comp = data + g + 10; + num_vertices = 0; + vertices = 0; + while (more) { + stbtt_uint16 flags, gidx; + int comp_num_verts = 0, i; + stbtt_vertex *comp_verts = 0, *tmp = 0; + float mtx[6] = {1,0,0,1,0,0}, m, n; + + flags = ttSHORT(comp); comp+=2; + gidx = ttSHORT(comp); comp+=2; + + if (flags & 2) { /* XY values */ + if (flags & 1) { /* shorts */ + mtx[4] = ttSHORT(comp); comp+=2; + mtx[5] = ttSHORT(comp); comp+=2; + } else { + mtx[4] = ttCHAR(comp); comp+=1; + mtx[5] = ttCHAR(comp); comp+=1; + } + } + else { + /* @TODO handle matching point */ + STBTT_assert(0); + } + if (flags & (1<<3)) { /* WE_HAVE_A_SCALE */ + mtx[0] = mtx[3] = ttSHORT(comp)/16384.0f; comp+=2; + mtx[1] = mtx[2] = 0; + } else if (flags & (1<<6)) { /* WE_HAVE_AN_X_AND_YSCALE */ + mtx[0] = ttSHORT(comp)/16384.0f; comp+=2; + mtx[1] = mtx[2] = 0; + mtx[3] = ttSHORT(comp)/16384.0f; comp+=2; + } else if (flags & (1<<7)) { /* WE_HAVE_A_TWO_BY_TWO */ + mtx[0] = ttSHORT(comp)/16384.0f; comp+=2; + mtx[1] = ttSHORT(comp)/16384.0f; comp+=2; + mtx[2] = ttSHORT(comp)/16384.0f; comp+=2; + mtx[3] = ttSHORT(comp)/16384.0f; comp+=2; + } + + /* Find transformation scales. */ + m = (float) STBTT_sqrt(mtx[0]*mtx[0] + mtx[1]*mtx[1]); + n = (float) STBTT_sqrt(mtx[2]*mtx[2] + mtx[3]*mtx[3]); + + /* Get indexed glyph. */ + comp_num_verts = stbtt_GetGlyphShape(info, gidx, &comp_verts); + if (comp_num_verts > 0) { + /* Transform vertices. */ + for (i = 0; i < comp_num_verts; ++i) { + stbtt_vertex* v = &comp_verts[i]; + stbtt_vertex_type x,y; + x=v->x; y=v->y; + /* https://github.com/nothings/stb/pull/1756 */ + v->x = (stbtt_vertex_type)(mtx[0]*x + mtx[2]*y + mtx[4] * m); + v->y = (stbtt_vertex_type)(mtx[1]*x + mtx[3]*y + mtx[5] * n); + x=v->cx; y=v->cy; + /* https://github.com/nothings/stb/pull/1756 */ + v->cx = (stbtt_vertex_type)(mtx[0]*x + mtx[2]*y + mtx[4] * m); + v->cy = (stbtt_vertex_type)(mtx[1]*x + mtx[3]*y + mtx[5] * n); + } + /* Append vertices. */ + tmp = (stbtt_vertex*)STBTT_malloc((num_vertices+comp_num_verts)*sizeof(stbtt_vertex), info->userdata); + if (!tmp) { + if (vertices) STBTT_free(vertices, info->userdata); + if (comp_verts) STBTT_free(comp_verts, info->userdata); + return 0; + } + if (num_vertices > 0 && vertices) STBTT_memcpy(tmp, vertices, num_vertices*sizeof(stbtt_vertex)); + STBTT_memcpy(tmp+num_vertices, comp_verts, comp_num_verts*sizeof(stbtt_vertex)); + if (vertices) STBTT_free(vertices, info->userdata); + vertices = tmp; + STBTT_free(comp_verts, info->userdata); + num_vertices += comp_num_verts; + } + /* More components ? */ + more = flags & (1<<5); + } + } else { + /* numberOfCounters == 0, do nothing */ + } + + *pvertices = vertices; + return num_vertices; +} + +typedef struct +{ + int bounds; + int started; + float first_x, first_y; + float x, y; + stbtt_int32 min_x, max_x, min_y, max_y; + + stbtt_vertex *pvertices; + int num_vertices; +} stbtt__csctx; + +#define STBTT__CSCTX_INIT(bounds) {bounds,0, 0,0, 0,0, 0,0,0,0, NULL, 0} + +static void stbtt__track_vertex(stbtt__csctx *c, stbtt_int32 x, stbtt_int32 y) +{ + if (x > c->max_x || !c->started) c->max_x = x; + if (y > c->max_y || !c->started) c->max_y = y; + if (x < c->min_x || !c->started) c->min_x = x; + if (y < c->min_y || !c->started) c->min_y = y; + c->started = 1; +} + +static void stbtt__csctx_v(stbtt__csctx *c, stbtt_uint8 type, stbtt_int32 x, stbtt_int32 y, stbtt_int32 cx, stbtt_int32 cy, stbtt_int32 cx1, stbtt_int32 cy1) +{ + if (c->bounds) { + stbtt__track_vertex(c, x, y); + if (type == STBTT_vcubic) { + stbtt__track_vertex(c, cx, cy); + stbtt__track_vertex(c, cx1, cy1); + } + } else { + stbtt_setvertex(&c->pvertices[c->num_vertices], type, x, y, cx, cy); + c->pvertices[c->num_vertices].cx1 = (stbtt_int16) cx1; + c->pvertices[c->num_vertices].cy1 = (stbtt_int16) cy1; + } + c->num_vertices++; +} + +static void stbtt__csctx_close_shape(stbtt__csctx *ctx) +{ + if (ctx->first_x != ctx->x || ctx->first_y != ctx->y) + stbtt__csctx_v(ctx, STBTT_vline, (int)ctx->first_x, (int)ctx->first_y, 0, 0, 0, 0); +} + +static void stbtt__csctx_rmove_to(stbtt__csctx *ctx, float dx, float dy) +{ + stbtt__csctx_close_shape(ctx); + ctx->first_x = ctx->x = ctx->x + dx; + ctx->first_y = ctx->y = ctx->y + dy; + stbtt__csctx_v(ctx, STBTT_vmove, (int)ctx->x, (int)ctx->y, 0, 0, 0, 0); +} + +static void stbtt__csctx_rline_to(stbtt__csctx *ctx, float dx, float dy) +{ + ctx->x += dx; + ctx->y += dy; + stbtt__csctx_v(ctx, STBTT_vline, (int)ctx->x, (int)ctx->y, 0, 0, 0, 0); +} + +static void stbtt__csctx_rccurve_to(stbtt__csctx *ctx, float dx1, float dy1, float dx2, float dy2, float dx3, float dy3) +{ + float cx1 = ctx->x + dx1; + float cy1 = ctx->y + dy1; + float cx2 = cx1 + dx2; + float cy2 = cy1 + dy2; + ctx->x = cx2 + dx3; + ctx->y = cy2 + dy3; + stbtt__csctx_v(ctx, STBTT_vcubic, (int)ctx->x, (int)ctx->y, (int)cx1, (int)cy1, (int)cx2, (int)cy2); +} + +static stbtt__buf stbtt__get_subr(stbtt__buf idx, int n) +{ + int count = stbtt__cff_index_count(&idx); + int bias = 107; + if (count >= 33900) + bias = 32768; + else if (count >= 1240) + bias = 1131; + n += bias; + if (n < 0 || n >= count) + return stbtt__new_buf(NULL, 0); + return stbtt__cff_index_get(idx, n); +} + +static stbtt__buf stbtt__cid_get_glyph_subrs(const stbtt_fontinfo *info, int glyph_index) +{ + stbtt__buf fdselect = info->fdselect; + int nranges, start, end, v, fmt, fdselector = -1, i; + + stbtt__buf_seek(&fdselect, 0); + fmt = stbtt__buf_get8(&fdselect); + if (fmt == 0) { + /* untested */ + stbtt__buf_skip(&fdselect, glyph_index); + fdselector = stbtt__buf_get8(&fdselect); + } else if (fmt == 3) { + nranges = stbtt__buf_get16(&fdselect); + start = stbtt__buf_get16(&fdselect); + for (i = 0; i < nranges; i++) { + v = stbtt__buf_get8(&fdselect); + end = stbtt__buf_get16(&fdselect); + if (glyph_index >= start && glyph_index < end) { + fdselector = v; + break; + } + start = end; + } + } + if (fdselector == -1) return stbtt__new_buf(NULL, 0); /* https://github.com/nothings/stb/pull/1422 */ + return stbtt__get_subrs(info->cff, stbtt__cff_index_get(info->fontdicts, fdselector)); +} + +static int stbtt__run_charstring(const stbtt_fontinfo *info, int glyph_index, stbtt__csctx *c) +{ + int in_header = 1, maskbits = 0, subr_stack_height = 0, sp = 0, v, i, b0; + int has_subrs = 0, clear_stack; + float s[48]; + stbtt__buf subr_stack[10], subrs = info->subrs, b; + float f; + +#define STBTT__CSERR(s) (0) + + /* this currently ignores the initial width value, which isn't needed if we have hmtx */ + b = stbtt__cff_index_get(info->charstrings, glyph_index); + while (b.cursor < b.size) { + i = 0; + clear_stack = 1; + b0 = stbtt__buf_get8(&b); + switch (b0) { + /* @TODO implement hinting */ + case 0x13: /* hintmask */ + case 0x14: /* cntrmask */ + if (in_header) + maskbits += (sp / 2); /* implicit "vstem" */ + in_header = 0; + stbtt__buf_skip(&b, (maskbits + 7) / 8); + break; + + case 0x01: /* hstem */ + case 0x03: /* vstem */ + case 0x12: /* hstemhm */ + case 0x17: /* vstemhm */ + maskbits += (sp / 2); + break; + + case 0x15: /* rmoveto */ + in_header = 0; + if (sp < 2) return STBTT__CSERR("rmoveto stack"); + stbtt__csctx_rmove_to(c, s[sp-2], s[sp-1]); + break; + case 0x04: /* vmoveto */ + in_header = 0; + if (sp < 1) return STBTT__CSERR("vmoveto stack"); + stbtt__csctx_rmove_to(c, 0, s[sp-1]); + break; + case 0x16: /* hmoveto */ + in_header = 0; + if (sp < 1) return STBTT__CSERR("hmoveto stack"); + stbtt__csctx_rmove_to(c, s[sp-1], 0); + break; + + case 0x05: /* rlineto */ + if (sp < 2) return STBTT__CSERR("rlineto stack"); + for (; i + 1 < sp; i += 2) + stbtt__csctx_rline_to(c, s[i], s[i+1]); + break; + + /* hlineto/vlineto and vhcurveto/hvcurveto alternate horizontal and vertical */ + /* starting from a different place. */ + + case 0x07: /* vlineto */ + if (sp < 1) return STBTT__CSERR("vlineto stack"); + goto vlineto; + case 0x06: /* hlineto */ + if (sp < 1) return STBTT__CSERR("hlineto stack"); + for (;;) { + if (i >= sp) break; + stbtt__csctx_rline_to(c, s[i], 0); + i++; + vlineto: + if (i >= sp) break; + stbtt__csctx_rline_to(c, 0, s[i]); + i++; + } + break; + + case 0x1F: /* hvcurveto */ + if (sp < 4) return STBTT__CSERR("hvcurveto stack"); + goto hvcurveto; + case 0x1E: /* vhcurveto */ + if (sp < 4) return STBTT__CSERR("vhcurveto stack"); + for (;;) { + if (i + 3 >= sp) break; + stbtt__csctx_rccurve_to(c, 0, s[i], s[i+1], s[i+2], s[i+3], (sp - i == 5) ? s[i + 4] : 0.0f); + i += 4; + hvcurveto: + if (i + 3 >= sp) break; + stbtt__csctx_rccurve_to(c, s[i], 0, s[i+1], s[i+2], (sp - i == 5) ? s[i+4] : 0.0f, s[i+3]); + i += 4; + } + break; + + case 0x08: /* rrcurveto */ + if (sp < 6) return STBTT__CSERR("rcurveline stack"); + for (; i + 5 < sp; i += 6) + stbtt__csctx_rccurve_to(c, s[i], s[i+1], s[i+2], s[i+3], s[i+4], s[i+5]); + break; + + case 0x18: /* rcurveline */ + if (sp < 8) return STBTT__CSERR("rcurveline stack"); + for (; i + 5 < sp - 2; i += 6) + stbtt__csctx_rccurve_to(c, s[i], s[i+1], s[i+2], s[i+3], s[i+4], s[i+5]); + if (i + 1 >= sp) return STBTT__CSERR("rcurveline stack"); + stbtt__csctx_rline_to(c, s[i], s[i+1]); + break; + + case 0x19: /* rlinecurve */ + if (sp < 8) return STBTT__CSERR("rlinecurve stack"); + for (; i + 1 < sp - 6; i += 2) + stbtt__csctx_rline_to(c, s[i], s[i+1]); + if (i + 5 >= sp) return STBTT__CSERR("rlinecurve stack"); + stbtt__csctx_rccurve_to(c, s[i], s[i+1], s[i+2], s[i+3], s[i+4], s[i+5]); + break; + + case 0x1A: /* vvcurveto */ + case 0x1B: /* hhcurveto */ + if (sp < 4) return STBTT__CSERR("(vv|hh)curveto stack"); + f = 0.0; + if (sp & 1) { f = s[i]; i++; } + for (; i + 3 < sp; i += 4) { + if (b0 == 0x1B) + stbtt__csctx_rccurve_to(c, s[i], f, s[i+1], s[i+2], s[i+3], 0.0); + else + stbtt__csctx_rccurve_to(c, f, s[i], s[i+1], s[i+2], 0.0, s[i+3]); + f = 0.0; + } + break; + + case 0x0A: /* callsubr */ + if (!has_subrs) { + if (info->fdselect.size) + subrs = stbtt__cid_get_glyph_subrs(info, glyph_index); + has_subrs = 1; + } + /* FALLTHROUGH */ + case 0x1D: /* callgsubr */ + if (sp < 1) return STBTT__CSERR("call(g|)subr stack"); + v = (int) s[--sp]; + if (subr_stack_height >= 10) return STBTT__CSERR("recursion limit"); + subr_stack[subr_stack_height++] = b; + b = stbtt__get_subr(b0 == 0x0A ? subrs : info->gsubrs, v); + if (b.size == 0) return STBTT__CSERR("subr not found"); + b.cursor = 0; + clear_stack = 0; + break; + + case 0x0B: /* return */ + if (subr_stack_height <= 0) return STBTT__CSERR("return outside subr"); + b = subr_stack[--subr_stack_height]; + clear_stack = 0; + break; + + case 0x0E: /* endchar */ + stbtt__csctx_close_shape(c); + return 1; + + case 0x0C: { /* two-byte escape */ + float dx1, dx2, dx3, dx4, dx5, dx6, dy1, dy2, dy3, dy4, dy5, dy6; + float dx, dy; + int b1 = stbtt__buf_get8(&b); + switch (b1) { + /* @TODO These "flex" implementations ignore the flex-depth and resolution, */ + /* and always draw beziers. */ + case 0x22: /* hflex */ + if (sp < 7) return STBTT__CSERR("hflex stack"); + dx1 = s[0]; + dx2 = s[1]; + dy2 = s[2]; + dx3 = s[3]; + dx4 = s[4]; + dx5 = s[5]; + dx6 = s[6]; + stbtt__csctx_rccurve_to(c, dx1, 0, dx2, dy2, dx3, 0); + stbtt__csctx_rccurve_to(c, dx4, 0, dx5, -dy2, dx6, 0); + break; + + case 0x23: /* flex */ + if (sp < 13) return STBTT__CSERR("flex stack"); + dx1 = s[0]; + dy1 = s[1]; + dx2 = s[2]; + dy2 = s[3]; + dx3 = s[4]; + dy3 = s[5]; + dx4 = s[6]; + dy4 = s[7]; + dx5 = s[8]; + dy5 = s[9]; + dx6 = s[10]; + dy6 = s[11]; + /* fd is s[12] */ + stbtt__csctx_rccurve_to(c, dx1, dy1, dx2, dy2, dx3, dy3); + stbtt__csctx_rccurve_to(c, dx4, dy4, dx5, dy5, dx6, dy6); + break; + + case 0x24: /* hflex1 */ + if (sp < 9) return STBTT__CSERR("hflex1 stack"); + dx1 = s[0]; + dy1 = s[1]; + dx2 = s[2]; + dy2 = s[3]; + dx3 = s[4]; + dx4 = s[5]; + dx5 = s[6]; + dy5 = s[7]; + dx6 = s[8]; + stbtt__csctx_rccurve_to(c, dx1, dy1, dx2, dy2, dx3, 0); + stbtt__csctx_rccurve_to(c, dx4, 0, dx5, dy5, dx6, -(dy1+dy2+dy5)); + break; + + case 0x25: /* flex1 */ + if (sp < 11) return STBTT__CSERR("flex1 stack"); + dx1 = s[0]; + dy1 = s[1]; + dx2 = s[2]; + dy2 = s[3]; + dx3 = s[4]; + dy3 = s[5]; + dx4 = s[6]; + dy4 = s[7]; + dx5 = s[8]; + dy5 = s[9]; + dx6 = dy6 = s[10]; + dx = dx1+dx2+dx3+dx4+dx5; + dy = dy1+dy2+dy3+dy4+dy5; + if (STBTT_fabs(dx) > STBTT_fabs(dy)) + dy6 = -dy; + else + dx6 = -dx; + stbtt__csctx_rccurve_to(c, dx1, dy1, dx2, dy2, dx3, dy3); + stbtt__csctx_rccurve_to(c, dx4, dy4, dx5, dy5, dx6, dy6); + break; + + default: + return STBTT__CSERR("unimplemented"); + } + } break; + + default: + if (b0 != 255 && b0 != 28 && b0 < 32) + return STBTT__CSERR("reserved operator"); + + /* push immediate */ + if (b0 == 255) { + f = (float)(stbtt_int32)stbtt__buf_get32(&b) / 0x10000; + } else { + stbtt__buf_skip(&b, -1); + f = (float)(stbtt_int16)stbtt__cff_int(&b); + } + if (sp >= 48) return STBTT__CSERR("push stack overflow"); + s[sp++] = f; + clear_stack = 0; + break; + } + if (clear_stack) sp = 0; + } + return STBTT__CSERR("no endchar"); + +#undef STBTT__CSERR +} + +static int stbtt__GetGlyphInfoT2(const stbtt_fontinfo *info, int glyph_index, int *x0, int *y0, int *x1, int *y1) +{ + stbtt__csctx c = STBTT__CSCTX_INIT(1); + int r = stbtt__run_charstring(info, glyph_index, &c); + if (x0) *x0 = r ? c.min_x : 0; + if (y0) *y0 = r ? c.min_y : 0; + if (x1) *x1 = r ? c.max_x : 0; + if (y1) *y1 = r ? c.max_y : 0; + return r ? c.num_vertices : 0; +} + +static int stbtt__GetGlyphShapeT2(const stbtt_fontinfo *info, int glyph_index, stbtt_vertex **pvertices) +{ + /* runs the charstring twice, once to count and once to output (to avoid realloc) */ + stbtt__csctx count_ctx = STBTT__CSCTX_INIT(1); + stbtt__csctx output_ctx = STBTT__CSCTX_INIT(0); + if (stbtt__run_charstring(info, glyph_index, &count_ctx)) { + *pvertices = (stbtt_vertex*)STBTT_malloc(count_ctx.num_vertices*sizeof(stbtt_vertex), info->userdata); + output_ctx.pvertices = *pvertices; + if (stbtt__run_charstring(info, glyph_index, &output_ctx)) { + STBTT_assert(output_ctx.num_vertices == count_ctx.num_vertices); + return output_ctx.num_vertices; + } + } + *pvertices = NULL; + return 0; +} + +STBTT_DEF int stbtt_GetGlyphShape(const stbtt_fontinfo *info, int glyph_index, stbtt_vertex **pvertices) +{ + if (!info->cff.size) + return stbtt__GetGlyphShapeTT(info, glyph_index, pvertices); + else + return stbtt__GetGlyphShapeT2(info, glyph_index, pvertices); +} + +STBTT_DEF void stbtt_GetGlyphHMetrics(const stbtt_fontinfo *info, int glyph_index, int *advanceWidth, int *leftSideBearing) +{ + stbtt_uint16 numOfLongHorMetrics = ttUSHORT(info->data+info->hhea + 34); + if (glyph_index < numOfLongHorMetrics) { + if (advanceWidth) *advanceWidth = ttSHORT(info->data + info->hmtx + 4*glyph_index); + if (leftSideBearing) *leftSideBearing = ttSHORT(info->data + info->hmtx + 4*glyph_index + 2); + } else { + if (advanceWidth) *advanceWidth = ttSHORT(info->data + info->hmtx + 4*(numOfLongHorMetrics-1)); + if (leftSideBearing) *leftSideBearing = ttSHORT(info->data + info->hmtx + 4*numOfLongHorMetrics + 2*(glyph_index - numOfLongHorMetrics)); + } +} + +static int stbtt__GetGlyphKernInfoAdvance(const stbtt_fontinfo *info, int glyph1, int glyph2) +{ + stbtt_uint8 *data = info->data + info->kern; + stbtt_uint32 needle, straw; + int l, r, m; + + /* we only look at the first table. it must be 'horizontal' and format 0. */ + if (!info->kern) + return 0; + if (ttUSHORT(data+2) < 1) /* number of tables, need at least 1 */ + return 0; + if (ttUSHORT(data+8) != 1) /* horizontal flag must be set in format */ + return 0; + + l = 0; + r = ttUSHORT(data+10) - 1; + needle = glyph1 << 16 | glyph2; + while (l <= r) { + m = (l + r) >> 1; + straw = ttULONG(data+18+(m*6)); /* note: unaligned read */ + if (needle < straw) + r = m - 1; + else if (needle > straw) + l = m + 1; + else + return ttSHORT(data+22+(m*6)); + } + return 0; +} + +static stbtt_int32 stbtt__GetCoverageIndex(stbtt_uint8 *coverageTable, int glyph) +{ + stbtt_uint16 coverageFormat = ttUSHORT(coverageTable); + switch (coverageFormat) { + case 1: { + stbtt_uint16 glyphCount = ttUSHORT(coverageTable + 2); + + /* Binary search. */ + stbtt_int32 l=0, r=glyphCount-1, m; + int straw, needle=glyph; + while (l <= r) { + stbtt_uint8 *glyphArray = coverageTable + 4; + stbtt_uint16 glyphID; + m = (l + r) >> 1; + glyphID = ttUSHORT(glyphArray + 2 * m); + straw = glyphID; + if (needle < straw) + r = m - 1; + else if (needle > straw) + l = m + 1; + else { + return m; + } + } + break; + } + + case 2: { + stbtt_uint16 rangeCount = ttUSHORT(coverageTable + 2); + stbtt_uint8 *rangeArray = coverageTable + 4; + + /* Binary search. */ + stbtt_int32 l=0, r=rangeCount-1, m; + int strawStart, strawEnd, needle=glyph; + while (l <= r) { + stbtt_uint8 *rangeRecord; + m = (l + r) >> 1; + rangeRecord = rangeArray + 6 * m; + strawStart = ttUSHORT(rangeRecord); + strawEnd = ttUSHORT(rangeRecord + 2); + if (needle < strawStart) + r = m - 1; + else if (needle > strawEnd) + l = m + 1; + else { + stbtt_uint16 startCoverageIndex = ttUSHORT(rangeRecord + 4); + return startCoverageIndex + glyph - strawStart; + } + } + break; + } + + default: return -1; /* unsupported */ + } + + return -1; +} + +static stbtt_int32 stbtt__GetGlyphClass(stbtt_uint8 *classDefTable, int glyph) +{ + stbtt_uint16 classDefFormat = ttUSHORT(classDefTable); + switch (classDefFormat) + { + case 1: { + stbtt_uint16 startGlyphID = ttUSHORT(classDefTable + 2); + stbtt_uint16 glyphCount = ttUSHORT(classDefTable + 4); + stbtt_uint8 *classDef1ValueArray = classDefTable + 6; + + if (glyph >= startGlyphID && glyph < startGlyphID + glyphCount) + return (stbtt_int32)ttUSHORT(classDef1ValueArray + 2 * (glyph - startGlyphID)); + break; + } + + case 2: { + stbtt_uint16 classRangeCount = ttUSHORT(classDefTable + 2); + stbtt_uint8 *classRangeRecords = classDefTable + 4; + + /* Binary search. */ + stbtt_int32 l=0, r=classRangeCount-1, m; + int strawStart, strawEnd, needle=glyph; + while (l <= r) { + stbtt_uint8 *classRangeRecord; + m = (l + r) >> 1; + classRangeRecord = classRangeRecords + 6 * m; + strawStart = ttUSHORT(classRangeRecord); + strawEnd = ttUSHORT(classRangeRecord + 2); + if (needle < strawStart) + r = m - 1; + else if (needle > strawEnd) + l = m + 1; + else + return (stbtt_int32)ttUSHORT(classRangeRecord + 4); + } + break; + } + + default: + return -1; /* Unsupported definition type, return an error. */ + } + + /* "All glyphs not assigned to a class fall into class 0". (OpenType spec) */ + return 0; +} + +static stbtt_int32 stbtt__GetGlyphGPOSInfoAdvance(const stbtt_fontinfo *info, int glyph1, int glyph2) +{ + stbtt_uint16 lookupListOffset; + stbtt_uint8 *lookupList; + stbtt_uint16 lookupCount; + stbtt_uint8 *data; + stbtt_int32 i, sti; + + if (!info->gpos) return 0; + + data = info->data + info->gpos; + + if (ttUSHORT(data+0) != 1) return 0; /* Major version 1 */ + if (ttUSHORT(data+2) != 0) return 0; /* Minor version 0 */ + + lookupListOffset = ttUSHORT(data+8); + lookupList = data + lookupListOffset; + lookupCount = ttUSHORT(lookupList); + + for (i=0; i= pairSetCount) return 0; + + needle=glyph2; + r=pairValueCount-1; + l=0; + + /* Binary search. */ + while (l <= r) { + stbtt_uint16 secondGlyph; + stbtt_uint8 *pairValue; + m = (l + r) >> 1; + pairValue = pairValueArray + (2 + valueRecordPairSizeInBytes) * m; + secondGlyph = ttUSHORT(pairValue); + straw = secondGlyph; + if (needle < straw) + r = m - 1; + else if (needle > straw) + l = m + 1; + else { + stbtt_int16 xAdvance = ttSHORT(pairValue + 2); + return xAdvance; + } + } + } else + return 0; + break; + } + + case 2: { + stbtt_uint16 valueFormat1 = ttUSHORT(table + 4); + stbtt_uint16 valueFormat2 = ttUSHORT(table + 6); + if (valueFormat1 == 4 && valueFormat2 == 0) { /* Support more formats? */ + stbtt_uint16 classDef1Offset = ttUSHORT(table + 8); + stbtt_uint16 classDef2Offset = ttUSHORT(table + 10); + int glyph1class = stbtt__GetGlyphClass(table + classDef1Offset, glyph1); + int glyph2class = stbtt__GetGlyphClass(table + classDef2Offset, glyph2); + + stbtt_uint16 class1Count = ttUSHORT(table + 12); + stbtt_uint16 class2Count = ttUSHORT(table + 14); + stbtt_uint8 *class1Records, *class2Records; + stbtt_int16 xAdvance; + + if (glyph1class < 0 || glyph1class >= class1Count) return 0; /* malformed */ + if (glyph2class < 0 || glyph2class >= class2Count) return 0; /* malformed */ + + class1Records = table + 16; + class2Records = class1Records + 2 * (glyph1class * class2Count); + xAdvance = ttSHORT(class2Records + 2 * glyph2class); + return xAdvance; + } else + return 0; + break; + } + + default: + return 0; /* Unsupported position format */ + } + } + } + + return 0; +} + +STBTT_DEF int stbtt_GetGlyphKernAdvance(const stbtt_fontinfo *info, int g1, int g2) +{ + /* https://github.com/nothings/stb/pull/1705 */ + if (info->gpos) { + int xAdvance = stbtt__GetGlyphGPOSInfoAdvance(info, g1, g2); + if (xAdvance) return xAdvance; + } + if (info->kern) + return stbtt__GetGlyphKernInfoAdvance(info, g1, g2); + + return 0; +} + +STBTT_DEF void stbtt_GetFontVMetrics(const stbtt_fontinfo *info, int *ascent, int *descent, int *lineGap) +{ + if (ascent ) *ascent = ttSHORT(info->data+info->hhea + 4); + if (descent) *descent = ttSHORT(info->data+info->hhea + 6); + if (lineGap) *lineGap = ttSHORT(info->data+info->hhea + 8); +} + +STBTT_DEF float stbtt_ScaleForMappingEmToPixels(const stbtt_fontinfo *info, float pixels) +{ + int unitsPerEm = ttUSHORT(info->data + info->head + 18); + return pixels / unitsPerEm; +} + +static int stbtt__GetGlyphInfoT2(const stbtt_fontinfo *info, int glyph_index, int *x0, int *y0, int *x1, int *y1); + +STBTT_DEF int stbtt_GetGlyphBox(const stbtt_fontinfo *info, int glyph_index, int *x0, int *y0, int *x1, int *y1) +{ + if (info->cff.size) { + return stbtt__GetGlyphInfoT2(info, glyph_index, x0, y0, x1, y1); /* https://github.com/nothings/stb/pull/1389 */ + } else { + int g = stbtt__GetGlyfOffset(info, glyph_index); + if (g < 0) return 0; + + if (x0) *x0 = ttSHORT(info->data + g + 2); + if (y0) *y0 = ttSHORT(info->data + g + 4); + if (x1) *x1 = ttSHORT(info->data + g + 6); + if (y1) *y1 = ttSHORT(info->data + g + 8); + } + return 1; +} + +STBTT_DEF void stbtt_GetGlyphBitmapBoxSubpixel(const stbtt_fontinfo *font, int glyph, float scale_x, float scale_y,float shift_x, float shift_y, int *ix0, int *iy0, int *ix1, int *iy1) +{ + int x0=0,y0=0,x1,y1; /* =0 suppresses compiler warning */ + if (!stbtt_GetGlyphBox(font, glyph, &x0,&y0,&x1,&y1)) { + /* e.g. space character */ + if (ix0) *ix0 = 0; + if (iy0) *iy0 = 0; + if (ix1) *ix1 = 0; + if (iy1) *iy1 = 0; + } else { + /* move to integral bboxes (treating pixels as little squares, what pixels get touched)? */ + if (ix0) *ix0 = STBTT_ifloor( x0 * scale_x + shift_x); + if (iy0) *iy0 = STBTT_ifloor(-y1 * scale_y + shift_y); + if (ix1) *ix1 = STBTT_iceil ( x1 * scale_x + shift_x); + if (iy1) *iy1 = STBTT_iceil (-y0 * scale_y + shift_y); + } +} + +/****************************************************************************/ +/**/ +/* Rasterizer */ + +typedef struct stbtt__hheap_chunk +{ + struct stbtt__hheap_chunk *next; +} stbtt__hheap_chunk; + +typedef struct stbtt__hheap +{ + struct stbtt__hheap_chunk *head; + void *first_free; + int num_remaining_in_head_chunk; +} stbtt__hheap; + +static void *stbtt__hheap_alloc(stbtt__hheap *hh, size_t size, void *userdata) +{ + if (hh->first_free) { + void *p = hh->first_free; + hh->first_free = * (void **) p; + return p; + } else { + if (hh->num_remaining_in_head_chunk == 0) { + int count = (size < 32 ? 2000 : size < 128 ? 800 : 100); + stbtt__hheap_chunk *c = (stbtt__hheap_chunk *) STBTT_malloc(sizeof(stbtt__hheap_chunk) + size * count, userdata); + if (c == NULL) + return NULL; + c->next = hh->head; + hh->head = c; + hh->num_remaining_in_head_chunk = count; + } + --hh->num_remaining_in_head_chunk; + return (char *) (hh->head) + sizeof(stbtt__hheap_chunk) + size * hh->num_remaining_in_head_chunk; + } +} + +static void stbtt__hheap_free(stbtt__hheap *hh, void *p) +{ + *(void **) p = hh->first_free; + hh->first_free = p; +} + +static void stbtt__hheap_cleanup(stbtt__hheap *hh, void *userdata) +{ + stbtt__hheap_chunk *c = hh->head; + while (c) { + stbtt__hheap_chunk *n = c->next; + STBTT_free(c, userdata); + c = n; + } +} + +typedef struct stbtt__edge { + float x0,y0, x1,y1; + int invert; +} stbtt__edge; + +typedef struct stbtt__active_edge +{ + struct stbtt__active_edge *next; + float fx,fdx,fdy; + float direction; + float sy; + float ey; +} stbtt__active_edge; + +static stbtt__active_edge *stbtt__new_active(stbtt__hheap *hh, stbtt__edge *e, int off_x, float start_point, void *userdata) +{ + stbtt__active_edge *z = (stbtt__active_edge *) stbtt__hheap_alloc(hh, sizeof(*z), userdata); + float dxdy = (e->x1 - e->x0) / (e->y1 - e->y0); + STBTT_assert(z != NULL); + /* STBTT_assert(e->y0 <= start_point); */ + if (!z) return z; + z->fdx = dxdy; + z->fdy = dxdy != 0.0f ? (1.0f/dxdy) : 0.0f; + z->fx = e->x0 + dxdy * (start_point - e->y0); + z->fx -= off_x; + z->direction = e->invert ? 1.0f : -1.0f; + z->sy = e->y0; + z->ey = e->y1; + z->next = 0; + return z; +} + +/* the edge passed in here does not cross the vertical line at x or the vertical line at x+1 */ +/* (i.e. it has already been clipped to those) */ +static void stbtt__handle_clipped_edge(float *scanline, int x, stbtt__active_edge *e, float x0, float y0, float x1, float y1) +{ + if (y0 == y1) return; + STBTT_assert(y0 < y1); + STBTT_assert(e->sy <= e->ey); + if (y0 > e->ey) return; + if (y1 < e->sy) return; + if (y0 < e->sy) { + x0 += (x1-x0) * (e->sy - y0) / (y1-y0); + y0 = e->sy; + } + if (y1 > e->ey) { + x1 += (x1-x0) * (e->ey - y1) / (y1-y0); + y1 = e->ey; + } + + if (x0 == x) + STBTT_assert(x1 <= x+1); + else if (x0 == x+1) + STBTT_assert(x1 >= x); + else if (x0 <= x) + STBTT_assert(x1 <= x); + else if (x0 >= x+1) + STBTT_assert(x1 >= x+1); + else + STBTT_assert(x1 >= x && x1 <= x+1); + + if (x0 <= x && x1 <= x) + scanline[x] += e->direction * (y1-y0); + else if (x0 >= x+1 && x1 >= x+1) + ; + else { + STBTT_assert(x0 >= x && x0 <= x+1 && x1 >= x && x1 <= x+1); + scanline[x] += e->direction * (y1-y0) * (1-((x0-x)+(x1-x))/2); /* coverage = 1 - average x position */ + } +} + +static float stbtt__sized_trapezoid_area(float height, float top_width, float bottom_width) +{ + STBTT_assert(top_width >= 0); + STBTT_assert(bottom_width >= 0); + return (top_width + bottom_width) / 2.0f * height; +} + +static float stbtt__position_trapezoid_area(float height, float tx0, float tx1, float bx0, float bx1) +{ + return stbtt__sized_trapezoid_area(height, tx1 - tx0, bx1 - bx0); +} + +static float stbtt__sized_triangle_area(float height, float width) +{ + return height * width / 2; +} + +static void stbtt__fill_active_edges_new(float *scanline, float *scanline_fill, int len, stbtt__active_edge *e, float y_top) +{ + float y_bottom = y_top+1; + + while (e) { + /* brute force every pixel */ + + /* compute intersection points with top & bottom */ + STBTT_assert(e->ey >= y_top); + + if (e->fdx == 0) { + float x0 = e->fx; + if (x0 < len) { + if (x0 >= 0) { + stbtt__handle_clipped_edge(scanline,(int) x0,e, x0,y_top, x0,y_bottom); + stbtt__handle_clipped_edge(scanline_fill-1,(int) x0+1,e, x0,y_top, x0,y_bottom); + } else { + stbtt__handle_clipped_edge(scanline_fill-1,0,e, x0,y_top, x0,y_bottom); + } + } + } else { + float x0 = e->fx; + float dx = e->fdx; + float xb = x0 + dx; + float x_top, x_bottom; + float sy0,sy1; + float dy = e->fdy; + STBTT_assert(e->sy <= y_bottom && e->ey >= y_top); + + /* compute endpoints of line segment clipped to this scanline (if the */ + /* line segment starts on this scanline. x0 is the intersection of the */ + /* line with y_top, but that may be off the line segment. */ + if (e->sy > y_top) { + x_top = x0 + dx * (e->sy - y_top); + sy0 = e->sy; + } else { + x_top = x0; + sy0 = y_top; + } + if (e->ey < y_bottom) { + x_bottom = x0 + dx * (e->ey - y_top); + sy1 = e->ey; + } else { + x_bottom = xb; + sy1 = y_bottom; + } + + if (x_top >= 0 && x_bottom >= 0 && x_top < len && x_bottom < len) { + /* from here on, we don't have to range check x values */ + + if ((int) x_top == (int) x_bottom) { + float height; + /* simple case, only spans one pixel */ + int x = (int) x_top; + height = (sy1 - sy0) * e->direction; + STBTT_assert(x >= 0 && x < len); + scanline[x] += stbtt__position_trapezoid_area(height, x_top, x+1.0f, x_bottom, x+1.0f); + scanline_fill[x] += height; /* everything right of this pixel is filled */ + } else { + int x,x1,x2; + float y_crossing, y_final, step, sign, area; + /* covers 2+ pixels */ + if (x_top > x_bottom) { + /* flip scanline vertically; signed area is the same */ + float t; + sy0 = y_bottom - (sy0 - y_top); + sy1 = y_bottom - (sy1 - y_top); + t = sy0, sy0 = sy1, sy1 = t; + t = x_bottom, x_bottom = x_top, x_top = t; + dx = -dx; + dy = -dy; + x0 = xb; /* t = x0, x0 = xb, xb = t; */ + } + STBTT_assert(dy >= 0); + STBTT_assert(dx >= 0); + + x1 = (int) x_top; + x2 = (int) x_bottom; + /* compute intersection with y axis at x1+1 */ + y_crossing = y_top + dy * (x1+1 - x0); + + /* compute intersection with y axis at x2 */ + y_final = y_top + dy * (x2 - x0); + + /* x1 x_top x2 x_bottom */ + /* y_top +------|-----+------------+------------+--------|---+------------+ */ + /* | | | | | | */ + /* | | | | | | */ + /* sy0 | Txxxxx|............|............|............|............| */ + /* y_crossing | *xxxxx.......|............|............|............| */ + /* | | xxxxx..|............|............|............| */ + /* | | /- xx*xxxx........|............|............| */ + /* | | dy < | xxxxxx..|............|............| */ + /* y_final | | \- | xx*xxx.........|............| */ + /* sy1 | | | | xxxxxB...|............| */ + /* | | | | | | */ + /* | | | | | | */ + /* y_bottom +------------+------------+------------+------------+------------+ */ + /**/ + /* goal is to measure the area covered by '.' in each pixel */ + + /* if x2 is right at the right edge of x1, y_crossing can blow up, github #1057 */ + /* @TODO: maybe test against sy1 rather than y_bottom? */ + if (y_crossing > y_bottom) + y_crossing = y_bottom; + + sign = e->direction; + + /* area of the rectangle covered from sy0..y_crossing */ + area = sign * (y_crossing-sy0); + + /* area of the triangle (x_top,sy0), (x1+1,sy0), (x1+1,y_crossing) */ + scanline[x1] += stbtt__sized_triangle_area(area, x1+1 - x_top); + + /* check if final y_crossing is blown up; no test case for this */ + if (y_final > y_bottom) { + y_final = y_bottom; + if (x2 - (x1+1) != 0) { /* https://github.com/nothings/stb/issues/1316 */ + dy = (y_final - y_crossing ) / (x2 - (x1+1)); /* if denom=0, y_final = y_crossing, so y_final <= y_bottom */ + } + } + + /* in second pixel, area covered by line segment found in first pixel */ + /* is always a rectangle 1 wide * the height of that line segment; this */ + /* is exactly what the variable 'area' stores. it also gets a contribution */ + /* from the line segment within it. the THIRD pixel will get the first */ + /* pixel's rectangle contribution, the second pixel's rectangle contribution, */ + /* and its own contribution. the 'own contribution' is the same in every pixel except */ + /* the leftmost and rightmost, a trapezoid that slides down in each pixel. */ + /* the second pixel's contribution to the third pixel will be the */ + /* rectangle 1 wide times the height change in the second pixel, which is dy. */ + + step = sign * dy * 1; /* dy is dy/dx, change in y for every 1 change in x, */ + /* which multiplied by 1-pixel-width is how much pixel area changes for each step in x */ + /* so the area advances by 'step' every time */ + + for (x = x1+1; x < x2; ++x) { + scanline[x] += area + step/2; /* area of trapezoid is 1*step/2 */ + area += step; + } + STBTT_assert(STBTT_fabs(area) <= 1.01f); /* accumulated error from area += step unless we round step down */ + STBTT_assert(sy1 > y_final-0.01f); + + /* area covered in the last pixel is the rectangle from all the pixels to the left, */ + /* plus the trapezoid filled by the line segment in this pixel all the way to the right edge */ + scanline[x2] += area + sign * stbtt__position_trapezoid_area(sy1-y_final, (float) x2, x2+1.0f, x_bottom, x2+1.0f); + + /* the rest of the line is filled based on the total height of the line segment in this pixel */ + scanline_fill[x2] += sign * (sy1-sy0); + } + } else { + /* if edge goes outside of box we're drawing, we require */ + /* clipping logic. since this does not match the intended use */ + /* of this library, we use a different, very slow brute */ + /* force implementation */ + /* note though that this does happen some of the time because */ + /* x_top and x_bottom can be extrapolated at the top & bottom of */ + /* the shape and actually lie outside the bounding box */ + int x; + for (x=0; x < len; ++x) { + /* cases: */ + /**/ + /* there can be up to two intersections with the pixel. any intersection */ + /* with left or right edges can be handled by splitting into two (or three) */ + /* regions. intersections with top & bottom do not necessitate case-wise logic. */ + /**/ + /* the old way of doing this found the intersections with the left & right edges, */ + /* then used some simple logic to produce up to three segments in sorted order */ + /* from top-to-bottom. however, this had a problem: if an x edge was epsilon */ + /* across the x border, then the corresponding y position might not be distinct */ + /* from the other y segment, and it might ignored as an empty segment. to avoid */ + /* that, we need to explicitly produce segments based on x positions. */ + + /* rename variables to clearly-defined pairs */ + float y0 = y_top; + float x1 = (float) (x); + float x2 = (float) (x+1); + float x3 = xb; + float y3 = y_bottom; + + /* x = e->x + e->dx * (y-y_top) */ + /* (y-y_top) = (x - e->x) / e->dx */ + /* y = (x - e->x) / e->dx + y_top */ + float y1 = (x - x0) / dx + y_top; + float y2 = (x+1 - x0) / dx + y_top; + + if (x0 < x1 && x3 > x2) { /* three segments descending down-right */ + stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x1,y1); + stbtt__handle_clipped_edge(scanline,x,e, x1,y1, x2,y2); + stbtt__handle_clipped_edge(scanline,x,e, x2,y2, x3,y3); + } else if (x3 < x1 && x0 > x2) { /* three segments descending down-left */ + stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x2,y2); + stbtt__handle_clipped_edge(scanline,x,e, x2,y2, x1,y1); + stbtt__handle_clipped_edge(scanline,x,e, x1,y1, x3,y3); + } else if (x0 < x1 && x3 > x1) { /* two segments across x, down-right */ + stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x1,y1); + stbtt__handle_clipped_edge(scanline,x,e, x1,y1, x3,y3); + } else if (x3 < x1 && x0 > x1) { /* two segments across x, down-left */ + stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x1,y1); + stbtt__handle_clipped_edge(scanline,x,e, x1,y1, x3,y3); + } else if (x0 < x2 && x3 > x2) { /* two segments across x+1, down-right */ + stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x2,y2); + stbtt__handle_clipped_edge(scanline,x,e, x2,y2, x3,y3); + } else if (x3 < x2 && x0 > x2) { /* two segments across x+1, down-left */ + stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x2,y2); + stbtt__handle_clipped_edge(scanline,x,e, x2,y2, x3,y3); + } else { /* one segment */ + stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x3,y3); + } + } + } + } + e = e->next; + } +} + +/* directly AA rasterize edges w/o supersampling */ +static void stbtt__rasterize_sorted_edges(stbtt__bitmap *result, stbtt__edge *e, int n, int vsubsample, int off_x, int off_y, void *userdata) +{ + stbtt__hheap hh = { 0, 0, 0 }; + stbtt__active_edge *active = NULL; + int y,j=0, i; + float scanline_data[129], *scanline, *scanline2; + const stbtt__edge *const ee = &e[n + 1]; /* ZINT: check `e` overrun */ + + STBTT__NOTUSED(vsubsample); + + if (result->w > 64) + scanline = (float *) STBTT_malloc((result->w*2+1) * sizeof(float), userdata); + else + scanline = scanline_data; + + scanline2 = scanline + result->w; + + y = off_y; + e[n].y0 = (float) (off_y + result->h) + 1; + + while (j < result->h) { + /* find center of pixel for this scanline */ + float scan_y_top = y + 0.0f; + float scan_y_bottom = y + 1.0f; + stbtt__active_edge **step = &active; + + STBTT_memset(scanline , 0, result->w*sizeof(scanline[0])); + STBTT_memset(scanline2, 0, (result->w+1)*sizeof(scanline[0])); + + /* update all active edges; */ + /* remove all active edges that terminate before the top of this scanline */ + while (*step) { + stbtt__active_edge * z = *step; + if (z->ey <= scan_y_top) { + *step = z->next; /* delete from list */ + STBTT_assert(z->direction); + z->direction = 0; + stbtt__hheap_free(&hh, z); + } else { + step = &((*step)->next); /* advance through list */ + } + } + + /* insert all edges that start before the bottom of this scanline */ + while (e->y0 <= scan_y_bottom) { + if (e->y0 != e->y1) { + stbtt__active_edge *z = stbtt__new_active(&hh, e, off_x, scan_y_top, userdata); + if (z != NULL) { + if (j == 0 && off_y != 0) { + if (z->ey < scan_y_top) { + /* this can happen due to subpixel positioning and some kind of fp rounding error i think */ + z->ey = scan_y_top; + } + } + STBTT_assert(z->ey >= scan_y_top); /* if we get really unlucky a tiny bit of an edge can be out of bounds */ + /* insert at front */ + z->next = active; + active = z; + } + } + if (++e >= ee) break; /* ZINT: check `e` overrun */ + } + + /* now process all active edges */ + if (active) + stbtt__fill_active_edges_new(scanline, scanline2+1, result->w, active, scan_y_top); + + { + float sum = 0; + for (i=0; i < result->w; ++i) { + float k; + int m; + sum += scanline2[i]; + k = scanline[i] + sum; + k = (float) STBTT_fabs(k)*255 + 0.5f; + m = (int) k; + if (m > 255) m = 255; + result->pixels[j*result->stride + i] = (unsigned char) m; + } + } + /* advance all the edges */ + step = &active; + while (*step) { + stbtt__active_edge *z = *step; + z->fx += z->fdx; /* advance to position for current scanline */ + step = &((*step)->next); /* advance through list */ + } + + ++y; + ++j; + } + + stbtt__hheap_cleanup(&hh, userdata); + + if (scanline != scanline_data) + STBTT_free(scanline, userdata); +} + +#define STBTT__COMPARE(a,b) ((a)->y0 < (b)->y0) + +static void stbtt__sort_edges_ins_sort(stbtt__edge *p, int n) +{ + int i,j; + for (i=1; i < n; ++i) { + stbtt__edge t = p[i], *a = &t; + j = i; + while (j > 0) { + stbtt__edge *b = &p[j-1]; + int c = STBTT__COMPARE(a,b); + if (!c) break; + p[j] = p[j-1]; + --j; + } + if (i != j) + p[j] = t; + } +} + +static void stbtt__sort_edges_quicksort(stbtt__edge *p, int n) +{ + /* threshold for transitioning to insertion sort */ + while (n > 12) { + stbtt__edge t; + int c01,c12,c,m,i,j; + + /* compute median of three */ + m = n >> 1; + c01 = STBTT__COMPARE(&p[0],&p[m]); + c12 = STBTT__COMPARE(&p[m],&p[n-1]); + /* if 0 >= mid >= end, or 0 < mid < end, then use mid */ + if (c01 != c12) { + /* otherwise, we'll need to swap something else to middle */ + int z; + c = STBTT__COMPARE(&p[0],&p[n-1]); + /* 0>mid && midn => n; 0 0 */ + /* 0n: 0>n => 0; 0 n */ + z = (c == c12) ? 0 : n-1; + t = p[z]; + p[z] = p[m]; + p[m] = t; + } + /* now p[m] is the median-of-three */ + /* swap it to the beginning so it won't move around */ + t = p[0]; + p[0] = p[m]; + p[m] = t; + + /* partition loop */ + i=1; + j=n-1; + for(;;) { + /* handling of equality is crucial here */ + /* for sentinels & efficiency with duplicates */ + for (;;++i) { + if (!STBTT__COMPARE(&p[i], &p[0])) break; + } + for (;;--j) { + if (!STBTT__COMPARE(&p[0], &p[j])) break; + } + /* make sure we haven't crossed */ + if (i >= j) break; + t = p[i]; + p[i] = p[j]; + p[j] = t; + + ++i; + --j; + } + /* recurse on smaller side, iterate on larger */ + if (j < (n-i)) { + stbtt__sort_edges_quicksort(p,j); + p = p+i; + n = n-i; + } else { + stbtt__sort_edges_quicksort(p+i, n-i); + n = j; + } + } +} + +static void stbtt__sort_edges(stbtt__edge *p, int n) +{ + stbtt__sort_edges_quicksort(p, n); + stbtt__sort_edges_ins_sort(p, n); +} + +typedef struct +{ + float x,y; +} stbtt__point; + +/* ZINT: return whether have done anything */ +static int stbtt__rasterize(stbtt__bitmap *result, stbtt__point *pts, int *wcount, int windings, float scale_x, float scale_y, float shift_x, float shift_y, int off_x, int off_y, int invert, void *userdata) +{ + float y_scale_inv = invert ? -scale_y : scale_y; + stbtt__edge *e; + int n,i,j,k,m; + int vsubsample = 1; + /* vsubsample should divide 255 evenly; otherwise we won't reach full opacity */ + + /* now we have to blow out the windings into explicit edge lists */ + n = 0; + for (i=0; i < windings; ++i) + n += wcount[i]; + + e = (stbtt__edge *) STBTT_malloc(sizeof(*e) * (n+1), userdata); /* add an extra one as a sentinel */ + if (e == 0) return 0; /* ZINT: return */ + STBTT_memset(e , 0, sizeof(*e) * (n+1)); + n = 0; + + m=0; + for (i=0; i < windings; ++i) { + stbtt__point *p = pts + m; + m += wcount[i]; + j = wcount[i]-1; + for (k=0; k < wcount[i]; j=k++) { + int a=k,b=j; + /* skip the edge if horizontal */ + if (p[j].y == p[k].y) + continue; + /* add edge from j to k to the list */ + e[n].invert = 0; + if (invert ? p[j].y > p[k].y : p[j].y < p[k].y) { + e[n].invert = 1; + a=j,b=k; + } + e[n].x0 = p[a].x * scale_x + shift_x; + e[n].y0 = (p[a].y * y_scale_inv + shift_y) * vsubsample; + e[n].x1 = p[b].x * scale_x + shift_x; + e[n].y1 = (p[b].y * y_scale_inv + shift_y) * vsubsample; + ++n; + } + } + + /* now sort the edges by their highest point (should snap to integer, and then by x) */ + /* STBTT_sort(e, n, sizeof(e[0]), stbtt__edge_compare); */ + stbtt__sort_edges(e, n); + + /* now, traverse the scanlines and find the intersections on each scanline, use xor winding rule */ + stbtt__rasterize_sorted_edges(result, e, n, vsubsample, off_x, off_y, userdata); + + STBTT_free(e, userdata); + + return windings > 0; /* ZINT: return */ +} + +static void stbtt__add_point(stbtt__point *points, int n, float x, float y) +{ + if (!points) return; /* during first pass, it's unallocated */ + points[n].x = x; + points[n].y = y; +} + +/* tessellate until threshold p is happy... @TODO warped to compensate for non-linear stretching */ +static int stbtt__tesselate_curve(stbtt__point *points, int *num_points, float x0, float y0, float x1, float y1, float x2, float y2, float objspace_flatness_squared, int n) +{ + /* midpoint */ + float mx = (x0 + 2*x1 + x2)/4; + float my = (y0 + 2*y1 + y2)/4; + /* versus directly drawn line */ + float dx = (x0+x2)/2 - mx; + float dy = (y0+y2)/2 - my; + if (n > 16) /* 65536 segments on one curve better be enough! */ + return 1; + if (dx*dx+dy*dy > objspace_flatness_squared) { /* half-pixel error allowed... need to be smaller if AA */ + stbtt__tesselate_curve(points, num_points, x0,y0, (x0+x1)/2.0f,(y0+y1)/2.0f, mx,my, objspace_flatness_squared,n+1); + stbtt__tesselate_curve(points, num_points, mx,my, (x1+x2)/2.0f,(y1+y2)/2.0f, x2,y2, objspace_flatness_squared,n+1); + } else { + stbtt__add_point(points, *num_points,x2,y2); + *num_points = *num_points+1; + } + return 1; +} + +static void stbtt__tesselate_cubic(stbtt__point *points, int *num_points, float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3, float objspace_flatness_squared, int n) +{ + /* @TODO this "flatness" calculation is just made-up nonsense that seems to work well enough */ + float dx0 = x1-x0; + float dy0 = y1-y0; + float dx1 = x2-x1; + float dy1 = y2-y1; + float dx2 = x3-x2; + float dy2 = y3-y2; + float dx = x3-x0; + float dy = y3-y0; + float longlen = (float) (STBTT_sqrt(dx0*dx0+dy0*dy0)+STBTT_sqrt(dx1*dx1+dy1*dy1)+STBTT_sqrt(dx2*dx2+dy2*dy2)); + float shortlen = (float) STBTT_sqrt(dx*dx+dy*dy); + float flatness_squared = longlen*longlen-shortlen*shortlen; + + if (n > 16) /* 65536 segments on one curve better be enough! */ + return; + + if (flatness_squared > objspace_flatness_squared) { + float x01 = (x0+x1)/2; + float y01 = (y0+y1)/2; + float x12 = (x1+x2)/2; + float y12 = (y1+y2)/2; + float x23 = (x2+x3)/2; + float y23 = (y2+y3)/2; + + float xa = (x01+x12)/2; + float ya = (y01+y12)/2; + float xb = (x12+x23)/2; + float yb = (y12+y23)/2; + + float mx = (xa+xb)/2; + float my = (ya+yb)/2; + + stbtt__tesselate_cubic(points, num_points, x0,y0, x01,y01, xa,ya, mx,my, objspace_flatness_squared,n+1); + stbtt__tesselate_cubic(points, num_points, mx,my, xb,yb, x23,y23, x3,y3, objspace_flatness_squared,n+1); + } else { + stbtt__add_point(points, *num_points,x3,y3); + *num_points = *num_points+1; + } +} + +/* returns number of contours */ +static stbtt__point *stbtt_FlattenCurves(stbtt_vertex *vertices, int num_verts, float objspace_flatness, int **contour_lengths, int *num_contours, void *userdata) +{ + stbtt__point *points=0; + int num_points=0; + + float objspace_flatness_squared = objspace_flatness * objspace_flatness; + int i,n=0,start=0, pass; + + /* count how many "moves" there are to get the contour count */ + for (i=0; i < num_verts; ++i) + if (vertices[i].type == STBTT_vmove) + ++n; + + *num_contours = n; + if (n == 0) return 0; + + *contour_lengths = (int *) STBTT_malloc(sizeof(**contour_lengths) * n, userdata); + + if (*contour_lengths == 0) { + *num_contours = 0; + return 0; + } + + /* make two passes through the points so we don't need to realloc */ + for (pass=0; pass < 2; ++pass) { + float x=0,y=0; + if (pass == 1) { + points = (stbtt__point *) STBTT_malloc(num_points * sizeof(points[0]), userdata); + if (points == NULL) goto error; + } + num_points = 0; + n= -1; + for (i=0; i < num_verts; ++i) { + switch (vertices[i].type) { + case STBTT_vmove: + /* start the next contour */ + if (n >= 0) + (*contour_lengths)[n] = num_points - start; + ++n; + start = num_points; + + x = vertices[i].x, y = vertices[i].y; + stbtt__add_point(points, num_points++, x,y); + break; + case STBTT_vline: + x = vertices[i].x, y = vertices[i].y; + stbtt__add_point(points, num_points++, x, y); + break; + case STBTT_vcurve: + stbtt__tesselate_curve(points, &num_points, x,y, + vertices[i].cx, vertices[i].cy, + vertices[i].x, vertices[i].y, + objspace_flatness_squared, 0); + x = vertices[i].x, y = vertices[i].y; + break; + case STBTT_vcubic: + stbtt__tesselate_cubic(points, &num_points, x,y, + vertices[i].cx, vertices[i].cy, + vertices[i].cx1, vertices[i].cy1, + vertices[i].x, vertices[i].y, + objspace_flatness_squared, 0); + x = vertices[i].x, y = vertices[i].y; + break; + } + } + (*contour_lengths)[n] = num_points - start; + } + + return points; +error: + STBTT_free(points, userdata); + STBTT_free(*contour_lengths, userdata); + *contour_lengths = 0; + *num_contours = 0; + return NULL; +} + +/* ZINT: return whether have done anything */ +STBTT_DEF int stbtt_Rasterize(stbtt__bitmap *result, float flatness_in_pixels, stbtt_vertex *vertices, int num_verts, float scale_x, float scale_y, float shift_x, float shift_y, int x_off, int y_off, int invert, void *userdata) +{ + int return_value = 0; /* ZINT: return */ + float scale = scale_x > scale_y ? scale_y : scale_x; + int winding_count = 0; + int *winding_lengths = NULL; + stbtt__point *windings = stbtt_FlattenCurves(vertices, num_verts, flatness_in_pixels / scale, &winding_lengths, &winding_count, userdata); + if (windings) { + return_value = stbtt__rasterize(result, windings, winding_lengths, winding_count, scale_x, scale_y, shift_x, shift_y, x_off, y_off, invert, userdata); /* ZINT: return */ + STBTT_free(winding_lengths, userdata); + STBTT_free(windings, userdata); + } + return return_value; /* ZINT: return */ +} + +/* ZINT: return whether anything done */ +STBTT_DEF int stbtt_MakeGlyphBitmapSubpixel(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int glyph) +{ + int return_value = 0; /* ZINT: return */ + int ix0,iy0; + stbtt_vertex *vertices; + int num_verts = stbtt_GetGlyphShape(info, glyph, &vertices); + stbtt__bitmap gbm; + + stbtt_GetGlyphBitmapBoxSubpixel(info, glyph, scale_x, scale_y, shift_x, shift_y, &ix0,&iy0,0,0); + gbm.pixels = output; + gbm.w = out_w; + gbm.h = out_h; + gbm.stride = out_stride; + + if (gbm.w && gbm.h) + return_value = stbtt_Rasterize(&gbm, 0.35f, vertices, num_verts, scale_x, scale_y, shift_x, shift_y, ix0,iy0, 1, info->userdata); /* ZINT: return */ + + STBTT_free(vertices, info->userdata); + return return_value; /* ZINT: return */ +} + +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-qual" +#endif + +STBTT_DEF int stbtt_InitFont(stbtt_fontinfo *info, const unsigned char *data, int offset) +{ + return stbtt_InitFont_internal(info, (unsigned char *) data, offset); +} + +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic pop +#endif + +#endif /* STB_TRUETYPE_IMPLEMENTATION */ diff --git a/backend/tests/data/bmp/dbar_exp_fnt28.bmp b/backend/tests/data/bmp/dbar_exp_fnt28.bmp new file mode 100644 index 00000000..d7531425 Binary files /dev/null and b/backend/tests/data/bmp/dbar_exp_fnt28.bmp differ diff --git a/backend/tests/data/emf/code128_egrave_bold.emf b/backend/tests/data/emf/code128_egrave_bold.emf index adcafb26..a427d366 100644 Binary files a/backend/tests/data/emf/code128_egrave_bold.emf and b/backend/tests/data/emf/code128_egrave_bold.emf differ diff --git a/backend/tests/data/emf/code128_egrave_bold_100dpi.emf b/backend/tests/data/emf/code128_egrave_bold_100dpi.emf index 96a6778c..9b988880 100644 Binary files a/backend/tests/data/emf/code128_egrave_bold_100dpi.emf and b/backend/tests/data/emf/code128_egrave_bold_100dpi.emf differ diff --git a/backend/tests/data/emf/code128_egrave_bold_1200dpi.emf b/backend/tests/data/emf/code128_egrave_bold_1200dpi.emf index b038e0d2..2c502fb0 100644 Binary files a/backend/tests/data/emf/code128_egrave_bold_1200dpi.emf and b/backend/tests/data/emf/code128_egrave_bold_1200dpi.emf differ diff --git a/backend/tests/data/emf/code128_egrave_bold_150dpi.emf b/backend/tests/data/emf/code128_egrave_bold_150dpi.emf index fee503ef..3622abf0 100644 Binary files a/backend/tests/data/emf/code128_egrave_bold_150dpi.emf and b/backend/tests/data/emf/code128_egrave_bold_150dpi.emf differ diff --git a/backend/tests/data/emf/code128_egrave_bold_300dpi.emf b/backend/tests/data/emf/code128_egrave_bold_300dpi.emf index 19d3493c..d659d8c0 100644 Binary files a/backend/tests/data/emf/code128_egrave_bold_300dpi.emf and b/backend/tests/data/emf/code128_egrave_bold_300dpi.emf differ diff --git a/backend/tests/data/emf/code128_egrave_bold_400dpi.emf b/backend/tests/data/emf/code128_egrave_bold_400dpi.emf index fd6d6b7e..84955509 100644 Binary files a/backend/tests/data/emf/code128_egrave_bold_400dpi.emf and b/backend/tests/data/emf/code128_egrave_bold_400dpi.emf differ diff --git a/backend/tests/data/emf/code39_rotate_180.emf b/backend/tests/data/emf/code39_rotate_180.emf index 196fce2d..acba657b 100644 Binary files a/backend/tests/data/emf/code39_rotate_180.emf and b/backend/tests/data/emf/code39_rotate_180.emf differ diff --git a/backend/tests/data/emf/code39_rotate_270.emf b/backend/tests/data/emf/code39_rotate_270.emf index b282a40c..884bca91 100644 Binary files a/backend/tests/data/emf/code39_rotate_270.emf and b/backend/tests/data/emf/code39_rotate_270.emf differ diff --git a/backend/tests/data/emf/code39_rotate_90.emf b/backend/tests/data/emf/code39_rotate_90.emf index f85206aa..f1d85378 100644 Binary files a/backend/tests/data/emf/code39_rotate_90.emf and b/backend/tests/data/emf/code39_rotate_90.emf differ diff --git a/backend/tests/data/emf/code39_rotate_90_300dpi.emf b/backend/tests/data/emf/code39_rotate_90_300dpi.emf index 871f9976..bc36ad90 100644 Binary files a/backend/tests/data/emf/code39_rotate_90_300dpi.emf and b/backend/tests/data/emf/code39_rotate_90_300dpi.emf differ diff --git a/backend/tests/data/emf/itf14_bold.emf b/backend/tests/data/emf/itf14_bold.emf index 7b11c088..02d7cdee 100644 Binary files a/backend/tests/data/emf/itf14_bold.emf and b/backend/tests/data/emf/itf14_bold.emf differ diff --git a/backend/tests/data/emf/itf14_bold_600dpi.emf b/backend/tests/data/emf/itf14_bold_600dpi.emf index c57b6fbf..1ce3c3a4 100644 Binary files a/backend/tests/data/emf/itf14_bold_600dpi.emf and b/backend/tests/data/emf/itf14_bold_600dpi.emf differ diff --git a/backend/tests/data/emf/telenum_fg_bg.emf b/backend/tests/data/emf/telenum_fg_bg.emf index 3aa63cd6..bd5566e6 100644 Binary files a/backend/tests/data/emf/telenum_fg_bg.emf and b/backend/tests/data/emf/telenum_fg_bg.emf differ diff --git a/backend/tests/data/emf/telenum_fg_bg_150dpi.emf b/backend/tests/data/emf/telenum_fg_bg_150dpi.emf index d596d1cb..d4dec1ae 100644 Binary files a/backend/tests/data/emf/telenum_fg_bg_150dpi.emf and b/backend/tests/data/emf/telenum_fg_bg_150dpi.emf differ diff --git a/backend/tests/data/emf/upu_s10_cmyk_nobg.emf b/backend/tests/data/emf/upu_s10_cmyk_nobg.emf index 4ab2c371..b3bcf519 100644 Binary files a/backend/tests/data/emf/upu_s10_cmyk_nobg.emf and b/backend/tests/data/emf/upu_s10_cmyk_nobg.emf differ diff --git a/backend/tests/data/eps/code128_egrave_bold.eps b/backend/tests/data/eps/code128_egrave_bold.eps index 3f3cac59..acd83b22 100644 --- a/backend/tests/data/eps/code128_egrave_bold.eps +++ b/backend/tests/data/eps/code128_egrave_bold.eps @@ -1,15 +1,15 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 224 117 +%%BoundingBox: 0 0 224 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 -116.28 0 0 224 R +117.92 0 0 224 R 0 0 0 setrgbcolor -100 16.28 I 0 4 R +100 17.92 I 0 4 R I 6 2 R I 12 2 R I 22 2 R @@ -48,6 +48,6 @@ currentdict end /Helvetica-ISOLatin1 exch definefont pop /Helvetica-ISOLatin1 findfont 14 scalefont setfont - 112 2.94 moveto + 112 4.58 moveto (gjpqy) stringwidth pop -2 div 0 rmoveto (gjpqy) show diff --git a/backend/tests/data/eps/code128_egrave_bold_rotate_180.eps b/backend/tests/data/eps/code128_egrave_bold_rotate_180.eps index daf6ab2b..dfa557d7 100644 --- a/backend/tests/data/eps/code128_egrave_bold_rotate_180.eps +++ b/backend/tests/data/eps/code128_egrave_bold_rotate_180.eps @@ -1,13 +1,13 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 224 117 +%%BoundingBox: 0 0 224 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 -116.28 0 0 224 R +117.92 0 0 224 R 0 0 0 setrgbcolor 100 0 I 220 4 R I 216 2 R diff --git a/backend/tests/data/eps/code128_egrave_bold_rotate_270.eps b/backend/tests/data/eps/code128_egrave_bold_rotate_270.eps index 3f5f2183..852d7dc0 100644 --- a/backend/tests/data/eps/code128_egrave_bold_rotate_270.eps +++ b/backend/tests/data/eps/code128_egrave_bold_rotate_270.eps @@ -1,13 +1,13 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 117 224 +%%BoundingBox: 0 0 118 224 %%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 -224 0 0 116.28 R +224 0 0 117.92 R 0 0 0 setrgbcolor 4 0 0 100 R 2 6 0 100 R diff --git a/backend/tests/data/eps/code128_egrave_bold_rotate_90.eps b/backend/tests/data/eps/code128_egrave_bold_rotate_90.eps index bb9f39d6..1cd8bc90 100644 --- a/backend/tests/data/eps/code128_egrave_bold_rotate_90.eps +++ b/backend/tests/data/eps/code128_egrave_bold_rotate_90.eps @@ -1,45 +1,45 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 117 224 +%%BoundingBox: 0 0 118 224 %%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 -224 0 0 116.28 R +224 0 0 117.92 R 0 0 0 setrgbcolor -4 220 16.28 100 R -2 216 16.28 100 R -2 210 16.28 100 R -2 200 16.28 100 R -8 190 16.28 100 R -6 182 16.28 100 R -4 176 16.28 100 R -2 168 16.28 100 R -2 160 16.28 100 R -2 156 16.28 100 R -4 148 16.28 100 R -2 144 16.28 100 R -2 134 16.28 100 R -4 122 16.28 100 R -2 116 16.28 100 R -2 112 16.28 100 R -2 108 16.28 100 R -8 96 16.28 100 R -2 90 16.28 100 R -2 84 16.28 100 R -8 74 16.28 100 R -4 66 16.28 100 R -4 60 16.28 100 R -8 50 16.28 100 R -2 46 16.28 100 R -4 36 16.28 100 R -2 28 16.28 100 R -4 22 16.28 100 R -6 10 16.28 100 R -2 6 16.28 100 R -4 0 16.28 100 R +4 220 17.92 100 R +2 216 17.92 100 R +2 210 17.92 100 R +2 200 17.92 100 R +8 190 17.92 100 R +6 182 17.92 100 R +4 176 17.92 100 R +2 168 17.92 100 R +2 160 17.92 100 R +2 156 17.92 100 R +4 148 17.92 100 R +2 144 17.92 100 R +2 134 17.92 100 R +4 122 17.92 100 R +2 116 17.92 100 R +2 112 17.92 100 R +2 108 17.92 100 R +8 96 17.92 100 R +2 90 17.92 100 R +2 84 17.92 100 R +8 74 17.92 100 R +4 66 17.92 100 R +4 60 17.92 100 R +8 50 17.92 100 R +2 46 17.92 100 R +4 36 17.92 100 R +2 28 17.92 100 R +4 22 17.92 100 R +6 10 17.92 100 R +2 6 17.92 100 R +4 0 17.92 100 R /Helvetica-Bold findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall @@ -48,7 +48,7 @@ currentdict end /Helvetica-ISOLatin1 exch definefont pop /Helvetica-ISOLatin1 findfont 14 scalefont setfont - 2.94 112 moveto + 4.58 112 moveto gsave 270 rotate (gjpqy) stringwidth pop -2 div 0 rmoveto diff --git a/backend/tests/data/eps/code128_escape_latin1.eps b/backend/tests/data/eps/code128_escape_latin1.eps index 3200b6ce..33bccd2f 100644 --- a/backend/tests/data/eps/code128_escape_latin1.eps +++ b/backend/tests/data/eps/code128_escape_latin1.eps @@ -1,15 +1,15 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 246 117 +%%BoundingBox: 0 0 246 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 -116.28 0 0 246 R +117.92 0 0 246 R 0 0 0 setrgbcolor -100 16.28 I 0 4 R +100 17.92 I 0 4 R I 6 2 R I 12 2 R I 22 2 R @@ -51,6 +51,6 @@ currentdict end /Helvetica-ISOLatin1 exch definefont pop /Helvetica-ISOLatin1 findfont 14 scalefont setfont - 123 2.94 moveto + 123 4.58 moveto (A\\B\)\(D) stringwidth pop -2 div 0 rmoveto (A\\B\)\(D) show diff --git a/backend/tests/data/eps/code39_fg_bg.eps b/backend/tests/data/eps/code39_fg_bg.eps index 5e46325e..fcaccc6b 100644 --- a/backend/tests/data/eps/code39_fg_bg.eps +++ b/backend/tests/data/eps/code39_fg_bg.eps @@ -1,15 +1,15 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 128 117 +%%BoundingBox: 0 0 128 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 0.99 0.59 0.19 setrgbcolor -116.28 0 0 128 R +117.92 0 0 128 R 0.08 0.48 0.82 setrgbcolor -100 16.28 I 0 2 R +100 17.92 I 0 2 R I 6 2 R I 10 4 R I 16 4 R @@ -35,6 +35,6 @@ I 114 4 R I 120 4 R 126 2 R /Helvetica findfont 14 scalefont setfont - 64 2.94 moveto + 64 4.58 moveto (*123*) stringwidth pop -2 div 0 rmoveto (*123*) show diff --git a/backend/tests/data/eps/code39_fgalpha_bg_cmyk.eps b/backend/tests/data/eps/code39_fgalpha_bg_cmyk.eps index b96b24f8..9f3162f9 100644 --- a/backend/tests/data/eps/code39_fgalpha_bg_cmyk.eps +++ b/backend/tests/data/eps/code39_fgalpha_bg_cmyk.eps @@ -1,15 +1,15 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 128 117 +%%BoundingBox: 0 0 128 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 0 0.4 0.81 0.01 setcmykcolor -116.28 0 0 128 R +117.92 0 0 128 R 0.9 0.41 0 0.18 setcmykcolor -100 16.28 I 0 2 R +100 17.92 I 0 2 R I 6 2 R I 10 4 R I 16 4 R @@ -35,6 +35,6 @@ I 114 4 R I 120 4 R 126 2 R /Helvetica findfont 14 scalefont setfont - 64 2.94 moveto + 64 4.58 moveto (*123*) stringwidth pop -2 div 0 rmoveto (*123*) show diff --git a/backend/tests/data/eps/code39_nobg_cmyk.eps b/backend/tests/data/eps/code39_nobg_cmyk.eps index e4bca1f8..ec691c64 100644 --- a/backend/tests/data/eps/code39_nobg_cmyk.eps +++ b/backend/tests/data/eps/code39_nobg_cmyk.eps @@ -1,13 +1,13 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 128 117 +%%BoundingBox: 0 0 128 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 0.9 0.4 0 0.09 setcmykcolor -100 16.28 I 0 2 R +100 17.92 I 0 2 R I 6 2 R I 10 4 R I 16 4 R @@ -33,6 +33,6 @@ I 114 4 R I 120 4 R 126 2 R /Helvetica findfont 14 scalefont setfont - 64 2.94 moveto + 64 4.58 moveto (*123*) stringwidth pop -2 div 0 rmoveto (*123*) show diff --git a/backend/tests/data/eps/code39_small.eps b/backend/tests/data/eps/code39_small.eps index f757f9f0..9add3cfa 100644 --- a/backend/tests/data/eps/code39_small.eps +++ b/backend/tests/data/eps/code39_small.eps @@ -1,15 +1,15 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 128 113 +%%BoundingBox: 0 0 128 114 %%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 -112.2 0 0 128 R +113.37 0 0 128 R 0 0 0 setrgbcolor -100 12.2 I 0 2 R +100 13.37 I 0 2 R I 6 2 R I 10 4 R I 16 4 R @@ -35,6 +35,6 @@ I 114 4 R I 120 4 R 126 2 R /Helvetica findfont 10 scalefont setfont - 64 2.1 moveto + 64 3.27 moveto (*123*) stringwidth pop -2 div 0 rmoveto (*123*) show diff --git a/backend/tests/data/eps/dbar_ltd_24724_fig7_bold.eps b/backend/tests/data/eps/dbar_ltd_24724_fig7_bold.eps index 3f83a4a2..71408398 100644 --- a/backend/tests/data/eps/dbar_ltd_24724_fig7_bold.eps +++ b/backend/tests/data/eps/dbar_ltd_24724_fig7_bold.eps @@ -1,15 +1,15 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.12.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 158 117 +%%BoundingBox: 0 0 158 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 -116.28 0 0 158 R +117.92 0 0 158 R 0 0 0 setrgbcolor -100 16.28 I 2 2 R +100 17.92 I 2 2 R I 10 4 R I 18 4 R I 28 4 R @@ -33,6 +33,6 @@ I 132 4 R I 140 4 R 146 2 R /Helvetica-Bold findfont 14 scalefont setfont - 79 2.94 moveto + 79 4.58 moveto (\(01\)15012345678907) stringwidth pop -2 div 0 rmoveto (\(01\)15012345678907) show diff --git a/backend/tests/data/eps/dbar_omnstk_fh21.eps b/backend/tests/data/eps/dbar_omnstk_fh21.eps new file mode 100644 index 00000000..f5e8cb25 --- /dev/null +++ b/backend/tests/data/eps/dbar_omnstk_fh21.eps @@ -0,0 +1,83 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: Zint 2.16.0.9 +%%Title: Zint Generated Symbol +%%Pages: 0 +%%BoundingBox: 0 0 100 212 +%%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 +211.88 0 0 100 R +0 0 0 setrgbcolor +66 145.88 I 2 2 R +I 14 2 R +I 18 2 R +I 30 2 R +I 34 2 R +I 42 16 R +I 62 2 R +I 66 8 R +I 76 4 R +I 82 2 R +I 86 6 R +96 2 R +2 143.88 I 8 6 R +I 16 2 R +I 20 10 R +I 32 2 R +I 36 2 R +40 2 R +6 139.88 58 2 R +2 143.88 64 2 R +6 139.88 74 2 R +2 143.88 I 80 2 R +84 2 R +2 141.88 I 10 2 R +I 14 2 R +18 2 R +4 139.88 22 2 R +2 141.88 I 26 2 R +I 30 2 R +I 34 2 R +I 38 2 R +I 42 2 R +46 2 R +4 139.88 I 50 2 R +54 2 R +2 141.88 I 62 2 R +I 66 2 R +I 70 2 R +I 78 2 R +I 82 2 R +I 86 2 R +90 2 R +2 139.88 I 8 4 R +I 16 2 R +I 28 6 R +I 36 2 R +I 64 4 R +I 80 2 R +88 4 R +66 73.88 I 0 2 R +I 4 2 R +I 12 4 R +I 18 4 R +I 24 4 R +I 34 2 R +I 38 12 R +I 60 4 R +I 68 6 R +I 76 4 R +I 82 6 R +I 92 4 R +98 2 R +/Helvetica findfont 21 scalefont setfont + 50 54.86 moveto + (\(01\)09501) stringwidth pop -2 div 0 rmoveto + (\(01\)09501) show + 50 30.86 moveto + (10153000) stringwidth pop -2 div 0 rmoveto + (10153000) show + 50 6.86 moveto + (3) stringwidth pop -2 div 0 rmoveto + (3) show diff --git a/backend/tests/data/gif/dbar_omnstk_fh21.gif b/backend/tests/data/gif/dbar_omnstk_fh21.gif new file mode 100644 index 00000000..2352a5fd Binary files /dev/null and b/backend/tests/data/gif/dbar_omnstk_fh21.gif differ diff --git a/backend/tests/data/gif/dbar_stk_grayscale.gif b/backend/tests/data/gif/dbar_stk_grayscale.gif new file mode 100644 index 00000000..f4d30121 Binary files /dev/null and b/backend/tests/data/gif/dbar_stk_grayscale.gif differ diff --git a/backend/tests/data/gif/dpd_compliant.gif b/backend/tests/data/gif/dpd_compliant.gif index 1cacc7ed..2196865e 100644 Binary files a/backend/tests/data/gif/dpd_compliant.gif and b/backend/tests/data/gif/dpd_compliant.gif differ diff --git a/backend/tests/data/gif/itf14_height0.5_1.1.gif b/backend/tests/data/gif/itf14_height0.5_1.1.gif index 5692d600..10577014 100644 Binary files a/backend/tests/data/gif/itf14_height0.5_1.1.gif and b/backend/tests/data/gif/itf14_height0.5_1.1.gif differ diff --git a/backend/tests/data/gif/itf14_height61.8_bind4_wsp24_3.gif b/backend/tests/data/gif/itf14_height61.8_bind4_wsp24_3.gif index eb329f23..7e50287a 100644 Binary files a/backend/tests/data/gif/itf14_height61.8_bind4_wsp24_3.gif and b/backend/tests/data/gif/itf14_height61.8_bind4_wsp24_3.gif differ diff --git a/backend/tests/data/pcx/code11_fgbgtrans.pcx b/backend/tests/data/pcx/code11_fgbgtrans.pcx index 67b53a87..421da742 100644 Binary files a/backend/tests/data/pcx/code11_fgbgtrans.pcx and b/backend/tests/data/pcx/code11_fgbgtrans.pcx differ diff --git a/backend/tests/data/png/channel_cmyk_nobg.png b/backend/tests/data/png/channel_cmyk_nobg.png index 60c671bc..98f710ed 100644 Binary files a/backend/tests/data/png/channel_cmyk_nobg.png and b/backend/tests/data/png/channel_cmyk_nobg.png differ diff --git a/backend/tests/data/png/code128_egrave.png b/backend/tests/data/png/code128_egrave.png index dfc34a14..0597c50b 100644 Binary files a/backend/tests/data/png/code128_egrave.png and b/backend/tests/data/png/code128_egrave.png differ diff --git a/backend/tests/data/png/code128_egrave_bold.png b/backend/tests/data/png/code128_egrave_bold.png index 71925a04..610d1d77 100644 Binary files a/backend/tests/data/png/code128_egrave_bold.png and b/backend/tests/data/png/code128_egrave_bold.png differ diff --git a/backend/tests/data/png/code128_egrave_bold_box3.png b/backend/tests/data/png/code128_egrave_bold_box3.png index ee6949ef..e23ef968 100644 Binary files a/backend/tests/data/png/code128_egrave_bold_box3.png and b/backend/tests/data/png/code128_egrave_bold_box3.png differ diff --git a/backend/tests/data/png/code128_egrave_bold_hvwsp2_box2.png b/backend/tests/data/png/code128_egrave_bold_hvwsp2_box2.png index 0c6382e4..2906f305 100644 Binary files a/backend/tests/data/png/code128_egrave_bold_hvwsp2_box2.png and b/backend/tests/data/png/code128_egrave_bold_hvwsp2_box2.png differ diff --git a/backend/tests/data/png/code128_latin1_1.png b/backend/tests/data/png/code128_latin1_1.png index e3a4825a..02c68b89 100644 Binary files a/backend/tests/data/png/code128_latin1_1.png and b/backend/tests/data/png/code128_latin1_1.png differ diff --git a/backend/tests/data/png/code128_latin1_1_bold.png b/backend/tests/data/png/code128_latin1_1_bold.png index 0297c7e0..f8b5b45f 100644 Binary files a/backend/tests/data/png/code128_latin1_1_bold.png and b/backend/tests/data/png/code128_latin1_1_bold.png differ diff --git a/backend/tests/data/png/code128_latin1_1_sc1_5.png b/backend/tests/data/png/code128_latin1_1_sc1_5.png new file mode 100644 index 00000000..d3b1ca35 Binary files /dev/null and b/backend/tests/data/png/code128_latin1_1_sc1_5.png differ diff --git a/backend/tests/data/png/code128_latin1_1_sc2.png b/backend/tests/data/png/code128_latin1_1_sc2.png new file mode 100644 index 00000000..87e94bb6 Binary files /dev/null and b/backend/tests/data/png/code128_latin1_1_sc2.png differ diff --git a/backend/tests/data/png/code128_latin1_1_small.png b/backend/tests/data/png/code128_latin1_1_small.png index 8b95fc3b..3b900a10 100644 Binary files a/backend/tests/data/png/code128_latin1_1_small.png and b/backend/tests/data/png/code128_latin1_1_small.png differ diff --git a/backend/tests/data/png/code128_latin1_2.png b/backend/tests/data/png/code128_latin1_2.png index a7dcbe58..f3fe2402 100644 Binary files a/backend/tests/data/png/code128_latin1_2.png and b/backend/tests/data/png/code128_latin1_2.png differ diff --git a/backend/tests/data/png/code128_latin1_2_bold.png b/backend/tests/data/png/code128_latin1_2_bold.png index d11cebbc..f750d9ba 100644 Binary files a/backend/tests/data/png/code128_latin1_2_bold.png and b/backend/tests/data/png/code128_latin1_2_bold.png differ diff --git a/backend/tests/data/png/code128_latin1_2_small.png b/backend/tests/data/png/code128_latin1_2_small.png index 164359d5..8a4f28fd 100644 Binary files a/backend/tests/data/png/code128_latin1_2_small.png and b/backend/tests/data/png/code128_latin1_2_small.png differ diff --git a/backend/tests/data/png/code39_small.png b/backend/tests/data/png/code39_small.png index 772f35c9..def61eed 100644 Binary files a/backend/tests/data/png/code39_small.png and b/backend/tests/data/png/code39_small.png differ diff --git a/backend/tests/data/png/dbar_expstk.png b/backend/tests/data/png/dbar_expstk.png new file mode 100644 index 00000000..2d1264b2 Binary files /dev/null and b/backend/tests/data/png/dbar_expstk.png differ diff --git a/backend/tests/data/png/dbar_expstk_gs1nl_fh28.png b/backend/tests/data/png/dbar_expstk_gs1nl_fh28.png new file mode 100644 index 00000000..8140df38 Binary files /dev/null and b/backend/tests/data/png/dbar_expstk_gs1nl_fh28.png differ diff --git a/backend/tests/data/png/dbar_ltd.png b/backend/tests/data/png/dbar_ltd.png index 4aaa7310..495bbdda 100644 Binary files a/backend/tests/data/png/dbar_ltd.png and b/backend/tests/data/png/dbar_ltd.png differ diff --git a/backend/tests/data/png/dpd_compliant.png b/backend/tests/data/png/dpd_compliant.png index 3c919106..c57ea005 100644 Binary files a/backend/tests/data/png/dpd_compliant.png and b/backend/tests/data/png/dpd_compliant.png differ diff --git a/backend/tests/data/png/gs1_128_cc_fig12.png b/backend/tests/data/png/gs1_128_cc_fig12.png index 222284f5..cf687034 100644 Binary files a/backend/tests/data/png/gs1_128_cc_fig12.png and b/backend/tests/data/png/gs1_128_cc_fig12.png differ diff --git a/backend/tests/data/png/telepen_compliant_dpmm_300dpi.png b/backend/tests/data/png/telepen_compliant_dpmm_300dpi.png index 0ac0ef1d..40a32e26 100644 Binary files a/backend/tests/data/png/telepen_compliant_dpmm_300dpi.png and b/backend/tests/data/png/telepen_compliant_dpmm_300dpi.png differ diff --git a/backend/tests/data/print/bmp/channel_grayscale.bmp b/backend/tests/data/print/bmp/channel_grayscale.bmp new file mode 100644 index 00000000..627ec622 Binary files /dev/null and b/backend/tests/data/print/bmp/channel_grayscale.bmp differ diff --git a/backend/tests/data/print/bmp/code128_aim.bmp b/backend/tests/data/print/bmp/code128_aim.bmp index 54af89bd..987582b9 100644 Binary files a/backend/tests/data/print/bmp/code128_aim.bmp and b/backend/tests/data/print/bmp/code128_aim.bmp differ diff --git a/backend/tests/data/print/emf/channel_grayscale.emf b/backend/tests/data/print/emf/channel_grayscale.emf new file mode 100644 index 00000000..c9462ea5 Binary files /dev/null and b/backend/tests/data/print/emf/channel_grayscale.emf differ diff --git a/backend/tests/data/print/emf/code128_aim.emf b/backend/tests/data/print/emf/code128_aim.emf index 88521df8..c61b025b 100644 Binary files a/backend/tests/data/print/emf/code128_aim.emf and b/backend/tests/data/print/emf/code128_aim.emf differ diff --git a/backend/tests/data/print/eps/channel_grayscale.eps b/backend/tests/data/print/eps/channel_grayscale.eps new file mode 100644 index 00000000..b13b5cac --- /dev/null +++ b/backend/tests/data/print/eps/channel_grayscale.eps @@ -0,0 +1,23 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%Creator: Zint 2.16.0.9 +%%Title: Zint Generated Symbol +%%Pages: 0 +%%BoundingBox: 0 0 38 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 +117.92 0 0 38 R +0 0 0 setrgbcolor +100 17.92 I 0 2 R +I 4 2 R +I 8 2 R +I 12 2 R +I 16 2 R +I 22 2 R +I 28 2 R +32 6 R +/Helvetica findfont 14 scalefont setfont + 19 4.58 moveto + (12) stringwidth pop -2 div 0 rmoveto + (12) show diff --git a/backend/tests/data/print/eps/code128_aim.eps b/backend/tests/data/print/eps/code128_aim.eps index 88b33b73..1da4463d 100644 --- a/backend/tests/data/print/eps/code128_aim.eps +++ b/backend/tests/data/print/eps/code128_aim.eps @@ -1,15 +1,15 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.13.0.9 +%%Creator: Zint 2.16.0.9 %%Title: Zint Generated Symbol %%Pages: 0 -%%BoundingBox: 0 0 136 117 +%%BoundingBox: 0 0 136 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 -116.28 0 0 136 R +117.92 0 0 136 R 0 0 0 setrgbcolor -100 16.28 I 0 4 R +100 17.92 I 0 4 R I 6 2 R I 12 2 R I 22 2 R @@ -29,6 +29,6 @@ I 120 6 R I 128 2 R 132 4 R /Helvetica findfont 14 scalefont setfont - 68 2.94 moveto + 68 4.58 moveto (AIM) stringwidth pop -2 div 0 rmoveto (AIM) show diff --git a/backend/tests/data/print/gif/channel_grayscale.gif b/backend/tests/data/print/gif/channel_grayscale.gif new file mode 100644 index 00000000..2749f001 Binary files /dev/null and b/backend/tests/data/print/gif/channel_grayscale.gif differ diff --git a/backend/tests/data/print/gif/code128_aim.gif b/backend/tests/data/print/gif/code128_aim.gif index 86e5cb41..9a59296a 100644 Binary files a/backend/tests/data/print/gif/code128_aim.gif and b/backend/tests/data/print/gif/code128_aim.gif differ diff --git a/backend/tests/data/print/pcx/channel_grayscale.pcx b/backend/tests/data/print/pcx/channel_grayscale.pcx new file mode 100644 index 00000000..613758b9 Binary files /dev/null and b/backend/tests/data/print/pcx/channel_grayscale.pcx differ diff --git a/backend/tests/data/print/pcx/code128_aim.pcx b/backend/tests/data/print/pcx/code128_aim.pcx index 99df00f8..aee6ea9f 100644 Binary files a/backend/tests/data/print/pcx/code128_aim.pcx and b/backend/tests/data/print/pcx/code128_aim.pcx differ diff --git a/backend/tests/data/print/png/channel_grayscale.png b/backend/tests/data/print/png/channel_grayscale.png new file mode 100644 index 00000000..937c2feb Binary files /dev/null and b/backend/tests/data/print/png/channel_grayscale.png differ diff --git a/backend/tests/data/print/png/code128_aim.png b/backend/tests/data/print/png/code128_aim.png index e59669ac..736a4410 100644 Binary files a/backend/tests/data/print/png/code128_aim.png and b/backend/tests/data/print/png/code128_aim.png differ diff --git a/backend/tests/data/print/svg/channel_grayscale.svg b/backend/tests/data/print/svg/channel_grayscale.svg new file mode 100644 index 00000000..d5a14c29 --- /dev/null +++ b/backend/tests/data/print/svg/channel_grayscale.svg @@ -0,0 +1,12 @@ + + + + Zint Generated Symbol + + + + + 12 + + + diff --git a/backend/tests/data/print/svg/code128_aim.svg b/backend/tests/data/print/svg/code128_aim.svg index 96005e08..71d51070 100644 --- a/backend/tests/data/print/svg/code128_aim.svg +++ b/backend/tests/data/print/svg/code128_aim.svg @@ -1,9 +1,9 @@ - + Zint Generated Symbol - + AIM diff --git a/backend/tests/data/print/tif/channel_grayscale.tif b/backend/tests/data/print/tif/channel_grayscale.tif new file mode 100644 index 00000000..a8b3474f Binary files /dev/null and b/backend/tests/data/print/tif/channel_grayscale.tif differ diff --git a/backend/tests/data/print/tif/code128_aim.tif b/backend/tests/data/print/tif/code128_aim.tif index a8f640a4..38d3947e 100644 Binary files a/backend/tests/data/print/tif/code128_aim.tif and b/backend/tests/data/print/tif/code128_aim.tif differ diff --git a/backend/tests/data/print/txt/channel_grayscale.txt b/backend/tests/data/print/txt/channel_grayscale.txt new file mode 100644 index 00000000..6f8b79de --- /dev/null +++ b/backend/tests/data/print/txt/channel_grayscale.txt @@ -0,0 +1 @@ +AA 92 E diff --git a/backend/tests/data/svg/channel_cmyk_nobg.svg b/backend/tests/data/svg/channel_cmyk_nobg.svg index c92aa84e..bc6326d5 100644 --- a/backend/tests/data/svg/channel_cmyk_nobg.svg +++ b/backend/tests/data/svg/channel_cmyk_nobg.svg @@ -1,6 +1,6 @@ - + Zint Generated Symbol diff --git a/backend/tests/data/svg/code128_amperands.svg b/backend/tests/data/svg/code128_amperands.svg index 80c94a2e..438b0f39 100644 --- a/backend/tests/data/svg/code128_amperands.svg +++ b/backend/tests/data/svg/code128_amperands.svg @@ -1,9 +1,9 @@ - + Zint Generated Symbol - + <>"&' diff --git a/backend/tests/data/svg/code128_egrave_bold.svg b/backend/tests/data/svg/code128_egrave_bold.svg index 2dae6fc1..83cfe851 100644 --- a/backend/tests/data/svg/code128_egrave_bold.svg +++ b/backend/tests/data/svg/code128_egrave_bold.svg @@ -1,9 +1,9 @@ - + Zint Generated Symbol - + Égjpqy diff --git a/backend/tests/data/svg/code128_egrave_bold_box3.svg b/backend/tests/data/svg/code128_egrave_bold_box3.svg index 71b51f21..3786d985 100644 --- a/backend/tests/data/svg/code128_egrave_bold_box3.svg +++ b/backend/tests/data/svg/code128_egrave_bold_box3.svg @@ -1,9 +1,9 @@ - + Zint Generated Symbol - + Égjpqy diff --git a/backend/tests/data/svg/code128_egrave_bold_embed.svg b/backend/tests/data/svg/code128_egrave_bold_embed.svg index d963d65f..502b0eb6 100644 --- a/backend/tests/data/svg/code128_egrave_bold_embed.svg +++ b/backend/tests/data/svg/code128_egrave_bold_embed.svg @@ -1,10 +1,10 @@ - + Zint Generated Symbol - + Égjpqy diff --git a/backend/tests/data/svg/code128_egrave_bold_hvwsp2_box2.svg b/backend/tests/data/svg/code128_egrave_bold_hvwsp2_box2.svg index 19bee711..e0583b93 100644 --- a/backend/tests/data/svg/code128_egrave_bold_hvwsp2_box2.svg +++ b/backend/tests/data/svg/code128_egrave_bold_hvwsp2_box2.svg @@ -1,9 +1,9 @@ - + Zint Generated Symbol - + Égjpqy diff --git a/backend/tests/data/svg/code128_egrave_bold_hvwsp3.svg b/backend/tests/data/svg/code128_egrave_bold_hvwsp3.svg index 1e98509f..fc5eb9a8 100644 --- a/backend/tests/data/svg/code128_egrave_bold_hvwsp3.svg +++ b/backend/tests/data/svg/code128_egrave_bold_hvwsp3.svg @@ -1,9 +1,9 @@ - + Zint Generated Symbol - + Égjpqy diff --git a/backend/tests/data/svg/code128_latin1_1.svg b/backend/tests/data/svg/code128_latin1_1.svg new file mode 100644 index 00000000..a3d50a7b --- /dev/null +++ b/backend/tests/data/svg/code128_latin1_1.svg @@ -0,0 +1,12 @@ + + + + Zint Generated Symbol + + + + + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ + + + diff --git a/backend/tests/data/svg/code128_latin1_2.svg b/backend/tests/data/svg/code128_latin1_2.svg new file mode 100644 index 00000000..7d66c83c --- /dev/null +++ b/backend/tests/data/svg/code128_latin1_2.svg @@ -0,0 +1,12 @@ + + + + Zint Generated Symbol + + + + + ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ + + + diff --git a/backend/tests/data/svg/code39_small.svg b/backend/tests/data/svg/code39_small.svg index bea5d3d4..e663d4b1 100644 --- a/backend/tests/data/svg/code39_small.svg +++ b/backend/tests/data/svg/code39_small.svg @@ -1,9 +1,9 @@ - + Zint Generated Symbol - + *123* diff --git a/backend/tests/data/svg/dbar_expstk.svg b/backend/tests/data/svg/dbar_expstk.svg new file mode 100644 index 00000000..8b349548 --- /dev/null +++ b/backend/tests/data/svg/dbar_expstk.svg @@ -0,0 +1,15 @@ + + + + Zint Generated Symbol + + + + + (01)09501101530003(17)14070 + + + 4(10)AB-123 + + + diff --git a/backend/tests/data/svg/dbar_expstk_gs1nl_fh28.svg b/backend/tests/data/svg/dbar_expstk_gs1nl_fh28.svg new file mode 100644 index 00000000..90814a35 --- /dev/null +++ b/backend/tests/data/svg/dbar_expstk_gs1nl_fh28.svg @@ -0,0 +1,23 @@ + + + + Zint Generated Symbol + + + + + (01)0950110153 + + + 0003 + + + +(17)140704 + + + +(10)AB-123 + + + diff --git a/backend/tests/data/svg/dbar_ltd.svg b/backend/tests/data/svg/dbar_ltd.svg index b4c7d638..d769e336 100644 --- a/backend/tests/data/svg/dbar_ltd.svg +++ b/backend/tests/data/svg/dbar_ltd.svg @@ -1,9 +1,9 @@ - + Zint Generated Symbol - + (01)00123456789098 diff --git a/backend/tests/data/svg/dpd_compliant.svg b/backend/tests/data/svg/dpd_compliant.svg index d9088fad..0cf14505 100644 --- a/backend/tests/data/svg/dpd_compliant.svg +++ b/backend/tests/data/svg/dpd_compliant.svg @@ -1,9 +1,9 @@ - + Zint Generated Symbol - + 0081 827 0998 0000 0200 28 101 276 B diff --git a/backend/tests/data/svg/gs1_128_cc_fig12.svg b/backend/tests/data/svg/gs1_128_cc_fig12.svg index 445f4127..1d4c4b1c 100644 --- a/backend/tests/data/svg/gs1_128_cc_fig12.svg +++ b/backend/tests/data/svg/gs1_128_cc_fig12.svg @@ -1,9 +1,9 @@ - + Zint Generated Symbol - + (00)030123456789012340 diff --git a/backend/tests/data/svg/telepen_height0.4_rotate_180.svg b/backend/tests/data/svg/telepen_height0.4_rotate_180.svg index 549a1052..34e6ff53 100644 --- a/backend/tests/data/svg/telepen_height0.4_rotate_180.svg +++ b/backend/tests/data/svg/telepen_height0.4_rotate_180.svg @@ -1,11 +1,11 @@ - + Zint Generated Symbol - - - + + + A diff --git a/backend/tests/data/tif/code128_bgalpha.tif b/backend/tests/data/tif/code128_bgalpha.tif index f995a98b..53d72572 100644 Binary files a/backend/tests/data/tif/code128_bgalpha.tif and b/backend/tests/data/tif/code128_bgalpha.tif differ diff --git a/backend/tests/data/tif/code128_cmyk.tif b/backend/tests/data/tif/code128_cmyk.tif index 600c2b1b..19453e96 100644 Binary files a/backend/tests/data/tif/code128_cmyk.tif and b/backend/tests/data/tif/code128_cmyk.tif differ diff --git a/backend/tests/data/tif/code128_cmyk_fgbg.tif b/backend/tests/data/tif/code128_cmyk_fgbg.tif index 2e7b3a05..246d5ac5 100644 Binary files a/backend/tests/data/tif/code128_cmyk_fgbg.tif and b/backend/tests/data/tif/code128_cmyk_fgbg.tif differ diff --git a/backend/tests/data/tif/code128_cmyk_fgbgalpha.tif b/backend/tests/data/tif/code128_cmyk_fgbgalpha.tif index 921b00b3..f47c0b9c 100644 Binary files a/backend/tests/data/tif/code128_cmyk_fgbgalpha.tif and b/backend/tests/data/tif/code128_cmyk_fgbgalpha.tif differ diff --git a/backend/tests/data/tif/code128_cmyk_fgbgcmyk.tif b/backend/tests/data/tif/code128_cmyk_fgbgcmyk.tif index 0c46ac72..fc710ec7 100644 Binary files a/backend/tests/data/tif/code128_cmyk_fgbgcmyk.tif and b/backend/tests/data/tif/code128_cmyk_fgbgcmyk.tif differ diff --git a/backend/tests/data/tif/code128_fgalpha.tif b/backend/tests/data/tif/code128_fgalpha.tif index 369cc071..aa505698 100644 Binary files a/backend/tests/data/tif/code128_fgalpha.tif and b/backend/tests/data/tif/code128_fgalpha.tif differ diff --git a/backend/tests/data/tif/code128_fgbg.tif b/backend/tests/data/tif/code128_fgbg.tif index 962e3169..23899a85 100644 Binary files a/backend/tests/data/tif/code128_fgbg.tif and b/backend/tests/data/tif/code128_fgbg.tif differ diff --git a/backend/tests/data/tif/code128_fgbgalpha.tif b/backend/tests/data/tif/code128_fgbgalpha.tif index fa2a6cad..cae39f09 100644 Binary files a/backend/tests/data/tif/code128_fgbgalpha.tif and b/backend/tests/data/tif/code128_fgbgalpha.tif differ diff --git a/backend/tests/data/tif/code128_reverse.tif b/backend/tests/data/tif/code128_reverse.tif index 1b062f57..f0408afe 100644 Binary files a/backend/tests/data/tif/code128_reverse.tif and b/backend/tests/data/tif/code128_reverse.tif differ diff --git a/backend/tests/data/tif/code32_dpmm_200dpi.tif b/backend/tests/data/tif/code32_dpmm_200dpi.tif index bd4b8eab..41656f70 100644 Binary files a/backend/tests/data/tif/code32_dpmm_200dpi.tif and b/backend/tests/data/tif/code32_dpmm_200dpi.tif differ diff --git a/backend/tests/test_bmp.c b/backend/tests/test_bmp.c index 3c9a0cdc..3b8811fd 100644 --- a/backend/tests/test_bmp.c +++ b/backend/tests/test_bmp.c @@ -136,6 +136,8 @@ static void test_print(const testCtx *const p_ctx) { int output_options; int whitespace_width; int whitespace_height; + int show_hrt; + int font_height; int option_1; int option_2; const char *fgcolour; @@ -144,14 +146,15 @@ static void test_print(const testCtx *const p_ctx) { const char *expected_file; }; static const struct item data[] = { - /* 0*/ { BARCODE_PDF417, -1, -1, 5, -1, -1, -1, "147AD0", "FC9630", "123", "pdf417_fg_bg.bmp" }, - /* 1*/ { BARCODE_ULTRA, -1, -1, 5, -1, -1, -1, "147AD0", "FC9630", "123", "ultracode_fg_bg.bmp" }, - /* 2*/ { BARCODE_ULTRA, 1, BARCODE_BOX, 1, 1, -1, -1, "147AD0", "FC9630", "123", "ultracode_fg_bg_hvwsp1_box1.bmp" }, - /* 3*/ { BARCODE_PDF417COMP, -1, -1, 2, 2, -1, -1, "", "", "123", "pdf417comp_hvwsp2.bmp" }, + /* 0*/ { BARCODE_PDF417, -1, -1, 5, -1, -1, -1, -1, -1, "147AD0", "FC9630", "123", "pdf417_fg_bg.bmp" }, + /* 1*/ { BARCODE_ULTRA, -1, -1, 5, -1, -1, -1, -1, -1, "147AD0", "FC9630", "123", "ultracode_fg_bg.bmp" }, + /* 2*/ { BARCODE_ULTRA, 1, BARCODE_BOX, 1, 1, -1, -1, -1, -1, "147AD0", "FC9630", "123", "ultracode_fg_bg_hvwsp1_box1.bmp" }, + /* 3*/ { BARCODE_PDF417COMP, -1, -1, 2, 2, -1, -1, -1, -1, "", "", "123", "pdf417comp_hvwsp2.bmp" }, + /* 4*/ { BARCODE_DBAR_EXP, -1, -1, -1, -1, -1, 28, -1, -1, "", "", "[01]09501101530003[17]140704[10]AB-123", "dbar_exp_fnt28.bmp" }, }; const int data_size = ARRAY_SIZE(data); int i, length, ret; - struct zint_symbol *symbol; + struct zint_symbol *symbol = NULL; const char *data_dir = "/backend/tests/data/bmp"; const char *bmp = "out.bmp"; @@ -163,7 +166,7 @@ static void test_print(const testCtx *const p_ctx) { const char *const have_identify = testUtilHaveIdentify(); - testStart(p_ctx->func_name); + testStartSymbol(p_ctx->func_name, &symbol); if (p_ctx->generate) { char data_dir_path[1024]; @@ -194,6 +197,12 @@ 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].show_hrt != -1) { + symbol->show_hrt = data[i].show_hrt; + } + if (data[i].font_height != -1) { + symbol->show_hrt |= data[i].font_height << 16; + } if (*data[i].fgcolour) { strcpy(symbol->fgcolour, data[i].fgcolour); } @@ -214,10 +223,11 @@ static void test_print(const testCtx *const p_ctx) { "i:%d testUtilDataPath == 0\n", i); if (p_ctx->generate) { - printf(" /*%3d*/ { %s, %d, %s, %d, %d, %d, %d, \"%s\", \"%s\", \"%s\", \"%s\"},\n", + printf(" /*%3d*/ { %s, %d, %s, %d, %d, %s, %d, %d, %d, \"%s\", \"%s\", \"%s\", \"%s\"},\n", i, testUtilBarcodeName(data[i].symbology), data[i].border_width, testUtilOutputOptionsName(data[i].output_options), data[i].whitespace_width, data[i].whitespace_height, + testUtilShowHRTName(data[i].show_hrt), data[i].font_height, data[i].option_1, data[i].option_2, data[i].fgcolour, data[i].bgcolour, testUtilEscape(data[i].data, length, escaped, escaped_size), data[i].expected_file); ret = testUtilRename(symbol->outfile, expected_file); diff --git a/backend/tests/test_filemem.c b/backend/tests/test_filemem.c index 9d0853e7..0a28e636 100644 --- a/backend/tests/test_filemem.c +++ b/backend/tests/test_filemem.c @@ -57,10 +57,10 @@ static void test_file(const testCtx *const p_ctx) { /* 0*/ { BARCODE_CODE128, BARCODE_MEMORY_FILE, "out.svg", "ABCDEF", -1, 0, "\n" "\n" - "\n" + "\n" " Zint Generated Symbol\n" " \n" - " \n" + " \n" " \n" " \n" " ABCDEF\n" diff --git a/backend/tests/test_gif.c b/backend/tests/test_gif.c index f1afceea..6e6a7f68 100644 --- a/backend/tests/test_gif.c +++ b/backend/tests/test_gif.c @@ -134,6 +134,8 @@ static void test_print(const testCtx *const p_ctx) { int output_options; int whitespace_width; int whitespace_height; + int show_hrt; + int font_height; int option_1; int option_2; float height; @@ -147,44 +149,46 @@ static void test_print(const testCtx *const p_ctx) { const char *comment; }; static const struct item data[] = { - /* 0*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 0, 0, { 0, 0, "" }, "", "", "12", "dotcode_1.0.gif", "" }, - /* 1*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 0, 0.1, { 0, 0, "" }, "", "", "12", "dotcode_1.0_ds0.1.gif", "" }, - /* 2*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 0, 1.1, { 0, 0, "" }, "", "", "12", "dotcode_1.0_ds1.1.gif", "" }, - /* 3*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 1.5, 0, { 0, 0, "" }, "", "", "12", "dotcode_1.5.gif", "" }, - /* 4*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 1.5, 0.4, { 0, 0, "" }, "", "", "12", "dotcode_1.5_ds0.4.gif", "" }, - /* 5*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 1.5, 1.1, { 0, 0, "" }, "", "", "12", "dotcode_1.5_ds1.1.gif", "" }, - /* 6*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 1.5, 2.1, { 0, 0, "" }, "", "", "12", "dotcode_1.5_ds2.1.gif", "" }, - /* 7*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 2, 0, { 0, 0, "" }, "", "", "12", "dotcode_2.0.gif", "" }, - /* 8*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 2, 0.9, { 0, 0, "" }, "", "", "12", "dotcode_2.0_ds0.9.gif", "" }, - /* 9*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 2, 1.1, { 0, 0, "" }, "", "", "12", "dotcode_2.0_ds1.1.gif", "" }, - /* 10*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 3, 0, { 0, 0, "" }, "", "", "12", "dotcode_3.0.gif", "" }, - /* 11*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 3, 0.4, { 0, 0, "" }, "", "", "12", "dotcode_3.0_ds0.4.gif", "" }, - /* 12*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 3, 1.1, { 0, 0, "" }, "", "", "12", "dotcode_3.0_ds1.1.gif", "" }, - /* 13*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 3.5, 0, { 0, 0, "" }, "", "", "12", "dotcode_3.5.gif", "" }, - /* 14*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 3.5, 0.4, { 0, 0, "" }, "", "", "12", "dotcode_3.5_ds0.4.gif", "" }, - /* 15*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 3.5, 1.1, { 0, 0, "" }, "", "", "12", "dotcode_3.5_ds1.1.gif", "" }, - /* 16*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 5, 0, { 0, 0, "" }, "", "", "12", "dotcode_5.0.gif", "" }, - /* 17*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 5, 0.2, { 0, 0, "" }, "", "", "12", "dotcode_5.0_ds0.2.gif", "" }, - /* 18*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 5, 1.1, { 0, 0, "" }, "", "", "12", "dotcode_5.0_ds1.1.gif", "" }, - /* 19*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 5, 1.7, { 0, 0, "" }, "", "", "12", "dotcode_5.0_ds1.7.gif", "" }, - /* 20*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 0, 0, { 0, 0, "" }, "2674C344", "FDFFC2CC", "12", "dotcode_bgfgalpha.gif", "" }, - /* 21*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 0, 0, { 0, 0, "" }, "00000000", "FFFFFF00", "12", "dotcode_bgfgtrans.gif", "" }, - /* 22*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 0, 0, { 0, 0, "" }, "00000000", "FFFFFF", "12", "dotcode_fgtrans.gif", "" }, - /* 23*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, 0, 0, 0, { 0, 0, "" }, "000000", "FFFFFF00", "12", "dotcode_bgtrans.gif", "" }, - /* 24*/ { BARCODE_DOTCODE, -1, CMYK_COLOUR, -1, -1, -1, -1, 0, 0, 0, { 0, 0, "" }, "71,0,40,44", "", "12", "dotcode_cmyk_fg.gif", "" }, - /* 25*/ { BARCODE_ULTRA, 1, BARCODE_BOX, 1, 1, -1, -1, 0, 0, 0, { 0, 0, "" }, "0000FF", "FF0000", "12", "ultra_fgbg_hvwsp1_box1.gif", "" }, - /* 26*/ { BARCODE_ULTRA, 1, BARCODE_BOX, 1, 1, -1, -1, 0, 0, 0, { 0, 0, "" }, "0000FF00", "FF000000", "12", "ultra_fgbg_hvwsp1_box1_bgfgtrans.gif", "" }, - /* 27*/ { BARCODE_ULTRA, 1, BARCODE_BOX, 1, 1, -1, -1, 0, 0, 0, { 0, 0, "" }, "0000FF", "FF000000", "12", "ultra_fgbg_hvwsp1_box1_bgtrans.gif", "" }, - /* 28*/ { BARCODE_ULTRA, 1, BARCODE_BOX, 1, 1, -1, -1, 0, 0, 0, { 0, 0, "" }, "0000FF00", "FF0000", "12", "ultra_fgbg_hvwsp1_box1_fgtrans.gif", "" }, - /* 29*/ { BARCODE_ITF14, 4, BARCODE_BIND, 24, -1, -1, -1, 61.8, 3, 0, { 0, 0, "" }, "", "", "0501054800395", "itf14_height61.8_bind4_wsp24_3.gif", "#204 ARM-Cortex crash" }, - /* 30*/ { BARCODE_ITF14, 0, BARCODE_BIND, -1, -1, -1, -1, 0.5, 0.5, 0, { 0, 0, "" }, "", "", "0501054800395", "itf14_height0.5_box0_0.5.gif", "No box, no text" }, - /* 31*/ { BARCODE_ITF14, -1, -1, -1, -1, -1, -1, 0.5, 1.1, 0, { 0, 0, "" }, "", "", "0501054800395", "itf14_height0.5_1.1.gif", "" }, - /* 32*/ { BARCODE_CODE16K, -1, -1, 3, 5, -1, -1, 0.5, 0, 0, { 0, 0, "" }, "", "", "1234567890", "code16k_height0.5_wsp3_vwsp5.gif", "Separator covers bars" }, - /* 33*/ { BARCODE_CODE16K, -1, -1, 3, 5, -1, -1, 1.5, 0, 0, { 0, 0, "" }, "", "", "1234567890", "code16k_height1.5_wsp3_vwsp5.gif", "" }, - /* 34*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, -1, 0, 0, 0, { 2, 9, "001002" }, "", "", "1234567890", "datamatrix_seq2of9.gif", "" }, - /* 35*/ { BARCODE_ULTRA, -1, -1, 1, -1, -1, 2, 0, 0, 0, { 0, 0, "" }, "", "", "12", "ultra_rev2.gif", "Revision 2" }, - /* 36*/ { BARCODE_ULTRA, 1, BARCODE_BOX | BARCODE_QUIET_ZONES | BARCODE_NO_QUIET_ZONES, -1, -1, -1, -1, 0, 0, 0, { 0, 0, "" }, "", "", "12", "ultra_box.gif", "NO_QUIET_ZONES trumps QUIET_ZONES" }, - /* 37*/ { BARCODE_DPD, -1, BARCODE_QUIET_ZONES | COMPLIANT_HEIGHT, -1, -1, -1, -1, 0, 0, 0, { 0, 0, "" }, "", "", "008182709980000020028101276", "dpd_compliant.gif", "Now with bind top 3X default" }, + /* 0*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, { 0, 0, "" }, "", "", "12", "dotcode_1.0.gif", "" }, + /* 1*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0.1, { 0, 0, "" }, "", "", "12", "dotcode_1.0_ds0.1.gif", "" }, + /* 2*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 1.1, { 0, 0, "" }, "", "", "12", "dotcode_1.0_ds1.1.gif", "" }, + /* 3*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1.5, 0, { 0, 0, "" }, "", "", "12", "dotcode_1.5.gif", "" }, + /* 4*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1.5, 0.4, { 0, 0, "" }, "", "", "12", "dotcode_1.5_ds0.4.gif", "" }, + /* 5*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1.5, 1.1, { 0, 0, "" }, "", "", "12", "dotcode_1.5_ds1.1.gif", "" }, + /* 6*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1.5, 2.1, { 0, 0, "" }, "", "", "12", "dotcode_1.5_ds2.1.gif", "" }, + /* 7*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 2, 0, { 0, 0, "" }, "", "", "12", "dotcode_2.0.gif", "" }, + /* 8*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 2, 0.9, { 0, 0, "" }, "", "", "12", "dotcode_2.0_ds0.9.gif", "" }, + /* 9*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 2, 1.1, { 0, 0, "" }, "", "", "12", "dotcode_2.0_ds1.1.gif", "" }, + /* 10*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 3, 0, { 0, 0, "" }, "", "", "12", "dotcode_3.0.gif", "" }, + /* 11*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 3, 0.4, { 0, 0, "" }, "", "", "12", "dotcode_3.0_ds0.4.gif", "" }, + /* 12*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 3, 1.1, { 0, 0, "" }, "", "", "12", "dotcode_3.0_ds1.1.gif", "" }, + /* 13*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 3.5, 0, { 0, 0, "" }, "", "", "12", "dotcode_3.5.gif", "" }, + /* 14*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 3.5, 0.4, { 0, 0, "" }, "", "", "12", "dotcode_3.5_ds0.4.gif", "" }, + /* 15*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 3.5, 1.1, { 0, 0, "" }, "", "", "12", "dotcode_3.5_ds1.1.gif", "" }, + /* 16*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 5, 0, { 0, 0, "" }, "", "", "12", "dotcode_5.0.gif", "" }, + /* 17*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 5, 0.2, { 0, 0, "" }, "", "", "12", "dotcode_5.0_ds0.2.gif", "" }, + /* 18*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 5, 1.1, { 0, 0, "" }, "", "", "12", "dotcode_5.0_ds1.1.gif", "" }, + /* 19*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 5, 1.7, { 0, 0, "" }, "", "", "12", "dotcode_5.0_ds1.7.gif", "" }, + /* 20*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, { 0, 0, "" }, "2674C344", "FDFFC2CC", "12", "dotcode_bgfgalpha.gif", "" }, + /* 21*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, { 0, 0, "" }, "00000000", "FFFFFF00", "12", "dotcode_bgfgtrans.gif", "" }, + /* 22*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, { 0, 0, "" }, "00000000", "FFFFFF", "12", "dotcode_fgtrans.gif", "" }, + /* 23*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, { 0, 0, "" }, "000000", "FFFFFF00", "12", "dotcode_bgtrans.gif", "" }, + /* 24*/ { BARCODE_DOTCODE, -1, CMYK_COLOUR, -1, -1, -1, -1, -1, -1, 0, 0, 0, { 0, 0, "" }, "71,0,40,44", "", "12", "dotcode_cmyk_fg.gif", "" }, + /* 25*/ { BARCODE_ULTRA, 1, BARCODE_BOX, 1, 1, -1, -1, -1, -1, 0, 0, 0, { 0, 0, "" }, "0000FF", "FF0000", "12", "ultra_fgbg_hvwsp1_box1.gif", "" }, + /* 26*/ { BARCODE_ULTRA, 1, BARCODE_BOX, 1, 1, -1, -1, -1, -1, 0, 0, 0, { 0, 0, "" }, "0000FF00", "FF000000", "12", "ultra_fgbg_hvwsp1_box1_bgfgtrans.gif", "" }, + /* 27*/ { BARCODE_ULTRA, 1, BARCODE_BOX, 1, 1, -1, -1, -1, -1, 0, 0, 0, { 0, 0, "" }, "0000FF", "FF000000", "12", "ultra_fgbg_hvwsp1_box1_bgtrans.gif", "" }, + /* 28*/ { BARCODE_ULTRA, 1, BARCODE_BOX, 1, 1, -1, -1, -1, -1, 0, 0, 0, { 0, 0, "" }, "0000FF00", "FF0000", "12", "ultra_fgbg_hvwsp1_box1_fgtrans.gif", "" }, + /* 29*/ { BARCODE_ITF14, 4, BARCODE_BIND, 24, -1, -1, -1, -1, -1, 61.8, 3, 0, { 0, 0, "" }, "", "", "0501054800395", "itf14_height61.8_bind4_wsp24_3.gif", "#204 ARM-Cortex crash" }, + /* 30*/ { BARCODE_ITF14, 0, BARCODE_BIND, -1, -1, -1, -1, -1, -1, 0.5, 0.5, 0, { 0, 0, "" }, "", "", "0501054800395", "itf14_height0.5_box0_0.5.gif", "No box, no text" }, + /* 31*/ { BARCODE_ITF14, -1, -1, -1, -1, -1, -1, -1, -1, 0.5, 1.1, 0, { 0, 0, "" }, "", "", "0501054800395", "itf14_height0.5_1.1.gif", "" }, + /* 32*/ { BARCODE_CODE16K, -1, -1, 3, 5, -1, -1, -1, -1, 0.5, 0, 0, { 0, 0, "" }, "", "", "1234567890", "code16k_height0.5_wsp3_vwsp5.gif", "Separator covers bars" }, + /* 33*/ { BARCODE_CODE16K, -1, -1, 3, 5, -1, -1, -1, -1, 1.5, 0, 0, { 0, 0, "" }, "", "", "1234567890", "code16k_height1.5_wsp3_vwsp5.gif", "" }, + /* 34*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, { 2, 9, "001002" }, "", "", "1234567890", "datamatrix_seq2of9.gif", "" }, + /* 35*/ { BARCODE_ULTRA, -1, -1, 1, -1, -1, -1, -1, 2, 0, 0, 0, { 0, 0, "" }, "", "", "12", "ultra_rev2.gif", "Revision 2" }, + /* 36*/ { BARCODE_ULTRA, 1, BARCODE_BOX | BARCODE_QUIET_ZONES | BARCODE_NO_QUIET_ZONES, -1, -1, -1, -1, -1, -1, 0, 0, 0, { 0, 0, "" }, "", "", "12", "ultra_box.gif", "NO_QUIET_ZONES trumps QUIET_ZONES" }, + /* 37*/ { BARCODE_DPD, -1, BARCODE_QUIET_ZONES | COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, -1, 0, 0, 0, { 0, 0, "" }, "", "", "008182709980000020028101276", "dpd_compliant.gif", "Now with bind top 3X default" }, + /* 38*/ { BARCODE_DBAR_STK, -1, COMPLIANT_HEIGHT, -1, -1, ZINT_HRT_STACKED | ZINT_HRT_GRAYSCALE, -1, -1, -1, 0, 0, 0, { 0, 0, "" }, "", "", "0950110153000", "dbar_stk_grayscale.gif", "" }, + /* 39*/ { BARCODE_DBAR_OMNSTK, -1, COMPLIANT_HEIGHT, -1, -1, ZINT_HRT_STACKED, 21, -1, -1, 0, 0, 0, { 0, 0, "" }, "", "", "0950110153000", "dbar_omnstk_fh21.gif", "" }, }; const int data_size = ARRAY_SIZE(data); int i, length, ret; @@ -231,6 +235,12 @@ 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].show_hrt != -1) { + symbol->show_hrt = data[i].show_hrt; + } + if (data[i].font_height != -1) { + symbol->show_hrt |= data[i].font_height << 16; + } if (data[i].height) { symbol->height = data[i].height; } @@ -263,10 +273,12 @@ static void test_print(const testCtx *const p_ctx) { "i:%d testUtilDataPath == 0\n", i); if (p_ctx->generate) { - printf(" /*%3d*/ { %s, %d, %s, %d, %d, %d, %d, %.5g, %.5g, %.5g, \"%s\", \"%s\", \"%s\", \"%s\", \"%s\" },\n", + printf(" /*%3d*/ { %s, %d, %s, %d, %d, %s, %d, %d, %d, %.5g, %.5g, %.5g, \"%s\", \"%s\", \"%s\"" + ", \"%s\", \"%s\" },\n", i, testUtilBarcodeName(data[i].symbology), data[i].border_width, testUtilOutputOptionsName(data[i].output_options), data[i].whitespace_width, data[i].whitespace_height, + testUtilShowHRTName(data[i].show_hrt), data[i].font_height, data[i].option_1, data[i].option_2, data[i].height, data[i].scale, data[i].dot_size, data[i].fgcolour, data[i].bgcolour, testUtilEscape(data[i].data, length, escaped, escaped_size), data[i].expected_file, diff --git a/backend/tests/test_gs1.c b/backend/tests/test_gs1.c index 54507439..49cbaccd 100644 --- a/backend/tests/test_gs1.c +++ b/backend/tests/test_gs1.c @@ -3224,6 +3224,7 @@ INTERNAL int zint_test_gs1_hrt_conv_parsed(struct zint_symbol *symbol, const uns static void test_gs1_hrt_conv_parsed(const testCtx *const p_ctx) { struct item { + int show_hrt; const char *data; int ai_count; int ai_vals[4]; @@ -3235,11 +3236,15 @@ static void test_gs1_hrt_conv_parsed(const testCtx *const p_ctx) { }; /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */ static const struct item data[] = { - /* 0*/ { "^0112345678901231", 1, { 1, 0, 0, 0 }, { 1, 0, 0, 0 }, { 3, 0, 0, 0 }, { 14, 0, 0, 0 }, 0, "(01)12345678901231" }, - /* 1*/ { "^011234567890123190ABCD^21123456AB", 3, { 1, 90, 21, 0 }, { 1, 17, 24, 0 }, { 3, 19, 26, 0 }, { 14, 4, 8, 0 }, 0, "(01)12345678901231(90)ABCD(21)123456AB" }, - /* 2*/ { "^91123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890^92123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890^93123456789012345678901234567890123456789012345678901234567890123", 3, { 91, 92, 93, 0 }, { 1, 94, 187, 0 }, { 3, 96, 189, 0 }, { 90, 90, 63, 0 }, 0, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)123456789012345678901234567890123456789012345678901234567890123" }, - /* 3*/ { "^91123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890^92123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890^931234567890123456789012345678901234567890123456789012345678901234", 3, { 91, 92, 93, 0 }, { 1, 94, 187, 0 }, { 3, 96, 189, 0 }, { 90, 90, 64, 0 }, ZINT_WARN_HRT_TRUNCATED, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" }, - /* 4*/ { "^91123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890^92123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890^93123456789012345678901234567890123456789012345678901234567890123^94123", 4, { 91, 92, 93, 94 }, { 1, 94, 187, 256 }, { 3, 96, 189, 258 }, { 90, 90, 63, 3 }, ZINT_WARN_HRT_TRUNCATED, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)123456789012345678901234567890123456789012345678901234567890123" }, + /* 0*/ { -1, "^0112345678901231", 1, { 1, 0, 0, 0 }, { 1, 0, 0, 0 }, { 3, 0, 0, 0 }, { 14, 0, 0, 0 }, 0, "(01)12345678901231" }, + /* 1*/ { ZINT_HRT_GS1_NEWLINE, "^0112345678901231", 1, { 1, 0, 0, 0 }, { 1, 0, 0, 0 }, { 3, 0, 0, 0 }, { 14, 0, 0, 0 }, 0, "(01)12345678901231" }, + /* 2*/ { -1, "^011234567890123190ABCD^21123456AB", 3, { 1, 90, 21, 0 }, { 1, 17, 24, 0 }, { 3, 19, 26, 0 }, { 14, 4, 8, 0 }, 0, "(01)12345678901231(90)ABCD(21)123456AB" }, + /* 3*/ { ZINT_HRT_GS1_NEWLINE, "^011234567890123190ABCD^21123456AB", 3, { 1, 90, 21, 0 }, { 1, 17, 24, 0 }, { 3, 19, 26, 0 }, { 14, 4, 8, 0 }, 0, "(01)12345678901231\n(90)ABCD\n(21)123456AB" }, + /* 4*/ { -1, "^91123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890^92123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890^93123456789012345678901234567890123456789012345678901234567890123", 3, { 91, 92, 93, 0 }, { 1, 94, 187, 0 }, { 3, 96, 189, 0 }, { 90, 90, 63, 0 }, 0, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)123456789012345678901234567890123456789012345678901234567890123" }, + /* 5*/ { -1, "^91123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890^92123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890^931234567890123456789012345678901234567890123456789012345678901234", 3, { 91, 92, 93, 0 }, { 1, 94, 187, 0 }, { 3, 96, 189, 0 }, { 90, 90, 64, 0 }, ZINT_WARN_HRT_TRUNCATED, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" }, + /* 6*/ { -1, "^91123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890^92123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890^93123456789012345678901234567890123456789012345678901234567890123^94123", 4, { 91, 92, 93, 94 }, { 1, 94, 187, 256 }, { 3, 96, 189, 258 }, { 90, 90, 63, 3 }, ZINT_WARN_HRT_TRUNCATED, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)123456789012345678901234567890123456789012345678901234567890123" }, + /* 7*/ { ZINT_HRT_GS1_NEWLINE, "^91123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890^92123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890^931234567890123456789012345678901234567890123456789012345678901", 3, { 91, 92, 93, 0 }, { 1, 94, 187, 0 }, { 3, 96, 189, 0 }, { 90, 90, 61, 0 }, 0, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\n(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\n(93)1234567890123456789012345678901234567890123456789012345678901" }, + /* 7*/ { ZINT_HRT_GS1_NEWLINE, "^91123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890^92123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890^9312345678901234567890123456789012345678901234567890123456789012", 3, { 91, 92, 93, 0 }, { 1, 94, 187, 0 }, { 3, 96, 189, 0 }, { 90, 90, 62, 0 }, ZINT_WARN_HRT_TRUNCATED, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\n(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" }, }; const int data_size = ARRAY_SIZE(data); int i, length, ret; @@ -3253,6 +3258,9 @@ static void test_gs1_hrt_conv_parsed(const testCtx *const p_ctx) { symbol = ZBarcode_Create(); assert_nonnull(symbol, "Symbol not created\n"); + if (data[i].show_hrt != -1) { + symbol->show_hrt = data[i].show_hrt; + } length = (int) strlen(data[i].data); ret = zint_test_gs1_hrt_conv_parsed(symbol, ZCUCP(data[i].data), length, data[i].ai_count, data[i].ai_vals, @@ -3277,17 +3285,23 @@ INTERNAL int zint_test_gs1_hrt_cpy(struct zint_symbol *symbol, const unsigned ch static void test_gs1_hrt_cpy(const testCtx *const p_ctx) { struct item { + int show_hrt; const char *data; int ret; const char *expected; }; /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */ static const struct item data[] = { - /* 0*/ { "(01)12345678901231", 0, "(01)12345678901231" }, - /* 1*/ { "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)123456789012345678901234567890123456789012345678901234567890123", 0, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)123456789012345678901234567890123456789012345678901234567890123" }, - /* 2*/ { "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)123456789012345678901234567890123456789012345678901234567890123", 0, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)123456789012345678901234567890123456789012345678901234567890123" }, - /* 3*/ { "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)1234567890123456789012345678901234567890123456789012345678901234", ZINT_WARN_HRT_TRUNCATED, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" }, - /* 4*/ { "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)123456789012345678901234567890123456789012345678901234567890123(94)123456789", ZINT_WARN_HRT_TRUNCATED, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)123456789012345678901234567890123456789012345678901234567890123" }, + /* 0*/ { -1, "(01)12345678901231", 0, "(01)12345678901231" }, + /* 1*/ { ZINT_HRT_GS1_NEWLINE, "(01)12345678901231", 0, "(01)12345678901231" }, + /* 2*/ { -1, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)123456789012345678901234567890123456789012345678901234567890123", 0, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)123456789012345678901234567890123456789012345678901234567890123" }, + /* 3*/ { -1, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)1234567890123456789012345678901234567890123456789012345678901234", ZINT_WARN_HRT_TRUNCATED, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" }, + /* 4*/ { -1, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)123456789012345678901234567890123456789012345678901234567890123(94)123456789", ZINT_WARN_HRT_TRUNCATED, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)123456789012345678901234567890123456789012345678901234567890123" }, + /* 5*/ { ZINT_HRT_GS1_NEWLINE, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)1234567890123456789012345678901234567890123456789012345678901", 0, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\n(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\n(93)1234567890123456789012345678901234567890123456789012345678901" }, + /* 6*/ { ZINT_HRT_GS1_NEWLINE, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)12345678901234567890123456789012345678901234567890123456789012", ZINT_WARN_HRT_TRUNCATED, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\n(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" }, + /* 7*/ { ZINT_HRT_GS1_NEWLINE, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)123456789012345678901234567890123456789012345678901234567890(94)123456789", ZINT_WARN_HRT_TRUNCATED, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\n(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\n(93)123456789012345678901234567890123456789012345678901234567890" }, + /* 8*/ { ZINT_HRT_GS1_NEWLINE, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)1234567890123456789012345678901234567890123456789012345678901(94)123456789", ZINT_WARN_HRT_TRUNCATED, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\n(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\n(93)1234567890123456789012345678901234567890123456789012345678901" }, + /* 9*/ { ZINT_HRT_GS1_NEWLINE, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)1234567890123456789012345678901234567890123456789012345678901\\(", ZINT_WARN_HRT_TRUNCATED, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\n(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" }, }; const int data_size = ARRAY_SIZE(data); int i, length, ret; @@ -3302,6 +3316,9 @@ static void test_gs1_hrt_cpy(const testCtx *const p_ctx) { symbol = ZBarcode_Create(); assert_nonnull(symbol, "Symbol not created\n"); symbol->input_mode |= GS1PARENS_MODE; + if (data[i].show_hrt != -1) { + symbol->show_hrt = data[i].show_hrt; + } length = (int) strlen(data[i].data); ret = zint_test_gs1_hrt_cpy(symbol, ZCUCP(data[i].data), length, 0 /*no_errtxt*/); @@ -3325,17 +3342,23 @@ INTERNAL int zint_test_gs1_hrt_conv_brackets(struct zint_symbol *symbol, const u static void test_gs1_hrt_conv_brackets(const testCtx *const p_ctx) { struct item { + int show_hrt; const char *data; int ret; const char *expected; }; /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */ static const struct item data[] = { - /* 0*/ { "[01]12345678901231", 0, "(01)12345678901231" }, - /* 1*/ { "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123", 0, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)123456789012345678901234567890123456789012345678901234567890123" }, - /* 2*/ { "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123", 0, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)123456789012345678901234567890123456789012345678901234567890123" }, - /* 3*/ { "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]1234567890123456789012345678901234567890123456789012345678901234", ZINT_WARN_HRT_TRUNCATED, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" }, - /* 4*/ { "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123[94]123456789", ZINT_WARN_HRT_TRUNCATED, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)123456789012345678901234567890123456789012345678901234567890123" }, + /* 0*/ { -1, "[01]12345678901231", 0, "(01)12345678901231" }, + /* 1*/ { ZINT_HRT_GS1_NEWLINE, "[01]12345678901231", 0, "(01)12345678901231" }, + /* 2*/ { -1, "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123", 0, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)123456789012345678901234567890123456789012345678901234567890123" }, + /* 3*/ { -1, "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123", 0, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)123456789012345678901234567890123456789012345678901234567890123" }, + /* 4*/ { -1, "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]1234567890123456789012345678901234567890123456789012345678901234", ZINT_WARN_HRT_TRUNCATED, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" }, + /* 5*/ { -1, "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]123456789012345678901234567890123456789012345678901234567890123[94]123456789", ZINT_WARN_HRT_TRUNCATED, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890(93)123456789012345678901234567890123456789012345678901234567890123" }, + /* 6*/ { ZINT_HRT_GS1_NEWLINE, "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]1234567890123456789012345678901234567890123456789012345678901", 0, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\n(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\n(93)1234567890123456789012345678901234567890123456789012345678901" }, + /* 7*/ { ZINT_HRT_GS1_NEWLINE, "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]12345678901234567890123456789012345678901234567890123456789012", ZINT_WARN_HRT_TRUNCATED, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\n(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" }, + /* 8*/ { ZINT_HRT_GS1_NEWLINE, "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]1234567890123456789012345678901234567890123456789012345[94]1", 0, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\n(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\n(93)1234567890123456789012345678901234567890123456789012345\n(94)1" }, + /* 9*/ { ZINT_HRT_GS1_NEWLINE, "[91]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[92]123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890[93]12345678901234567890123456789012345678901234567890123456[94]1", ZINT_WARN_HRT_TRUNCATED, "(91)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\n(92)123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\n(93)12345678901234567890123456789012345678901234567890123456" }, }; const int data_size = ARRAY_SIZE(data); int i, length, ret; @@ -3349,6 +3372,9 @@ static void test_gs1_hrt_conv_brackets(const testCtx *const p_ctx) { symbol = ZBarcode_Create(); assert_nonnull(symbol, "Symbol not created\n"); + if (data[i].show_hrt != -1) { + symbol->show_hrt = data[i].show_hrt; + } length = (int) strlen(data[i].data); ret = zint_test_gs1_hrt_conv_brackets(symbol, ZCUCP(data[i].data), length, 0 /*no_errtxt*/); diff --git a/backend/tests/test_pcx.c b/backend/tests/test_pcx.c index 7db3bb16..d7c2db3c 100644 --- a/backend/tests/test_pcx.c +++ b/backend/tests/test_pcx.c @@ -58,7 +58,7 @@ static void test_print(const testCtx *const p_ctx) { }; const int data_size = ARRAY_SIZE(data); int i, length, ret; - struct zint_symbol *symbol; + struct zint_symbol *symbol = NULL; const char *data_dir = "/backend/tests/data/pcx"; const char *pcx = "out.pcx"; @@ -70,7 +70,7 @@ static void test_print(const testCtx *const p_ctx) { const char *const have_identify = testUtilHaveIdentify(); - testStart(p_ctx->func_name); + testStartSymbol(p_ctx->func_name, &symbol); if (p_ctx->generate) { char data_dir_path[1024]; diff --git a/backend/tests/test_png.c b/backend/tests/test_png.c index 18f4ea78..9f55c0cf 100644 --- a/backend/tests/test_png.c +++ b/backend/tests/test_png.c @@ -133,6 +133,7 @@ static void test_print(const testCtx *const p_ctx) { int whitespace_width; int whitespace_height; int show_hrt; + int font_height; int option_1; int option_2; float height; @@ -148,137 +149,142 @@ static void test_print(const testCtx *const p_ctx) { const char *expected_file; const char *comment; }; + /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */ static const struct item data[] = { - /* 0*/ { BARCODE_CODE128, UNICODE_MODE, -1, -1, -1, -1, -1, -1, -1, 10.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~", "", 0, "code128_latin1_1.png", "" }, - /* 1*/ { BARCODE_CODE128, UNICODE_MODE, -1, -1, -1, -1, -1, -1, -1, 10.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ", "", 0, "code128_latin1_2.png", "" }, - /* 2*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, -1, 10.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~", "", 0, "code128_latin1_1_bold.png", "" }, - /* 3*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, -1, 10.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ", "", 0, "code128_latin1_2_bold.png", "" }, - /* 4*/ { BARCODE_CODE128, UNICODE_MODE, -1, SMALL_TEXT, -1, -1, -1, -1, -1, 10.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~", "", 0, "code128_latin1_1_small.png", "" }, - /* 5*/ { BARCODE_CODE128, UNICODE_MODE, -1, SMALL_TEXT, -1, -1, -1, -1, -1, 10.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ", "", 0, "code128_latin1_2_small.png", "" }, - /* 6*/ { BARCODE_CODE128, UNICODE_MODE, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "Égjpqy", "", 0, "code128_egrave.png", "" }, - /* 7*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "Égjpqy", "", 0, "code128_egrave_bold.png", "" }, - /* 8*/ { BARCODE_CODE128, UNICODE_MODE, 3, BOLD_TEXT | BARCODE_BOX, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "Égjpqy", "", 0, "code128_egrave_bold_box3.png", "" }, - /* 9*/ { BARCODE_CODE128, UNICODE_MODE, 2, BOLD_TEXT | BARCODE_BOX, 2, 2, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "Égjpqy", "", 0, "code128_egrave_bold_hvwsp2_box2.png", "" }, - /* 10*/ { BARCODE_GS1_128_CC, -1, -1, -1, -1, -1, -1, 3, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "[00]030123456789012340", "[02]13012345678909[37]24[10]1234567ABCDEFG", 0, "gs1_128_cc_fig12.png", "" }, - /* 11*/ { BARCODE_CODABLOCKF, -1, 3, -1, -1, -1, -1, 3, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "AAAAAAAAA", "", 0, "codablockf_3rows.png", "" }, - /* 12*/ { BARCODE_CODABLOCKF, -1, -1, -1, 2, 2, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "AAAAAAAAA", "", 0, "codablockf_hvwsp2.png", "" }, - /* 13*/ { BARCODE_CODABLOCKF, -1, 2, BARCODE_BOX, 2, 2, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "AAAAAAAAA", "", 0, "codablockf_hvwsp2_box2.png", "" }, - /* 14*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9771384524017", "", 0, "ean13_ggs_5.2.2.1-1.png", "" }, - /* 15*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9771384524017", "", 0, "ean13_ggs_5.2.2.1-1.png", "" }, - /* 16*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9771384524017", "", 0, "ean13_ggs_5.2.2.1-1_gws.png", "" }, - /* 17*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9771384524017", "", 0, "ean13_ggs_5.2.2.1-1_gws.png", "" }, - /* 18*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2.png", "" }, - /* 19*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2.png", "" }, - /* 20*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2_gws.png", "" }, - /* 21*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2_gws.png", "" }, - /* 22*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2.png", "" }, - /* 23*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2.png", "" }, - /* 24*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2_gws.png", "" }, - /* 25*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2_gws.png", "" }, - /* 26*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4.png", "" }, - /* 27*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4.png", "" }, - /* 28*/ { BARCODE_EAN13_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4_gws.png", "" }, - /* 29*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4_gws.png", "" }, - /* 30*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4.png", "" }, - /* 31*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4.png", "" }, - /* 32*/ { BARCODE_EAN13_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4_gws.png", "" }, - /* 33*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4_gws.png", "" }, - /* 34*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4.png", "" }, - /* 35*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4.png", "" }, - /* 36*/ { BARCODE_EAN13_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_gws.png", "" }, - /* 37*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_gws.png", "" }, - /* 38*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, -1, 0, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_notext.png", "" }, - /* 39*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, 0, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_notext.png", "" }, - /* 40*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "012345678905+24", "", 0, "upca_2addon_ggs_5.2.6.6-5.png", "" }, - /* 41*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "012345678905+24", "", 0, "upca_2addon_ggs_5.2.6.6-5_gws.png", "" }, - /* 42*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "614141234417+12345", "", 0, "upca_5addon.png", "" }, - /* 43*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "614141234417+12345", "", 0, "upca_5addon_gws.png", "" }, - /* 44*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, 0, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "614141234417+12345", "", 0, "upca_5addon_notext.png", "" }, - /* 45*/ { BARCODE_UPCA, -1, 3, BARCODE_BIND, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "614141234417+12345", "", 0, "upca_5addon_bind3.png", "" }, - /* 46*/ { BARCODE_UPCA, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, -1, -1, -1, 1.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "012345678905+24", "", 0, "upca_2addon_h1.png", "" }, - /* 47*/ { BARCODE_UPCA, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, 0, -1, -1, 1.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "012345678905+24", "", 0, "upca_2addon_h1_notext.png", "" }, - /* 48*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345678901+12", "[91]123456789", 0, "upca_cc_2addon_cca_3x4.png", "" }, - /* 49*/ { BARCODE_UPCA_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345678901+12", "[91]123456789", 0, "upca_cc_2addon_cca_3x4_gws.png", "" }, - /* 50*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4.png", "" }, - /* 51*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, 0, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_notext.png", "" }, - /* 52*/ { BARCODE_UPCA_CC, -1, 3, BARCODE_BIND, -1, -1, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_bind3.png", "" }, - /* 53*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12", "", 0, "upce_2addon.png", "" }, - /* 54*/ { BARCODE_UPCE, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12", "", 0, "upce_2addon_gws.png", "" }, - /* 55*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12345", "", 0, "upce_5addon.png", "" }, - /* 56*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12345", "", 0, "upce_5addon_small.png", "" }, - /* 57*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12345", "", 0, "upce_5addon_small_gws.png", "" }, - /* 58*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2.png", "" }, - /* 59*/ { BARCODE_UPCE_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2_gws.png", "" }, - /* 60*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 1, -1, 3.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "0654321+89", "[91]1", 0, "upce_cc_2addon_h3.png", "" }, - /* 61*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, 0, 1, -1, 3.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "0654321+89", "[91]1", 0, "upce_cc_2addon_h3_notext.png", "" }, - /* 62*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2.png", "" }, - /* 63*/ { BARCODE_UPCE_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2_gws.png", "" }, - /* 64*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, 0, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2_notext.png", "" }, - /* 65*/ { BARCODE_EAN8, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567", "", 0, "ean8_gss_5.2.2.2-1.png", "" }, - /* 66*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567", "", 0, "ean8_gss_5.2.2.2-1.png", "" }, - /* 67*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567", "", 0, "ean8_gss_5.2.2.2-1_gws.png", "" }, - /* 68*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567", "", 0, "ean8_gss_5.2.2.2-1_gws.png", "" }, - /* 69*/ { BARCODE_EAN8, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon.png", "" }, - /* 70*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon.png", "" }, - /* 71*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_gws.png", "" }, - /* 72*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_gws.png", "" }, - /* 73*/ { BARCODE_EAN8, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, -1, -1, -1, 1.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, " 16", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_h1.png", "" }, - /* 74*/ { BARCODE_EANX, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, -1, -1, -1, 1.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, " 16", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_h1.png", "" }, - /* 75*/ { BARCODE_EAN8, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, 0, -1, -1, 1.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, " 16", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_h1_notext.png", "" }, - /* 76*/ { BARCODE_EANX, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, 0, -1, -1, 1.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, " 16", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_h1_notext.png", "" }, - /* 77*/ { BARCODE_EAN8, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon.png", "" }, - /* 78*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon.png", "" }, - /* 79*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon_gws.png", "" }, - /* 80*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon_gws.png", "" }, - /* 81*/ { BARCODE_EAN8_CC, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3.png", "" }, - /* 82*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3.png", "" }, - /* 83*/ { BARCODE_EAN8_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3_gws.png", "" }, - /* 84*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3_gws.png", "" }, - /* 85*/ { BARCODE_EAN8_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3.png", "" }, - /* 86*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3.png", "" }, - /* 87*/ { BARCODE_EAN8_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3_gws.png", "" }, - /* 88*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3_gws.png", "" }, - /* 89*/ { BARCODE_EAN_5ADDON, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345", "", 0, "ean5.png", "" }, - /* 90*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345", "", 0, "ean5.png", "" }, - /* 91*/ { BARCODE_EAN_5ADDON, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345", "", 0, "ean5_gws.png", "" }, - /* 92*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345", "", 0, "ean5_gws.png", "" }, - /* 93*/ { BARCODE_EAN_5ADDON, -1, 2, BARCODE_BIND, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345", "", 0, "ean5_bind2.png", "" }, - /* 94*/ { BARCODE_EANX, -1, 2, BARCODE_BIND, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345", "", 0, "ean5_bind2.png", "" }, - /* 95*/ { BARCODE_EAN_2ADDON, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12", "", 0, "ean2.png", "" }, - /* 96*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12", "", 0, "ean2.png", "" }, - /* 97*/ { BARCODE_EAN_2ADDON, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12", "", 0, "ean2_gws.png", "" }, - /* 98*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12", "", 0, "ean2_gws.png", "" }, - /* 99*/ { BARCODE_EAN_2ADDON, -1, 1, BARCODE_BOX, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12", "", 0, "ean2_box1.png", "" }, - /*100*/ { BARCODE_EANX, -1, 1, BARCODE_BOX, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12", "", 0, "ean2_box1.png", "" }, - /*101*/ { BARCODE_CODE39, -1, -1, SMALL_TEXT, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123", "", 0, "code39_small.png", "" }, - /*102*/ { BARCODE_POSTNET, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 3.5f, 0.0f, { 0, 0, "" }, "", "", 1, "12345", "", 0, "postnet_zip.png", "300 dpi, using 1/43in X, 300 / 43 / 2 = ~3.5 scale" }, - /*103*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "CFCECDCC", 1, "12345", "", 0, "pdf417_bgalpha.png", "" }, - /*104*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "30313233", "", 1, "12345", "", 0, "pdf417_fgalpha.png", "" }, - /*105*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "20212244", "CFCECDCC", 1, "12345", "", 0, "pdf417_bgfgalpha.png", "" }, - /*106*/ { BARCODE_ULTRA, -1, -1, -1, 2, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "0000007F", "FF000033", 1, "12345", "", 0, "ultra_bgfgalpha.png", "" }, - /*107*/ { BARCODE_ULTRA, -1, -1, -1, 2, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "FF000033", 1, "12345", "", 0, "ultra_bgalpha.png", "" }, - /*108*/ { BARCODE_ULTRA, -1, -1, -1, 2, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "0000007F", "FF0000", 1, "12345", "", 0, "ultra_fgalpha.png", "" }, - /*109*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "0000007F", "", 1, "12345", "", 0, "ultra_fgalpha_nobg.png", "" }, - /*110*/ { BARCODE_ULTRA, -1, 1, BARCODE_BOX, 1, 1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345", "", 0, "ultra_hvwsp1_box1.png", "" }, - /*111*/ { BARCODE_ULTRA, -1, 1, BARCODE_BOX, 1, 1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "00FF007F", "BABDB6", 1, "12345", "", 0, "ultra_fgalpha_hvwsp1_box1.png", "" }, - /*112*/ { BARCODE_ULTRA, -1, 1, BARCODE_BIND_TOP, 1, 1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "00FF007F", "BABDB6", 1, "12345", "", 0, "ultra_fgalpha_hvwsp1_bindtop1.png", "" }, - /*113*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.5f, 0.0f, { 0, 0, "" }, "", "", 1, "1", "", 0, "ultra_odd.png", "" }, - /*114*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.5f, 0.0f, { 0, 0, "" }, "", "", 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_0.5.png", "6 dpmm, 150 dpi" }, - /*115*/ { BARCODE_MAXICODE, -1, 1, BARCODE_BOX, 3, -1, -1, -1, -1, 0.0f, 0.7f, 0.0f, { 0, 0, "" }, "", "", 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_0.7_wsp3_box1.png", "8 dpmm, 200 dpi" }, - /*116*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 1.4f, 0.0f, { 0, 0, "" }, "1111117F", "EEEEEEEE", 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_1.4_bgfgalpha.png", "16 dpmm, 400 dpi" }, - /*117*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 2.1f, 0.0f, { 0, 0, "" }, "", "", 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_2.1.png", "24 dpmm, 600 dpi" }, - /*118*/ { BARCODE_MAXICODE, -1, 2, BARCODE_BOX, 1, 1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_hvwsp1_box2.png", "" }, - /*119*/ { BARCODE_MAXICODE, -1, 1, BARCODE_BIND, -1, 1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_vwsp1_bind1.png", "" }, - /*120*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, -1, -1, -1, -1, -1, 0.0f, 2.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234", "", 0, "datamatrix_2.0_bind1_dotty.png", "" }, - /*121*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, 1, 1, -1, -1, -1, 0.0f, 2.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234", "", 0, "datamatrix_2.0_hvwsp1_bind1_dotty.png", "" }, - /*122*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345678909", "", 0, "dbar_ltd.png", "" }, - /*123*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, 5.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "Your Data Here!", "", ZINT_WARN_NONCOMPLIANT, "pdf417_height5.png", "" }, - /*124*/ { BARCODE_USPS_IMAIL, -1, -1, -1, -1, -1, -1, -1, -1, 7.75f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345678901234567890", "", 0, "imail_height7.75.png", "" }, - /*125*/ { BARCODE_AZTEC, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 4, 7, "Z1.txt" }, "", "", 1, "3456", "", 0, "aztec_z1_seq4of7.png", "" }, - /*126*/ { BARCODE_PDF417, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, -1, 5, 8, 16.0f, 1.5f, 0.0f, { 0, 0, "" }, "", "", 1, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBB", "", ZINT_WARN_NONCOMPLIANT, "pdf417_#204.png", "Ticket #204 Blank line in PDF417" }, - /*127*/ { BARCODE_DPD, -1, -1, BARCODE_QUIET_ZONES | COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "008182709980000020028101276", "", 0, "dpd_compliant.png", "Now with bind top 3X default" }, - /*128*/ { BARCODE_CHANNEL, -1, -1, CMYK_COLOUR | COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "100,85,0,20", "FFFFFF00", 1, "123", "", 0, "channel_cmyk_nobg.png", "" }, - /*129*/ { BARCODE_TELEPEN, UNICODE_MODE, -1, COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, 0.0f, 0.0f, 300.0f / 25.4f, { 0, 0, "" }, "", "", 1, "ABC", "", 0, "telepen_compliant_dpmm_300dpi.png", "" }, + /* 0*/ { BARCODE_CODE128, UNICODE_MODE, -1, -1, -1, -1, -1, -1, -1, -1, 10.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~", "", 0, "code128_latin1_1.png", "" }, + /* 1*/ { BARCODE_CODE128, UNICODE_MODE, -1, -1, -1, -1, -1, -1, -1, -1, 10.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ", "", 0, "code128_latin1_2.png", "" }, + /* 2*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, -1, -1, 10.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~", "", 0, "code128_latin1_1_bold.png", "" }, + /* 3*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, -1, -1, 10.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ", "", 0, "code128_latin1_2_bold.png", "" }, + /* 4*/ { BARCODE_CODE128, UNICODE_MODE, -1, SMALL_TEXT, -1, -1, -1, -1, -1, -1, 10.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~", "", 0, "code128_latin1_1_small.png", "" }, + /* 5*/ { BARCODE_CODE128, UNICODE_MODE, -1, SMALL_TEXT, -1, -1, -1, -1, -1, -1, 10.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ", "", 0, "code128_latin1_2_small.png", "" }, + /* 6*/ { BARCODE_CODE128, UNICODE_MODE, -1, -1, -1, -1, -1, -1, -1, -1, 10.0f, 1.5f, 0.0f, { 0, 0, "" }, "", "", 1, "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~", "", 0, "code128_latin1_1_sc1_5.png", "" }, + /* 7*/ { BARCODE_CODE128, UNICODE_MODE, -1, -1, -1, -1, -1, -1, -1, -1, 10.0f, 2.0f, 0.0f, { 0, 0, "" }, "", "", 1, "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~", "", 0, "code128_latin1_1_sc2.png", "" }, + /* 8*/ { BARCODE_CODE128, UNICODE_MODE, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "Égjpqy", "", 0, "code128_egrave.png", "" }, + /* 9*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "Égjpqy", "", 0, "code128_egrave_bold.png", "" }, + /* 10*/ { BARCODE_CODE128, UNICODE_MODE, 3, BOLD_TEXT | BARCODE_BOX, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "Égjpqy", "", 0, "code128_egrave_bold_box3.png", "" }, + /* 11*/ { BARCODE_CODE128, UNICODE_MODE, 2, BOLD_TEXT | BARCODE_BOX, 2, 2, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "Égjpqy", "", 0, "code128_egrave_bold_hvwsp2_box2.png", "" }, + /* 12*/ { BARCODE_GS1_128_CC, -1, -1, -1, -1, -1, -1, -1, 3, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "[00]030123456789012340", "[02]13012345678909[37]24[10]1234567ABCDEFG", 0, "gs1_128_cc_fig12.png", "" }, + /* 13*/ { BARCODE_CODABLOCKF, -1, 3, -1, -1, -1, -1, -1, 3, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "AAAAAAAAA", "", 0, "codablockf_3rows.png", "" }, + /* 14*/ { BARCODE_CODABLOCKF, -1, -1, -1, 2, 2, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "AAAAAAAAA", "", 0, "codablockf_hvwsp2.png", "" }, + /* 15*/ { BARCODE_CODABLOCKF, -1, 2, BARCODE_BOX, 2, 2, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "AAAAAAAAA", "", 0, "codablockf_hvwsp2_box2.png", "" }, + /* 16*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9771384524017", "", 0, "ean13_ggs_5.2.2.1-1.png", "" }, + /* 17*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9771384524017", "", 0, "ean13_ggs_5.2.2.1-1.png", "" }, + /* 18*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9771384524017", "", 0, "ean13_ggs_5.2.2.1-1_gws.png", "" }, + /* 19*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9771384524017", "", 0, "ean13_ggs_5.2.2.1-1_gws.png", "" }, + /* 20*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2.png", "" }, + /* 21*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2.png", "" }, + /* 22*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2_gws.png", "" }, + /* 23*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2_gws.png", "" }, + /* 24*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2.png", "" }, + /* 25*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2.png", "" }, + /* 26*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2_gws.png", "" }, + /* 27*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2_gws.png", "" }, + /* 28*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, -1, -1, -1, 1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4.png", "" }, + /* 29*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, -1, 1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4.png", "" }, + /* 30*/ { BARCODE_EAN13_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4_gws.png", "" }, + /* 31*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4_gws.png", "" }, + /* 32*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, -1, -1, -1, 1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4.png", "" }, + /* 33*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, -1, 1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4.png", "" }, + /* 34*/ { BARCODE_EAN13_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4_gws.png", "" }, + /* 35*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4_gws.png", "" }, + /* 36*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, -1, -1, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4.png", "" }, + /* 37*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4.png", "" }, + /* 38*/ { BARCODE_EAN13_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_gws.png", "" }, + /* 39*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_gws.png", "" }, + /* 40*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, -1, 0, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_notext.png", "" }, + /* 41*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, 0, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_notext.png", "" }, + /* 42*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "012345678905+24", "", 0, "upca_2addon_ggs_5.2.6.6-5.png", "" }, + /* 43*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "012345678905+24", "", 0, "upca_2addon_ggs_5.2.6.6-5_gws.png", "" }, + /* 44*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "614141234417+12345", "", 0, "upca_5addon.png", "" }, + /* 45*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "614141234417+12345", "", 0, "upca_5addon_gws.png", "" }, + /* 46*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, 0, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "614141234417+12345", "", 0, "upca_5addon_notext.png", "" }, + /* 47*/ { BARCODE_UPCA, -1, 3, BARCODE_BIND, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "614141234417+12345", "", 0, "upca_5addon_bind3.png", "" }, + /* 48*/ { BARCODE_UPCA, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, -1, -1, -1, -1, 1.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "012345678905+24", "", 0, "upca_2addon_h1.png", "" }, + /* 49*/ { BARCODE_UPCA, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, 0, -1, -1, -1, 1.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "012345678905+24", "", 0, "upca_2addon_h1_notext.png", "" }, + /* 50*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, -1, -1, 1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345678901+12", "[91]123456789", 0, "upca_cc_2addon_cca_3x4.png", "" }, + /* 51*/ { BARCODE_UPCA_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345678901+12", "[91]123456789", 0, "upca_cc_2addon_cca_3x4_gws.png", "" }, + /* 52*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, -1, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4.png", "" }, + /* 53*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, 0, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_notext.png", "" }, + /* 54*/ { BARCODE_UPCA_CC, -1, 3, BARCODE_BIND, -1, -1, -1, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_bind3.png", "" }, + /* 55*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12", "", 0, "upce_2addon.png", "" }, + /* 56*/ { BARCODE_UPCE, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12", "", 0, "upce_2addon_gws.png", "" }, + /* 57*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12345", "", 0, "upce_5addon.png", "" }, + /* 58*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12345", "", 0, "upce_5addon_small.png", "" }, + /* 59*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12345", "", 0, "upce_5addon_small_gws.png", "" }, + /* 60*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, -1, 1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2.png", "" }, + /* 61*/ { BARCODE_UPCE_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2_gws.png", "" }, + /* 62*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, -1, 1, -1, 3.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "0654321+89", "[91]1", 0, "upce_cc_2addon_h3.png", "" }, + /* 63*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, 0, -1, 1, -1, 3.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "0654321+89", "[91]1", 0, "upce_cc_2addon_h3_notext.png", "" }, + /* 64*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2.png", "" }, + /* 65*/ { BARCODE_UPCE_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2_gws.png", "" }, + /* 66*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, 0, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2_notext.png", "" }, + /* 67*/ { BARCODE_EAN8, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567", "", 0, "ean8_gss_5.2.2.2-1.png", "" }, + /* 68*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567", "", 0, "ean8_gss_5.2.2.2-1.png", "" }, + /* 69*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567", "", 0, "ean8_gss_5.2.2.2-1_gws.png", "" }, + /* 70*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567", "", 0, "ean8_gss_5.2.2.2-1_gws.png", "" }, + /* 71*/ { BARCODE_EAN8, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon.png", "" }, + /* 72*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon.png", "" }, + /* 73*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_gws.png", "" }, + /* 74*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_gws.png", "" }, + /* 75*/ { BARCODE_EAN8, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, -1, -1, -1, -1, 1.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, " 16", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_h1.png", "" }, + /* 76*/ { BARCODE_EANX, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, -1, -1, -1, -1, 1.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, " 16", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_h1.png", "" }, + /* 77*/ { BARCODE_EAN8, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, 0, -1, -1, -1, 1.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, " 16", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_h1_notext.png", "" }, + /* 78*/ { BARCODE_EANX, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, 0, -1, -1, -1, 1.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, " 16", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_h1_notext.png", "" }, + /* 79*/ { BARCODE_EAN8, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon.png", "" }, + /* 80*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon.png", "" }, + /* 81*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon_gws.png", "" }, + /* 82*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon_gws.png", "" }, + /* 83*/ { BARCODE_EAN8_CC, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3.png", "" }, + /* 84*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3.png", "" }, + /* 85*/ { BARCODE_EAN8_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3_gws.png", "" }, + /* 86*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3_gws.png", "" }, + /* 87*/ { BARCODE_EAN8_CC, -1, -1, -1, -1, -1, -1, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3.png", "" }, + /* 88*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3.png", "" }, + /* 89*/ { BARCODE_EAN8_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3_gws.png", "" }, + /* 90*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 2, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3_gws.png", "" }, + /* 91*/ { BARCODE_EAN_5ADDON, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345", "", 0, "ean5.png", "" }, + /* 92*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345", "", 0, "ean5.png", "" }, + /* 93*/ { BARCODE_EAN_5ADDON, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345", "", 0, "ean5_gws.png", "" }, + /* 94*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345", "", 0, "ean5_gws.png", "" }, + /* 95*/ { BARCODE_EAN_5ADDON, -1, 2, BARCODE_BIND, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345", "", 0, "ean5_bind2.png", "" }, + /* 96*/ { BARCODE_EANX, -1, 2, BARCODE_BIND, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345", "", 0, "ean5_bind2.png", "" }, + /* 97*/ { BARCODE_EAN_2ADDON, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12", "", 0, "ean2.png", "" }, + /* 98*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12", "", 0, "ean2.png", "" }, + /* 99*/ { BARCODE_EAN_2ADDON, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12", "", 0, "ean2_gws.png", "" }, + /*100*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12", "", 0, "ean2_gws.png", "" }, + /*101*/ { BARCODE_EAN_2ADDON, -1, 1, BARCODE_BOX, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12", "", 0, "ean2_box1.png", "" }, + /*102*/ { BARCODE_EANX, -1, 1, BARCODE_BOX, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12", "", 0, "ean2_box1.png", "" }, + /*103*/ { BARCODE_CODE39, -1, -1, SMALL_TEXT, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "123", "", 0, "code39_small.png", "" }, + /*104*/ { BARCODE_POSTNET, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 3.5f, 0.0f, { 0, 0, "" }, "", "", 1, "12345", "", 0, "postnet_zip.png", "300 dpi, using 1/43in X, 300 / 43 / 2 = ~3.5 scale" }, + /*105*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "CFCECDCC", 1, "12345", "", 0, "pdf417_bgalpha.png", "" }, + /*106*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "30313233", "", 1, "12345", "", 0, "pdf417_fgalpha.png", "" }, + /*107*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "20212244", "CFCECDCC", 1, "12345", "", 0, "pdf417_bgfgalpha.png", "" }, + /*108*/ { BARCODE_ULTRA, -1, -1, -1, 2, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "0000007F", "FF000033", 1, "12345", "", 0, "ultra_bgfgalpha.png", "" }, + /*109*/ { BARCODE_ULTRA, -1, -1, -1, 2, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "FF000033", 1, "12345", "", 0, "ultra_bgalpha.png", "" }, + /*110*/ { BARCODE_ULTRA, -1, -1, -1, 2, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "0000007F", "FF0000", 1, "12345", "", 0, "ultra_fgalpha.png", "" }, + /*111*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "0000007F", "", 1, "12345", "", 0, "ultra_fgalpha_nobg.png", "" }, + /*112*/ { BARCODE_ULTRA, -1, 1, BARCODE_BOX, 1, 1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345", "", 0, "ultra_hvwsp1_box1.png", "" }, + /*113*/ { BARCODE_ULTRA, -1, 1, BARCODE_BOX, 1, 1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "00FF007F", "BABDB6", 1, "12345", "", 0, "ultra_fgalpha_hvwsp1_box1.png", "" }, + /*114*/ { BARCODE_ULTRA, -1, 1, BARCODE_BIND_TOP, 1, 1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "00FF007F", "BABDB6", 1, "12345", "", 0, "ultra_fgalpha_hvwsp1_bindtop1.png", "" }, + /*115*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.5f, 0.0f, { 0, 0, "" }, "", "", 1, "1", "", 0, "ultra_odd.png", "" }, + /*116*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.5f, 0.0f, { 0, 0, "" }, "", "", 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_0.5.png", "6 dpmm, 150 dpi" }, + /*117*/ { BARCODE_MAXICODE, -1, 1, BARCODE_BOX, 3, -1, -1, -1, -1, -1, 0.0f, 0.7f, 0.0f, { 0, 0, "" }, "", "", 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_0.7_wsp3_box1.png", "8 dpmm, 200 dpi" }, + /*118*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 1.4f, 0.0f, { 0, 0, "" }, "1111117F", "EEEEEEEE", 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_1.4_bgfgalpha.png", "16 dpmm, 400 dpi" }, + /*119*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 2.1f, 0.0f, { 0, 0, "" }, "", "", 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_2.1.png", "24 dpmm, 600 dpi" }, + /*120*/ { BARCODE_MAXICODE, -1, 2, BARCODE_BOX, 1, 1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_hvwsp1_box2.png", "" }, + /*121*/ { BARCODE_MAXICODE, -1, 1, BARCODE_BIND, -1, 1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_vwsp1_bind1.png", "" }, + /*122*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, -1, -1, -1, -1, -1, -1, 0.0f, 2.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234", "", 0, "datamatrix_2.0_bind1_dotty.png", "" }, + /*123*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, 1, 1, -1, -1, -1, -1, 0.0f, 2.0f, 0.0f, { 0, 0, "" }, "", "", 1, "1234", "", 0, "datamatrix_2.0_hvwsp1_bind1_dotty.png", "" }, + /*124*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345678909", "", 0, "dbar_ltd.png", "" }, + /*125*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "Your Data Here!", "", ZINT_WARN_NONCOMPLIANT, "pdf417_height5.png", "" }, + /*126*/ { BARCODE_USPS_IMAIL, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7.75f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "12345678901234567890", "", 0, "imail_height7.75.png", "" }, + /*127*/ { BARCODE_AZTEC, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 4, 7, "Z1.txt" }, "", "", 1, "3456", "", 0, "aztec_z1_seq4of7.png", "" }, + /*128*/ { BARCODE_PDF417, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, -1, -1, 5, 8, 16.0f, 1.5f, 0.0f, { 0, 0, "" }, "", "", 1, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBB", "", ZINT_WARN_NONCOMPLIANT, "pdf417_#204.png", "Ticket #204 Blank line in PDF417" }, + /*129*/ { BARCODE_DPD, -1, -1, BARCODE_QUIET_ZONES | COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "008182709980000020028101276", "", 0, "dpd_compliant.png", "Now with bind top 3X default" }, + /*130*/ { BARCODE_CHANNEL, -1, -1, CMYK_COLOUR | COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "100,85,0,20", "FFFFFF00", 1, "123", "", 0, "channel_cmyk_nobg.png", "" }, + /*131*/ { BARCODE_TELEPEN, UNICODE_MODE, -1, COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, -1, 0.0f, 0.0f, 300.0f / 25.4f, { 0, 0, "" }, "", "", 1, "ABC", "", 0, "telepen_compliant_dpmm_300dpi.png", "" }, + /*132*/ { BARCODE_DBAR_EXPSTK, -1, -1, COMPLIANT_HEIGHT, -1, -1, ZINT_HRT_STACKED, -1, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "[01]09501101530003[17]140704[10]AB-123", "", 0, "dbar_expstk.png", "" }, + /*133*/ { BARCODE_DBAR_EXPSTK, -1, -1, COMPLIANT_HEIGHT, -1, -1, ZINT_HRT_STACKED | ZINT_HRT_GS1_NEWLINE, 28, -1, -1, 0.0f, 0.0f, 0.0f, { 0, 0, "" }, "", "", 1, "[01]09501101530003[17]140704[10]AB-123", "", 0, "dbar_expstk_gs1nl_fh28.png", "" }, }; const int data_size = ARRAY_SIZE(data); int i, length, ret; @@ -321,6 +327,9 @@ static void test_print(const testCtx *const p_ctx) { if (data[i].show_hrt != -1) { symbol->show_hrt = data[i].show_hrt; } + if (data[i].font_height != -1) { + symbol->show_hrt |= data[i].font_height << 16; + } if (data[i].height) { symbol->height = data[i].height; } @@ -373,11 +382,12 @@ static void test_print(const testCtx *const p_ctx) { "i:%d testUtilDataPath == 0\n", i); if (p_ctx->generate) { - printf(" /*%3d*/ { %s, %s, %d, %s, %d, %d, %d, %d, %d, %.5g, %.5g, %.5g," + printf(" /*%3d*/ { %s, %s, %d, %s, %d, %d, %s, %d, %d, %d, %.5g, %.5g, %.5g," " { %d, %d, \"%s\" }, \"%s\", \"%s\", %.5g, \"%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].whitespace_height, data[i].show_hrt, + data[i].whitespace_width, data[i].whitespace_height, + testUtilShowHRTName(data[i].show_hrt), data[i].font_height, data[i].option_1, data[i].option_2, data[i].height, data[i].scale, data[i].dpmm, data[i].structapp.index, data[i].structapp.count, data[i].structapp.id, data[i].fgcolour, data[i].bgcolour, data[i].text_gap, diff --git a/backend/tests/test_print.c b/backend/tests/test_print.c index 5ab3554f..c36b5ce6 100644 --- a/backend/tests/test_print.c +++ b/backend/tests/test_print.c @@ -1,6 +1,6 @@ /* libzint - the open source barcode library - Copyright (C) 2020-2025 Robin Stuart + Copyright (C) 2020-2026 Robin Stuart Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -44,16 +44,19 @@ static void test_print(const testCtx *const p_ctx) { int symbology; int option_1; int option_2; + int show_hrt; float scale; const char *data; const char *expected_file; }; + /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */ struct item data[] = { - /* 0*/ { BARCODE_CODE128, -1, -1, -1, "AIM", "code128_aim" }, - /* 1*/ { BARCODE_QRCODE, 2, 1, -1, "1234567890", "qr_v1_m" }, - /* 2*/ { BARCODE_DOTCODE, -1, -1, 5, "2741", "dotcode_aim_fig7" }, - /* 3*/ { BARCODE_ULTRA, -1, -1, -1, "A", "ultracode_a" }, - /* 4*/ { BARCODE_MAXICODE, -1, -1, -1, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", "maxicode_fig_2" }, + /* 0*/ { BARCODE_CODE128, -1, -1, -1, -1, "AIM", "code128_aim" }, + /* 1*/ { BARCODE_CHANNEL, -1, -1, ZINT_HRT_DEFAULT | ZINT_HRT_GRAYSCALE, -1, "12", "channel_grayscale" }, + /* 2*/ { BARCODE_QRCODE, 2, 1, -1, -1, "1234567890", "qr_v1_m" }, + /* 3*/ { BARCODE_DOTCODE, -1, -1, -1, 5, "2741", "dotcode_aim_fig7" }, + /* 4*/ { BARCODE_ULTRA, -1, -1, -1, -1, "A", "ultracode_a" }, + /* 5*/ { BARCODE_MAXICODE, -1, -1, -1, -1, "THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL...", "maxicode_fig_2" }, }; int data_size = ARRAY_SIZE(data); int i, length, ret; @@ -86,21 +89,24 @@ static void test_print(const testCtx *const p_ctx) { testStartSymbol(p_ctx->func_name, &symbol); - assert_nonzero(testUtilDataPath(data_dir, sizeof(data_dir), "/backend/tests/data", NULL), "testUtilDataPath == 0\n"); + assert_nonzero(testUtilDataPath(data_dir, sizeof(data_dir), "/backend/tests/data", NULL), + "testUtilDataPath == 0\n"); if (p_ctx->generate) { if (!testUtilDirExists(data_dir)) { ret = testUtilMkDir(data_dir); assert_zero(ret, "testUtilMkDir(%s) ret %d != 0 (%d: %s)\n", data_dir, ret, errno, strerror(errno)); } - assert_nonzero(sizeof(data_dir) > strlen(data_dir) + 6, "sizeof(data_dir) %d <= strlen (%d) + 6\n", (int) sizeof(data_dir), (int) strlen(data_dir)); + assert_nonzero(sizeof(data_dir) > strlen(data_dir) + 6, "sizeof(data_dir) %d <= strlen (%d) + 6\n", + (int) sizeof(data_dir), (int) strlen(data_dir)); strcat(data_dir, "/print"); if (!testUtilDirExists(data_dir)) { ret = testUtilMkDir(data_dir); assert_zero(ret, "testUtilMkDir(%s) ret %d != 0 (%d: %s)\n", data_dir, ret, errno, strerror(errno)); } } else { - assert_nonzero(sizeof(data_dir) > strlen(data_dir) + 6, "sizeof(data_dir) %d <= strlen (%d) + 6\n", (int) sizeof(data_dir), (int) strlen(data_dir)); + assert_nonzero(sizeof(data_dir) > strlen(data_dir) + 6, "sizeof(data_dir) %d <= strlen (%d) + 6\n", + (int) sizeof(data_dir), (int) strlen(data_dir)); strcat(data_dir, "/print"); } @@ -109,8 +115,8 @@ static void test_print(const testCtx *const p_ctx) { if (ZBarcode_NoPng() && strcmp(exts[j], "png") == 0) continue; assert_nonzero(sizeof(data_subdir) > strlen(data_dir) + 1 + strlen(exts[j]), - "sizeof(data_subdir) (%d) <= strlen(data_dir) (%d) + 1 + strlen(%s) (%d)\n", - (int) sizeof(data_subdir), (int) strlen(data_dir), exts[j], (int) strlen(exts[j])); + "sizeof(data_subdir) (%d) <= strlen(data_dir) (%d) + 1 + strlen(%s) (%d)\n", + (int) sizeof(data_subdir), (int) strlen(data_dir), exts[j], (int) strlen(exts[j])); strcpy(data_subdir, data_dir); strcat(data_subdir, "/"); strcat(data_subdir, exts[j]); @@ -118,7 +124,8 @@ static void test_print(const testCtx *const p_ctx) { if (p_ctx->generate) { if (!testUtilDirExists(data_subdir)) { ret = testUtilMkDir(data_subdir); - assert_zero(ret, "testUtilMkDir(%s) ret %d != 0 (%d: %s)\n", data_subdir, ret, errno, strerror(errno)); + assert_zero(ret, "testUtilMkDir(%s) ret %d != 0 (%d: %s)\n", + data_subdir, ret, errno, strerror(errno)); } } @@ -129,20 +136,29 @@ static void test_print(const testCtx *const p_ctx) { symbol = ZBarcode_Create(); assert_nonnull(symbol, "Symbol not created\n"); - length = testUtilSetSymbol(symbol, data[i].symbology, -1 /*input_mode*/, -1 /*eci*/, data[i].option_1, data[i].option_2, -1, -1 /*output_options*/, data[i].data, -1, debug); + length = testUtilSetSymbol(symbol, data[i].symbology, -1 /*input_mode*/, -1 /*eci*/, + data[i].option_1, data[i].option_2, -1, -1 /*output_options*/, + data[i].data, -1, debug); + if (data[i].show_hrt != -1) { + symbol->show_hrt = data[i].show_hrt; + } if (data[i].scale != -1) { symbol->scale = data[i].scale; } ret = ZBarcode_Encode(symbol, TCU(data[i].data), length); - assert_zero(ret, "i:%d %s ZBarcode_Encode ret %d != 0 %s\n", i, testUtilBarcodeName(data[i].symbology), ret, symbol->errtxt); + assert_zero(ret, "i:%d %s ZBarcode_Encode ret %d != 0 %s\n", + i, testUtilBarcodeName(data[i].symbology), ret, symbol->errtxt); strcpy(symbol->outfile, "out."); strcat(symbol->outfile, exts[j]); - assert_nonzero(sizeof(expected_file) > strlen(data_subdir) + 1 + strlen(data[i].expected_file) + 1 + strlen(exts[j]), - "i:%d sizeof(expected_file) (%d) > strlen(data_subdir) (%d) + 1 + strlen(%s) (%d) + 1 + strlen(%s) (%d),\n", - i, (int) sizeof(expected_file), (int) strlen(data_subdir), data[i].expected_file, (int) strlen(data[i].expected_file), exts[j], (int) strlen(exts[j])); + assert_nonzero(sizeof(expected_file) > strlen(data_subdir) + 1 + strlen(data[i].expected_file) + 1 + + strlen(exts[j]), + "i:%d sizeof(expected_file) (%d) > strlen(data_subdir) (%d) + 1 + strlen(%s) (%d) + 1" + " + strlen(%s) (%d),\n", + i, (int) sizeof(expected_file), (int) strlen(data_subdir), data[i].expected_file, + (int) strlen(data[i].expected_file), exts[j], (int) strlen(exts[j])); strcpy(expected_file, data_subdir); strcat(expected_file, "/"); strcat(expected_file, data[i].expected_file); @@ -150,66 +166,84 @@ static void test_print(const testCtx *const p_ctx) { strcat(expected_file, exts[j]); ret = ZBarcode_Print(symbol, 0); - assert_zero(ret, "i:%d j:%d %s %s ZBarcode_Print %s ret %d != 0\n", i, j, exts[j], testUtilBarcodeName(data[i].symbology), symbol->outfile, ret); + assert_zero(ret, "i:%d j:%d %s %s ZBarcode_Print %s ret %d != 0\n", + i, j, exts[j], testUtilBarcodeName(data[i].symbology), symbol->outfile, ret); if (p_ctx->generate) { if (j == 0) { - printf(" /*%3d*/ { %s, %d, %d, %.8g, \"%s\", \"%s\" },\n", - i, testUtilBarcodeName(data[i].symbology), data[i].option_1, data[i].option_2, data[i].scale, + printf(" /*%3d*/ { %s, %d, %d, %s, %.8g, \"%s\", \"%s\" },\n", + i, testUtilBarcodeName(data[i].symbology), data[i].option_1, data[i].option_2, + testUtilShowHRTName(data[i].show_hrt), data[i].scale, testUtilEscape(data[i].data, length, escaped, escaped_size), data[i].expected_file); } if (strstr(TEST_PRINT_OVERWRITE_EXPECTED, exts[j])) { ret = testUtilRename(symbol->outfile, expected_file); - assert_zero(ret, "i:%d testUtilRename(%s, %s) ret %d != 0\n", i, symbol->outfile, expected_file, ret); + assert_zero(ret, "i:%d testUtilRename(%s, %s) ret %d != 0\n", + i, symbol->outfile, expected_file, ret); if (strcmp(exts[j], "eps") == 0) { if (have_ghostscript) { ret = testUtilVerifyGhostscript(expected_file, debug); - assert_zero(ret, "i:%d %s ghostscript %s ret %d != 0\n", i, testUtilBarcodeName(data[i].symbology), expected_file, ret); + assert_zero(ret, "i:%d %s ghostscript %s ret %d != 0\n", + i, testUtilBarcodeName(data[i].symbology), expected_file, ret); } } else if (strcmp(exts[j], "svg") == 0 || strcmp(exts[j], "emf") == 0) { if (have_libreoffice) { ret = testUtilVerifyLibreOffice(expected_file, debug); /* Slow */ - assert_zero(ret, "i:%d %s libreoffice %s ret %d != 0\n", i, testUtilBarcodeName(data[i].symbology), expected_file, ret); + assert_zero(ret, "i:%d %s libreoffice %s ret %d != 0\n", + i, testUtilBarcodeName(data[i].symbology), expected_file, ret); } if (have_vnu && strcmp(exts[j], "svg") == 0) { ret = testUtilVerifyVnu(expected_file, debug); /* Very slow */ - assert_zero(ret, "i:%d %s vnu %s ret %d != 0\n", i, testUtilBarcodeName(data[i].symbology), expected_file, ret); + assert_zero(ret, "i:%d %s vnu %s ret %d != 0\n", + i, testUtilBarcodeName(data[i].symbology), expected_file, ret); } - } else if (strcmp(exts[j], "tif") == 0 && have_tiffinfo) { /* Much faster (and better) than identify */ + } else if (strcmp(exts[j], "tif") == 0 && have_tiffinfo) { /* Much faster/better than identify */ ret = testUtilVerifyTiffInfo(expected_file, debug); - assert_zero(ret, "i:%d %s tiffinfo %s ret %d != 0\n", i, testUtilBarcodeName(data[i].symbology), expected_file, ret); + assert_zero(ret, "i:%d %s tiffinfo %s ret %d != 0\n", + i, testUtilBarcodeName(data[i].symbology), expected_file, ret); } else if (strcmp(exts[j], "txt") != 0) { /* I.e. rasters */ if (have_identify) { ret = testUtilVerifyIdentify(have_identify, expected_file, debug); - assert_zero(ret, "i:%d %s identify %s ret %d != 0\n", i, testUtilBarcodeName(data[i].symbology), expected_file, ret); + assert_zero(ret, "i:%d %s identify %s ret %d != 0\n", + i, testUtilBarcodeName(data[i].symbology), expected_file, ret); } } } } else { - assert_nonzero(testUtilExists(symbol->outfile), "i:%d j:%d %s testUtilExists(%s) == 0\n", i, j, exts[j], symbol->outfile); + assert_nonzero(testUtilExists(symbol->outfile), "i:%d j:%d %s testUtilExists(%s) == 0\n", + i, j, exts[j], symbol->outfile); if (strcmp(exts[j], "eps") == 0) { ret = testUtilCmpEpss(symbol->outfile, expected_file); - assert_zero(ret, "i:%d %s testUtilCmpEpss(%s, %s) %d != 0\n", i, testUtilBarcodeName(data[i].symbology), symbol->outfile, expected_file, ret); + assert_zero(ret, "i:%d %s testUtilCmpEpss(%s, %s) %d != 0\n", + i, testUtilBarcodeName(data[i].symbology), symbol->outfile, expected_file, ret); } else if (strcmp(exts[j], "png") == 0) { ret = testUtilCmpPngs(symbol->outfile, expected_file); - assert_zero(ret, "i:%d %s testUtilCmpPngs(%s, %s) %d != 0\n", i, testUtilBarcodeName(data[i].symbology), symbol->outfile, expected_file, ret); + assert_zero(ret, "i:%d %s testUtilCmpPngs(%s, %s) %d != 0\n", + i, testUtilBarcodeName(data[i].symbology), symbol->outfile, expected_file, ret); #ifndef ZLIBNG_VERSION /* zlib-ng (used by e.g. Fedora 40) may produce non-binary compat output */ ret = testUtilCmpBins(symbol->outfile, expected_file); - assert_zero(ret, "i:%d %s testUtilCmpBins(%s, %s) %d != 0\n", i, testUtilBarcodeName(data[i].symbology), symbol->outfile, expected_file, ret); + assert_zero(ret, "i:%d %s testUtilCmpBins(%s, %s) %d != 0\n", + i, testUtilBarcodeName(data[i].symbology), symbol->outfile, expected_file, ret); #endif } else if (strcmp(exts[j], "svg") == 0) { ret = testUtilCmpSvgs(symbol->outfile, expected_file); - assert_zero(ret, "i:%d %s testUtilCmpSvgs(%s, %s) %d != 0\n", i, testUtilBarcodeName(data[i].symbology), symbol->outfile, expected_file, ret); + assert_zero(ret, "i:%d %s testUtilCmpSvgs(%s, %s) %d != 0\n", + i, testUtilBarcodeName(data[i].symbology), symbol->outfile, expected_file, ret); } else if (strcmp(exts[j], "txt") == 0) { ret = testUtilCmpTxts(symbol->outfile, expected_file); - assert_zero(ret, "i:%d %s testUtilCmpTxts(%s, %s) %d != 0\n", i, testUtilBarcodeName(data[i].symbology), symbol->outfile, expected_file, ret); + assert_zero(ret, "i:%d %s testUtilCmpTxts(%s, %s) %d != 0\n", + i, testUtilBarcodeName(data[i].symbology), symbol->outfile, expected_file, ret); } else { ret = testUtilCmpBins(symbol->outfile, expected_file); - assert_zero(ret, "i:%d %s testUtilCmpBins(%s, %s) %d != 0\n", i, testUtilBarcodeName(data[i].symbology), symbol->outfile, expected_file, ret); + assert_zero(ret, "i:%d %s testUtilCmpBins(%s, %s) %d != 0\n", + i, testUtilBarcodeName(data[i].symbology), symbol->outfile, expected_file, ret); } - if (p_ctx->index == -1) assert_zero(testUtilRemove(symbol->outfile), "i:%d testUtilRemove(%s) != 0\n", i, symbol->outfile); + if (p_ctx->index == -1) { + assert_zero(testUtilRemove(symbol->outfile), "i:%d testUtilRemove(%s) != 0\n", + i, symbol->outfile); + } } ZBarcode_Delete(symbol); diff --git a/backend/tests/test_ps.c b/backend/tests/test_ps.c index 84193379..e4ebec6a 100644 --- a/backend/tests/test_ps.c +++ b/backend/tests/test_ps.c @@ -42,6 +42,8 @@ static void test_print(const testCtx *const p_ctx) { int output_options; int whitespace_width; int whitespace_height; + int show_hrt; + int font_height; int option_1; int option_2; float scale; @@ -53,74 +55,75 @@ static void test_print(const testCtx *const p_ctx) { const char *expected_file; }; static const struct item data[] = { - /* 0*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, 0, 0, "", "", 0, "Égjpqy", "code128_egrave_bold.eps" }, - /* 1*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, 0, 0, "", "", 90, "Égjpqy", "code128_egrave_bold_rotate_90.eps" }, - /* 2*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, 0, 0, "", "", 180, "Égjpqy", "code128_egrave_bold_rotate_180.eps" }, - /* 3*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, 0, 0, "", "", 270, "Égjpqy", "code128_egrave_bold_rotate_270.eps" }, - /* 4*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, -1, -1, 0, 0, "147AD0", "FC9630", 0, "123", "code39_fg_bg.eps" }, - /* 5*/ { BARCODE_CODE39, -1, -1, CMYK_COLOUR, -1, -1, -1, -1, 0, 0, "147AD0EE", "FC9630", 0, "123", "code39_fgalpha_bg_cmyk.eps" }, - /* 6*/ { BARCODE_CODE39, -1, -1, CMYK_COLOUR, -1, -1, -1, -1, 0, 0, "90,40,0,9", "FC963000", 0, "123", "code39_nobg_cmyk.eps" }, - /* 7*/ { BARCODE_CODE39, -1, -1, SMALL_TEXT, -1, -1, -1, -1, 0, 0, "", "", 0, "123", "code39_small.eps" }, - /* 8*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, -1, 0, 0, "147AD0", "FC9630", 0, "123", "ultra_fg_bg.eps" }, - /* 9*/ { BARCODE_ULTRA, -1, 1, BARCODE_BOX, 2, -1, -1, -1, 0, 0, "0000FF", "FF0000", 0, "123", "ultra_fg_bg_box.eps" }, - /* 10*/ { BARCODE_ULTRA, -1, 2, BARCODE_BOX | CMYK_COLOUR, 1, 1, -1, -1, 0, 0, "0000FF", "FF0000", 0, "123", "ultra_fg_bg_box_cmyk.eps" }, - /* 11*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9501101531000", "ean13_ggs_5.2.2.1-1.eps" }, - /* 12*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9501101531000", "ean13_ggs_5.2.2.1-1.eps" }, - /* 13*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "9501101531000", "ean13_ggs_5.2.2.1-1_gws.eps" }, - /* 14*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "9501101531000", "ean13_ggs_5.2.2.1-1_gws.eps" }, - /* 15*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9771384524017+12", "ean13_2addon_ggs_5.2.2.5.1-2.eps" }, - /* 16*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9771384524017+12", "ean13_2addon_ggs_5.2.2.5.1-2.eps" }, - /* 17*/ { BARCODE_EAN13, -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" }, - /* 18*/ { 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" }, - /* 19*/ { BARCODE_EAN8, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1.eps" }, - /* 20*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1.eps" }, - /* 21*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws.eps" }, - /* 22*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws.eps" }, - /* 23*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, 3, -1, -1, -1, 0, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws_wsw3.eps" }, - /* 24*/ { 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" }, - /* 25*/ { BARCODE_EAN_5ADDON, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "98765", "ean5.eps" }, - /* 26*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "98765", "ean5.eps" }, - /* 27*/ { BARCODE_EAN_5ADDON, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "98765", "ean5_gws.eps" }, - /* 28*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "98765", "ean5_gws.eps" }, - /* 29*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5.eps" }, - /* 30*/ { 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" }, - /* 31*/ { 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" }, - /* 32*/ { 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" }, - /* 33*/ { 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" }, - /* 34*/ { 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" }, - /* 35*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon.eps" }, - /* 36*/ { BARCODE_UPCE, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon_gws.eps" }, - /* 37*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 270, "0123456+12345", "upce_5addon_rotate_270.eps" }, - /* 38*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | BOLD_TEXT, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon_small_bold.eps" }, - /* 39*/ { 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" }, - /* 40*/ { BARCODE_CODE128, UNICODE_MODE, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "A\\B)ç(D", "code128_escape_latin1.eps" }, - /* 41*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, -1, -1, -1, -1, 0, 0, "", "", 0, "1501234567890", "dbar_ltd_24724_fig7_bold.eps" }, - /* 42*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0.1, 0, "", "", 0, "12", "dotcode_0.1.eps" }, - /* 43*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0.08, 0, "", "", 0, "12", "dotcode_0.1.eps" }, - /* 44*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "12", "dotcode_1.0.eps" }, - /* 45*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 0.1, "", "", 0, "12", "dotcode_1.0_ds0.1.eps" }, - /* 46*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 1.1, "", "", 0, "12", "dotcode_1.0_ds1.1.eps" }, - /* 47*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 0, "", "", 0, "12", "dotcode_1.5.eps" }, - /* 48*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 0.4, "", "", 0, "12", "dotcode_1.5_ds0.4.eps" }, - /* 49*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 1.1, "", "", 0, "12", "dotcode_1.5_ds1.1.eps" }, - /* 50*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 1.5, 2.1, "", "", 0, "12", "dotcode_1.5_ds2.1.eps" }, - /* 51*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 2, 0, "", "", 0, "12", "dotcode_2.0.eps" }, - /* 52*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 2, 0.9, "", "", 0, "12", "dotcode_2.0_ds0.9.eps" }, - /* 53*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 2, 1.1, "", "", 0, "12", "dotcode_2.0_ds1.1.eps" }, - /* 54*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3, 0, "", "", 0, "12", "dotcode_3.0.eps" }, - /* 55*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3, 0.4, "", "", 0, "12", "dotcode_3.0_ds0.4.eps" }, - /* 56*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3, 1.1, "", "", 0, "12", "dotcode_3.0_ds1.1.eps" }, - /* 57*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3.5, 0, "", "", 0, "12", "dotcode_3.5.eps" }, - /* 58*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3.5, 0.4, "", "", 0, "12", "dotcode_3.5_ds0.4.eps" }, - /* 59*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 3.5, 1.1, "", "", 0, "12", "dotcode_3.5_ds1.1.eps" }, - /* 60*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 0, "", "", 0, "12", "dotcode_5.0.eps" }, - /* 61*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 0.2, "", "", 0, "12", "dotcode_5.0_ds0.2.eps" }, - /* 62*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 1.1, "", "", 0, "12", "dotcode_5.0_ds1.1.eps" }, - /* 63*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 5, 1.7, "", "", 0, "12", "dotcode_5.0_ds1.7.eps" }, - /* 64*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, 0, 0, "FF0000", "0000FF00", 0, "12", "dotcode_no_bg.eps" }, - /* 65*/ { BARCODE_MAXICODE, -1, -1, CMYK_COLOUR, -1, -1, -1, -1, 0, 0, "", "", 270, "12", "maxicode_rotate_270_cmyk.eps" }, - /* 66*/ { BARCODE_MAXICODE, -1, -1, -1, 3, -1, -1, -1, 0, 0, "", "0000FF00", 180, "12", "maxicode_no_bg_hwsp3_rotate_180.eps" }, - /* 67*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, 2.4, 0, "", "", 90, "12", "maxicode_2.4_rotate_90.eps" }, + /* 0*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "Égjpqy", "code128_egrave_bold.eps" }, + /* 1*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 90, "Égjpqy", "code128_egrave_bold_rotate_90.eps" }, + /* 2*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 180, "Égjpqy", "code128_egrave_bold_rotate_180.eps" }, + /* 3*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 270, "Égjpqy", "code128_egrave_bold_rotate_270.eps" }, + /* 4*/ { BARCODE_CODE39, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "147AD0", "FC9630", 0, "123", "code39_fg_bg.eps" }, + /* 5*/ { BARCODE_CODE39, -1, -1, CMYK_COLOUR, -1, -1, -1, -1, -1, -1, 0, 0, "147AD0EE", "FC9630", 0, "123", "code39_fgalpha_bg_cmyk.eps" }, + /* 6*/ { BARCODE_CODE39, -1, -1, CMYK_COLOUR, -1, -1, -1, -1, -1, -1, 0, 0, "90,40,0,9", "FC963000", 0, "123", "code39_nobg_cmyk.eps" }, + /* 7*/ { BARCODE_CODE39, -1, -1, SMALL_TEXT, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "123", "code39_small.eps" }, + /* 8*/ { BARCODE_ULTRA, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "147AD0", "FC9630", 0, "123", "ultra_fg_bg.eps" }, + /* 9*/ { BARCODE_ULTRA, -1, 1, BARCODE_BOX, 2, -1, -1, -1, -1, -1, 0, 0, "0000FF", "FF0000", 0, "123", "ultra_fg_bg_box.eps" }, + /* 10*/ { BARCODE_ULTRA, -1, 2, BARCODE_BOX | CMYK_COLOUR, 1, 1, -1, -1, -1, -1, 0, 0, "0000FF", "FF0000", 0, "123", "ultra_fg_bg_box_cmyk.eps" }, + /* 11*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9501101531000", "ean13_ggs_5.2.2.1-1.eps" }, + /* 12*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9501101531000", "ean13_ggs_5.2.2.1-1.eps" }, + /* 13*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9501101531000", "ean13_ggs_5.2.2.1-1_gws.eps" }, + /* 14*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9501101531000", "ean13_ggs_5.2.2.1-1_gws.eps" }, + /* 15*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9771384524017+12", "ean13_2addon_ggs_5.2.2.5.1-2.eps" }, + /* 16*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9771384524017+12", "ean13_2addon_ggs_5.2.2.5.1-2.eps" }, + /* 17*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9771384524017+12", "ean13_2addon_ggs_5.2.2.5.1-2_gws.eps" }, + /* 18*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9771384524017+12", "ean13_2addon_ggs_5.2.2.5.1-2_gws.eps" }, + /* 19*/ { BARCODE_EAN8, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1.eps" }, + /* 20*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1.eps" }, + /* 21*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws.eps" }, + /* 22*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws.eps" }, + /* 23*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, 3, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws_wsw3.eps" }, + /* 24*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, 3, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "9501234", "ean8_gss_5.2.2.2-1_gws_wsw3.eps" }, + /* 25*/ { BARCODE_EAN_5ADDON, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "98765", "ean5.eps" }, + /* 26*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "98765", "ean5.eps" }, + /* 27*/ { BARCODE_EAN_5ADDON, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "98765", "ean5_gws.eps" }, + /* 28*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "98765", "ean5_gws.eps" }, + /* 29*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5.eps" }, + /* 30*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_gws.eps" }, + /* 31*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, 1, 3, -1, -1, -1, -1, 0, 0, "", "", 0, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_gws_wsw1h3.eps" }, + /* 32*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 90, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_rotate_90.eps" }, + /* 33*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 180, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_gws_rotate_180.eps" }, + /* 34*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, 4, -1, -1, -1, -1, -1, 0, 0, "", "", 270, "012345678905+24", "upca_2addon_ggs_5.2.6.6-5_gws_rotate_270_wsw4.eps" }, + /* 35*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon.eps" }, + /* 36*/ { BARCODE_UPCE, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon_gws.eps" }, + /* 37*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 270, "0123456+12345", "upce_5addon_rotate_270.eps" }, + /* 38*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | BOLD_TEXT, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon_small_bold.eps" }, + /* 39*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | BOLD_TEXT | EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "0123456+12345", "upce_5addon_small_bold_gws.eps" }, + /* 40*/ { BARCODE_CODE128, UNICODE_MODE, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "A\\B)ç(D", "code128_escape_latin1.eps" }, + /* 41*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "1501234567890", "dbar_ltd_24724_fig7_bold.eps" }, + /* 42*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.1, 0, "", "", 0, "12", "dotcode_0.1.eps" }, + /* 43*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.08, 0, "", "", 0, "12", "dotcode_0.1.eps" }, + /* 44*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 0, "12", "dotcode_1.0.eps" }, + /* 45*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0.1, "", "", 0, "12", "dotcode_1.0_ds0.1.eps" }, + /* 46*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1.1, "", "", 0, "12", "dotcode_1.0_ds1.1.eps" }, + /* 47*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1.5, 0, "", "", 0, "12", "dotcode_1.5.eps" }, + /* 48*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1.5, 0.4, "", "", 0, "12", "dotcode_1.5_ds0.4.eps" }, + /* 49*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1.5, 1.1, "", "", 0, "12", "dotcode_1.5_ds1.1.eps" }, + /* 50*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1.5, 2.1, "", "", 0, "12", "dotcode_1.5_ds2.1.eps" }, + /* 51*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, 0, "", "", 0, "12", "dotcode_2.0.eps" }, + /* 52*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, 0.9, "", "", 0, "12", "dotcode_2.0_ds0.9.eps" }, + /* 53*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, 1.1, "", "", 0, "12", "dotcode_2.0_ds1.1.eps" }, + /* 54*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 0, "", "", 0, "12", "dotcode_3.0.eps" }, + /* 55*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 0.4, "", "", 0, "12", "dotcode_3.0_ds0.4.eps" }, + /* 56*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 1.1, "", "", 0, "12", "dotcode_3.0_ds1.1.eps" }, + /* 57*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3.5, 0, "", "", 0, "12", "dotcode_3.5.eps" }, + /* 58*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3.5, 0.4, "", "", 0, "12", "dotcode_3.5_ds0.4.eps" }, + /* 59*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3.5, 1.1, "", "", 0, "12", "dotcode_3.5_ds1.1.eps" }, + /* 60*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, 0, "", "", 0, "12", "dotcode_5.0.eps" }, + /* 61*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, 0.2, "", "", 0, "12", "dotcode_5.0_ds0.2.eps" }, + /* 62*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, 1.1, "", "", 0, "12", "dotcode_5.0_ds1.1.eps" }, + /* 63*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, 1.7, "", "", 0, "12", "dotcode_5.0_ds1.7.eps" }, + /* 64*/ { BARCODE_DOTCODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, "FF0000", "0000FF00", 0, "12", "dotcode_no_bg.eps" }, + /* 65*/ { BARCODE_MAXICODE, -1, -1, CMYK_COLOUR, -1, -1, -1, -1, -1, -1, 0, 0, "", "", 270, "12", "maxicode_rotate_270_cmyk.eps" }, + /* 66*/ { BARCODE_MAXICODE, -1, -1, -1, 3, -1, -1, -1, -1, -1, 0, 0, "", "0000FF00", 180, "12", "maxicode_no_bg_hwsp3_rotate_180.eps" }, + /* 67*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2.4, 0, "", "", 90, "12", "maxicode_2.4_rotate_90.eps" }, + /* 68*/ { BARCODE_DBAR_OMNSTK, -1, -1, -1, -1, -1, ZINT_HRT_STACKED, 21, -1, -1, 0, 0, "", "", 0, "0950110153000", "dbar_omnstk_fh21.eps" }, }; const int data_size = ARRAY_SIZE(data); int i, length, ret; @@ -166,6 +169,12 @@ 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].show_hrt != -1) { + symbol->show_hrt = data[i].show_hrt; + } + if (data[i].font_height != -1) { + symbol->show_hrt |= data[i].font_height << 16; + } if (data[i].scale) { symbol->scale = data[i].scale; } @@ -192,11 +201,14 @@ static void test_print(const testCtx *const p_ctx) { "i:%d testUtilDataPath == 0\n", i); if (p_ctx->generate) { - printf(" /*%3d*/ { %s, %s, %d, %s, %d, %d, %d, %d, %.5g, %.5g, \"%s\", \"%s\", %d, \"%s\", \"%s\"},\n", + printf(" /*%3d*/ { %s, %s, %d, %s, %d, %d, %s, %d, %d, %d, %.5g, %.5g, \"%s\", \"%s\", %d, \"%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].whitespace_height, data[i].option_1, data[i].option_2, + data[i].whitespace_height, + testUtilShowHRTName(data[i].show_hrt), data[i].font_height, + data[i].option_1, data[i].option_2, data[i].scale, data[i].dot_size, data[i].fgcolour, data[i].bgcolour, data[i].rotate_angle, testUtilEscape(data[i].data, length, escaped, escaped_size), data[i].expected_file); ret = testUtilRename(symbol->outfile, expected_file); diff --git a/backend/tests/test_raster.c b/backend/tests/test_raster.c index 6a0c9865..c1666b5f 100644 --- a/backend/tests/test_raster.c +++ b/backend/tests/test_raster.c @@ -58,10 +58,10 @@ static void test_options(const testCtx *const p_ctx) { }; /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */ static const struct item data[] = { - /* 0*/ { BARCODE_CODE128, "123456", "7890AB", 0, "A", 0, 1, 46, 92, 116 }, - /* 1*/ { BARCODE_CODE128, "123456", "7890ab", 90, "A", 0, 1, 46, 116, 92 }, - /* 2*/ { BARCODE_CODE128, NULL, NULL, 180, "A", 0, 1, 46, 92, 116 }, - /* 3*/ { BARCODE_CODE128, NULL, NULL, 270, "A", 0, 1, 46, 116, 92 }, + /* 0*/ { BARCODE_CODE128, "123456", "7890AB", 0, "A", 0, 1, 46, 92, 118 }, + /* 1*/ { BARCODE_CODE128, "123456", "7890ab", 90, "A", 0, 1, 46, 118, 92 }, + /* 2*/ { BARCODE_CODE128, NULL, NULL, 180, "A", 0, 1, 46, 92, 118 }, + /* 3*/ { BARCODE_CODE128, NULL, NULL, 270, "A", 0, 1, 46, 118, 92 }, /* 4*/ { BARCODE_CODE128, NULL, NULL, 181, "A", ZINT_ERROR_INVALID_OPTION, -1, -1, -1, -1 }, /* 5*/ { BARCODE_CODE128, "12345", NULL, 0, "A", ZINT_ERROR_INVALID_OPTION, -1, -1, -1, -1 }, /* 6*/ { BARCODE_CODE128, NULL, "1234567", 0, "A", ZINT_ERROR_INVALID_OPTION, -1, -1, -1, -1 }, @@ -122,22 +122,22 @@ static void test_buffer(const testCtx *const p_ctx) { int expected_bitmap_height; }; static const struct item data[] = { - /* 0*/ { BARCODE_CODE11, -1, "1234567890", "", 0, 50, 1, 108, 216, 116 }, - /* 1*/ { BARCODE_CODE11, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 108, 216, 116 }, - /* 2*/ { BARCODE_C25STANDARD, -1, "1234567890", "", 0, 50, 1, 117, 234, 116 }, - /* 3*/ { BARCODE_C25STANDARD, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 117, 234, 116 }, - /* 4*/ { BARCODE_C25INTER, -1, "1234567890", "", 0, 50, 1, 99, 198, 116 }, - /* 5*/ { BARCODE_C25INTER, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 99, 198, 116 }, - /* 6*/ { BARCODE_C25IATA, -1, "1234567890", "", 0, 50, 1, 149, 298, 116 }, - /* 7*/ { BARCODE_C25IATA, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 149, 298, 116 }, - /* 8*/ { BARCODE_C25LOGIC, -1, "1234567890", "", 0, 50, 1, 109, 218, 116 }, - /* 9*/ { BARCODE_C25LOGIC, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 109, 218, 116 }, - /* 10*/ { BARCODE_C25IND, -1, "1234567890", "", 0, 50, 1, 159, 318, 116 }, - /* 11*/ { BARCODE_C25IND, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 159, 318, 116 }, - /* 12*/ { BARCODE_CODE39, -1, "1234567890", "", 0, 50, 1, 155, 310, 116 }, - /* 13*/ { BARCODE_CODE39, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 155, 310, 116 }, - /* 14*/ { BARCODE_EXCODE39, -1, "1234567890", "", 0, 50, 1, 155, 310, 116 }, - /* 15*/ { BARCODE_EXCODE39, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 155, 310, 116 }, + /* 0*/ { BARCODE_CODE11, -1, "1234567890", "", 0, 50, 1, 108, 216, 118 }, + /* 1*/ { BARCODE_CODE11, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 108, 216, 118 }, + /* 2*/ { BARCODE_C25STANDARD, -1, "1234567890", "", 0, 50, 1, 117, 234, 118 }, + /* 3*/ { BARCODE_C25STANDARD, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 117, 234, 118 }, + /* 4*/ { BARCODE_C25INTER, -1, "1234567890", "", 0, 50, 1, 99, 198, 118 }, + /* 5*/ { BARCODE_C25INTER, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 99, 198, 118 }, + /* 6*/ { BARCODE_C25IATA, -1, "1234567890", "", 0, 50, 1, 149, 298, 118 }, + /* 7*/ { BARCODE_C25IATA, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 149, 298, 118 }, + /* 8*/ { BARCODE_C25LOGIC, -1, "1234567890", "", 0, 50, 1, 109, 218, 118 }, + /* 9*/ { BARCODE_C25LOGIC, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 109, 218, 118 }, + /* 10*/ { BARCODE_C25IND, -1, "1234567890", "", 0, 50, 1, 159, 318, 118 }, + /* 11*/ { BARCODE_C25IND, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 159, 318, 118 }, + /* 12*/ { BARCODE_CODE39, -1, "1234567890", "", 0, 50, 1, 155, 310, 118 }, + /* 13*/ { BARCODE_CODE39, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 155, 310, 118 }, + /* 14*/ { BARCODE_EXCODE39, -1, "1234567890", "", 0, 50, 1, 155, 310, 118 }, + /* 15*/ { BARCODE_EXCODE39, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 155, 310, 118 }, /* 16*/ { BARCODE_EAN13, -1, "123456789012", "", 0, 50, 1, 95, 226, 116 }, /* 17*/ { BARCODE_EANX, -1, "123456789012", "", 0, 50, 1, 95, 226, 116 }, /* 18*/ { BARCODE_EAN13, COMPLIANT_HEIGHT, "123456789012", "", 0, 69, 1, 95, 226, 154 }, @@ -186,32 +186,32 @@ static void test_buffer(const testCtx *const p_ctx) { /* 61*/ { BARCODE_EANX, COMPLIANT_HEIGHT, "12", "", 0, 66.5, 1, 20, 50, 149 }, /* 62*/ { BARCODE_EANX_CHK, -1, "12", "", 0, 50, 1, 20, 50, 116 }, /* 63*/ { BARCODE_EANX_CHK, COMPLIANT_HEIGHT, "12", "", 0, 66.5, 1, 20, 50, 149 }, - /* 64*/ { BARCODE_GS1_128, -1, "[01]12345678901231", "", 0, 50, 1, 134, 268, 116 }, - /* 65*/ { BARCODE_GS1_128, COMPLIANT_HEIGHT, "[01]12345678901231", "", 0, 64, 1, 134, 268, 144 }, - /* 66*/ { BARCODE_CODABAR, -1, "A00000000B", "", 0, 50, 1, 102, 204, 116 }, - /* 67*/ { BARCODE_CODABAR, COMPLIANT_HEIGHT, "A00000000B", "", 0, 50, 1, 102, 204, 116 }, - /* 68*/ { BARCODE_CODE128, -1, "1234567890", "", 0, 50, 1, 90, 180, 116 }, - /* 69*/ { BARCODE_CODE128, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 90, 180, 116 }, - /* 70*/ { BARCODE_DPLEIT, -1, "1234567890123", "", 0, 72, 1, 135, 270, 160 }, - /* 71*/ { BARCODE_DPLEIT, COMPLIANT_HEIGHT, "1234567890123", "", 0, 72, 1, 135, 270, 160 }, - /* 72*/ { BARCODE_DPIDENT, -1, "12345678901", "", 0, 72, 1, 117, 234, 160 }, - /* 73*/ { BARCODE_DPIDENT, COMPLIANT_HEIGHT, "12345678901", "", 0, 72, 1, 117, 234, 160 }, + /* 64*/ { BARCODE_GS1_128, -1, "[01]12345678901231", "", 0, 50, 1, 134, 268, 118 }, + /* 65*/ { BARCODE_GS1_128, COMPLIANT_HEIGHT, "[01]12345678901231", "", 0, 64, 1, 134, 268, 146 }, + /* 66*/ { BARCODE_CODABAR, -1, "A00000000B", "", 0, 50, 1, 102, 204, 118 }, + /* 67*/ { BARCODE_CODABAR, COMPLIANT_HEIGHT, "A00000000B", "", 0, 50, 1, 102, 204, 118 }, + /* 68*/ { BARCODE_CODE128, -1, "1234567890", "", 0, 50, 1, 90, 180, 118 }, + /* 69*/ { BARCODE_CODE128, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 90, 180, 118 }, + /* 70*/ { BARCODE_DPLEIT, -1, "1234567890123", "", 0, 72, 1, 135, 270, 162 }, + /* 71*/ { BARCODE_DPLEIT, COMPLIANT_HEIGHT, "1234567890123", "", 0, 72, 1, 135, 270, 162 }, + /* 72*/ { BARCODE_DPIDENT, -1, "12345678901", "", 0, 72, 1, 117, 234, 162 }, + /* 73*/ { BARCODE_DPIDENT, COMPLIANT_HEIGHT, "12345678901", "", 0, 72, 1, 117, 234, 162 }, /* 74*/ { BARCODE_CODE16K, -1, "1234567890", "", 0, 20, 2, 70, 162, 44 }, /* 75*/ { BARCODE_CODE16K, COMPLIANT_HEIGHT, "1234567890", "", 0, 21, 2, 70, 162, 46 }, /* 76*/ { BARCODE_CODE49, -1, "1234567890", "", 0, 20, 2, 70, 162, 44 }, /* 77*/ { BARCODE_CODE49, COMPLIANT_HEIGHT, "1234567890", "", 0, 21, 2, 70, 162, 46 }, - /* 78*/ { BARCODE_CODE93, -1, "1234567890", "", 0, 50, 1, 127, 254, 116 }, - /* 79*/ { BARCODE_CODE93, COMPLIANT_HEIGHT, "1234567890", "", 0, 40, 1, 127, 254, 96 }, + /* 78*/ { BARCODE_CODE93, -1, "1234567890", "", 0, 50, 1, 127, 254, 118 }, + /* 79*/ { BARCODE_CODE93, COMPLIANT_HEIGHT, "1234567890", "", 0, 40, 1, 127, 254, 98 }, /* 80*/ { BARCODE_FLAT, -1, "1234567890", "", 0, 50, 1, 90, 180, 100 }, /* 81*/ { BARCODE_FLAT, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 90, 180, 100 }, - /* 82*/ { BARCODE_DBAR_OMN, -1, "1234567890123", "", 0, 50, 1, 96, 192, 116 }, - /* 83*/ { BARCODE_DBAR_OMN, COMPLIANT_HEIGHT, "1234567890123", "", 0, 33, 1, 96, 192, 82 }, - /* 84*/ { BARCODE_DBAR_LTD, -1, "1234567890123", "", 0, 50, 1, 79, 158, 116 }, - /* 85*/ { BARCODE_DBAR_LTD, COMPLIANT_HEIGHT, "1234567890123", "", 0, 10, 1, 79, 158, 36 }, - /* 86*/ { BARCODE_DBAR_EXP, -1, "[01]12345678901231", "", 0, 34, 1, 134, 268, 84 }, - /* 87*/ { BARCODE_DBAR_EXP, COMPLIANT_HEIGHT, "[01]12345678901231", "", 0, 34, 1, 134, 268, 84 }, - /* 88*/ { BARCODE_TELEPEN, -1, "1234567890", "", 0, 50, 1, 208, 416, 116 }, - /* 89*/ { BARCODE_TELEPEN, COMPLIANT_HEIGHT, "1234567890", "", 0, 32, 1, 208, 416, 80 }, + /* 82*/ { BARCODE_DBAR_OMN, -1, "1234567890123", "", 0, 50, 1, 96, 192, 118 }, + /* 83*/ { BARCODE_DBAR_OMN, COMPLIANT_HEIGHT, "1234567890123", "", 0, 33, 1, 96, 192, 84 }, + /* 84*/ { BARCODE_DBAR_LTD, -1, "1234567890123", "", 0, 50, 1, 79, 158, 118 }, + /* 85*/ { BARCODE_DBAR_LTD, COMPLIANT_HEIGHT, "1234567890123", "", 0, 10, 1, 79, 158, 38 }, + /* 86*/ { BARCODE_DBAR_EXP, -1, "[01]12345678901231", "", 0, 34, 1, 134, 268, 86 }, + /* 87*/ { BARCODE_DBAR_EXP, COMPLIANT_HEIGHT, "[01]12345678901231", "", 0, 34, 1, 134, 268, 86 }, + /* 88*/ { BARCODE_TELEPEN, -1, "1234567890", "", 0, 50, 1, 208, 416, 118 }, + /* 89*/ { BARCODE_TELEPEN, COMPLIANT_HEIGHT, "1234567890", "", 0, 32, 1, 208, 416, 82 }, /* 90*/ { BARCODE_UPCA, -1, "12345678901", "", 0, 50, 1, 95, 226, 116 }, /* 91*/ { BARCODE_UPCA, COMPLIANT_HEIGHT, "12345678901", "", 0, 69, 1, 95, 226, 154 }, /* 92*/ { BARCODE_UPCA_CHK, -1, "123456789012", "", 0, 50, 1, 95, 226, 116 }, @@ -238,16 +238,16 @@ static void test_buffer(const testCtx *const p_ctx) { /*113*/ { BARCODE_UPCE_CHK, COMPLIANT_HEIGHT, "12345670+12345", "", 0, 69, 1, 105, 238, 154 }, /*114*/ { BARCODE_POSTNET, -1, "12345678901", "", 0, 12, 2, 123, 246, 24 }, /*115*/ { BARCODE_POSTNET, COMPLIANT_HEIGHT, "12345678901", "", 0, 5, 2, 123, 246, 10 }, - /*116*/ { BARCODE_MSI_PLESSEY, -1, "1234567890", "", 0, 50, 1, 127, 254, 116 }, - /*117*/ { BARCODE_MSI_PLESSEY, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 127, 254, 116 }, + /*116*/ { BARCODE_MSI_PLESSEY, -1, "1234567890", "", 0, 50, 1, 127, 254, 118 }, + /*117*/ { BARCODE_MSI_PLESSEY, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 127, 254, 118 }, /*118*/ { BARCODE_FIM, -1, "A", "", 0, 50, 1, 17, 34, 100 }, /*119*/ { BARCODE_FIM, COMPLIANT_HEIGHT, "A", "", 0, 20, 1, 17, 34, 40 }, - /*120*/ { BARCODE_LOGMARS, -1, "1234567890", "", 0, 50, 1, 191, 382, 116 }, - /*121*/ { BARCODE_LOGMARS, COMPLIANT_HEIGHT, "1234567890", "", 0, 45.5, 1, 191, 382, 107 }, + /*120*/ { BARCODE_LOGMARS, -1, "1234567890", "", 0, 50, 1, 191, 382, 118 }, + /*121*/ { BARCODE_LOGMARS, COMPLIANT_HEIGHT, "1234567890", "", 0, 45.5, 1, 191, 382, 109 }, /*122*/ { BARCODE_PHARMA, -1, "123456", "", 0, 50, 1, 58, 116, 100 }, /*123*/ { BARCODE_PHARMA, COMPLIANT_HEIGHT, "123456", "", 0, 16, 1, 58, 116, 32 }, - /*124*/ { BARCODE_PZN, -1, "123456", "", 0, 50, 1, 142, 284, 116 }, - /*125*/ { BARCODE_PZN, COMPLIANT_HEIGHT, "123456", "", 0, 40, 1, 142, 284, 96 }, + /*124*/ { BARCODE_PZN, -1, "123456", "", 0, 50, 1, 142, 284, 118 }, + /*125*/ { BARCODE_PZN, COMPLIANT_HEIGHT, "123456", "", 0, 40, 1, 142, 284, 98 }, /*126*/ { BARCODE_PHARMA_TWO, -1, "12345678", "", 0, 10, 2, 29, 58, 20 }, /*127*/ { BARCODE_PHARMA_TWO, COMPLIANT_HEIGHT, "12345678", "", 0, 8, 2, 29, 58, 16 }, /*128*/ { BARCODE_CEPNET, -1, "12345678", "", 0, 5, 2, 93, 186, 10 }, @@ -260,8 +260,8 @@ static void test_buffer(const testCtx *const p_ctx) { /*135*/ { BARCODE_MAXICODE, COMPLIANT_HEIGHT, "1234567890", "", 0, 165, 33, 30, 299, 298 }, /*136*/ { BARCODE_QRCODE, -1, "1234567890AB", "", 0, 21, 21, 21, 42, 42 }, /*137*/ { BARCODE_QRCODE, COMPLIANT_HEIGHT, "1234567890AB", "", 0, 21, 21, 21, 42, 42 }, - /*138*/ { BARCODE_CODE128AB, -1, "1234567890", "", 0, 50, 1, 145, 290, 116 }, - /*139*/ { BARCODE_CODE128AB, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 145, 290, 116 }, + /*138*/ { BARCODE_CODE128AB, -1, "1234567890", "", 0, 50, 1, 145, 290, 118 }, + /*139*/ { BARCODE_CODE128AB, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 145, 290, 118 }, /*140*/ { BARCODE_AUSPOST, -1, "12345678901234567890123", "", 0, 8, 3, 133, 266, 16 }, /*141*/ { BARCODE_AUSPOST, COMPLIANT_HEIGHT, "12345678901234567890123", "", 0, 9.5, 3, 133, 266, 19 }, /*142*/ { BARCODE_AUSREPLY, -1, "12345678", "", 0, 8, 3, 73, 146, 16 }, @@ -280,18 +280,18 @@ static void test_buffer(const testCtx *const p_ctx) { /*155*/ { BARCODE_RM4SCC, COMPLIANT_HEIGHT, "1234567890", "", 0, 8, 3, 91, 182, 16 }, /*156*/ { BARCODE_DATAMATRIX, -1, "ABC", "", 0, 10, 10, 10, 20, 20 }, /*157*/ { BARCODE_DATAMATRIX, COMPLIANT_HEIGHT, "ABC", "", 0, 10, 10, 10, 20, 20 }, - /*158*/ { BARCODE_EAN14, -1, "1234567890123", "", 0, 50, 1, 134, 268, 116 }, - /*159*/ { BARCODE_EAN14, COMPLIANT_HEIGHT, "1234567890123", "", 0, 64, 1, 134, 268, 144 }, - /*160*/ { BARCODE_VIN, -1, "12345678701234567", "", 0, 50, 1, 246, 492, 116 }, - /*161*/ { BARCODE_VIN, COMPLIANT_HEIGHT, "12345678701234567", "", 0, 50, 1, 246, 492, 116 }, + /*158*/ { BARCODE_EAN14, -1, "1234567890123", "", 0, 50, 1, 134, 268, 118 }, + /*159*/ { BARCODE_EAN14, COMPLIANT_HEIGHT, "1234567890123", "", 0, 64, 1, 134, 268, 146 }, + /*160*/ { BARCODE_VIN, -1, "12345678701234567", "", 0, 50, 1, 246, 492, 118 }, + /*161*/ { BARCODE_VIN, COMPLIANT_HEIGHT, "12345678701234567", "", 0, 50, 1, 246, 492, 118 }, /*162*/ { BARCODE_CODABLOCKF, -1, "1234567890", "", 0, 20, 2, 101, 242, 44 }, /*163*/ { BARCODE_CODABLOCKF, COMPLIANT_HEIGHT, "1234567890", "", 0, 20, 2, 101, 242, 44 }, - /*164*/ { BARCODE_NVE18, -1, "12345678901234567", "", 0, 50, 1, 156, 312, 116 }, - /*165*/ { BARCODE_NVE18, COMPLIANT_HEIGHT, "12345678901234567", "", 0, 64, 1, 156, 312, 144 }, + /*164*/ { BARCODE_NVE18, -1, "12345678901234567", "", 0, 50, 1, 156, 312, 118 }, + /*165*/ { BARCODE_NVE18, COMPLIANT_HEIGHT, "12345678901234567", "", 0, 64, 1, 156, 312, 146 }, /*166*/ { BARCODE_JAPANPOST, -1, "1234567890", "", 0, 8, 3, 133, 266, 16 }, /*167*/ { BARCODE_JAPANPOST, COMPLIANT_HEIGHT, "1234567890", "", 0, 6, 3, 133, 266, 12 }, - /*168*/ { BARCODE_KOREAPOST, -1, "123456", "", 0, 50, 1, 167, 334, 116 }, - /*169*/ { BARCODE_KOREAPOST, COMPLIANT_HEIGHT, "123456", "", 0, 50, 1, 167, 334, 116 }, + /*168*/ { BARCODE_KOREAPOST, -1, "123456", "", 0, 50, 1, 167, 334, 118 }, + /*169*/ { BARCODE_KOREAPOST, COMPLIANT_HEIGHT, "123456", "", 0, 50, 1, 167, 334, 118 }, /*170*/ { BARCODE_DBAR_STK, -1, "1234567890123", "", 0, 13, 3, 50, 100, 26 }, /*171*/ { BARCODE_DBAR_STK, COMPLIANT_HEIGHT, "1234567890123", "", 0, 13, 3, 50, 100, 26 }, /*172*/ { BARCODE_DBAR_OMNSTK, -1, "1234567890123", "", 0, 69, 5, 50, 100, 138 }, @@ -304,26 +304,26 @@ static void test_buffer(const testCtx *const p_ctx) { /*179*/ { BARCODE_MICROPDF417, COMPLIANT_HEIGHT, "1234567890", "", 0, 12, 6, 82, 164, 24 }, /*180*/ { BARCODE_USPS_IMAIL, -1, "12345678901234567890", "", 0, 8, 3, 129, 258, 16 }, /*181*/ { BARCODE_USPS_IMAIL, COMPLIANT_HEIGHT, "12345678901234567890", "", 0, 6, 3, 129, 258, 12 }, - /*182*/ { BARCODE_PLESSEY, -1, "1234567890", "", 0, 50, 1, 227, 454, 116 }, - /*183*/ { BARCODE_PLESSEY, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 227, 454, 116 }, - /*184*/ { BARCODE_TELEPEN_NUM, -1, "1234567890", "", 0, 50, 1, 128, 256, 116 }, - /*185*/ { BARCODE_TELEPEN_NUM, COMPLIANT_HEIGHT, "1234567890", "", 0, 32, 1, 128, 256, 80 }, - /*186*/ { BARCODE_ITF14, -1, "1234567890", "", 0, 50, 1, 135, 330, 136 }, - /*187*/ { BARCODE_ITF14, COMPLIANT_HEIGHT, "1234567890", "", 0, 64, 1, 135, 330, 164 }, + /*182*/ { BARCODE_PLESSEY, -1, "1234567890", "", 0, 50, 1, 227, 454, 118 }, + /*183*/ { BARCODE_PLESSEY, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 227, 454, 118 }, + /*184*/ { BARCODE_TELEPEN_NUM, -1, "1234567890", "", 0, 50, 1, 128, 256, 118 }, + /*185*/ { BARCODE_TELEPEN_NUM, COMPLIANT_HEIGHT, "1234567890", "", 0, 32, 1, 128, 256, 82 }, + /*186*/ { BARCODE_ITF14, -1, "1234567890", "", 0, 50, 1, 135, 330, 138 }, + /*187*/ { BARCODE_ITF14, COMPLIANT_HEIGHT, "1234567890", "", 0, 64, 1, 135, 330, 166 }, /*188*/ { BARCODE_KIX, -1, "123456ABCDE", "", 0, 8, 3, 87, 174, 16 }, /*189*/ { BARCODE_KIX, COMPLIANT_HEIGHT, "123456ABCDE", "", 0, 8, 3, 87, 174, 16 }, /*190*/ { BARCODE_AZTEC, -1, "1234567890AB", "", 0, 15, 15, 15, 30, 30 }, /*191*/ { BARCODE_AZTEC, COMPLIANT_HEIGHT, "1234567890AB", "", 0, 15, 15, 15, 30, 30 }, /*192*/ { BARCODE_DAFT, -1, "DAFTDAFTDAFTDAFT", "", 0, 8, 3, 31, 62, 16 }, /*193*/ { BARCODE_DAFT, COMPLIANT_HEIGHT, "DAFTDAFTDAFTDAFT", "", 0, 8, 3, 31, 62, 16 }, - /*194*/ { BARCODE_DPD, -1, "0123456789012345678901234567", "", 0, 50, 1, 189, 378, 122 }, - /*195*/ { BARCODE_DPD, COMPLIANT_HEIGHT, "0123456789012345678901234567", "", 0, 66.5, 1, 189, 378, 155 }, + /*194*/ { BARCODE_DPD, -1, "0123456789012345678901234567", "", 0, 50, 1, 189, 378, 124 }, + /*195*/ { BARCODE_DPD, COMPLIANT_HEIGHT, "0123456789012345678901234567", "", 0, 66.5, 1, 189, 378, 157 }, /*196*/ { BARCODE_MICROQR, -1, "12345", "", 0, 11, 11, 11, 22, 22 }, /*197*/ { BARCODE_MICROQR, COMPLIANT_HEIGHT, "12345", "", 0, 11, 11, 11, 22, 22 }, - /*198*/ { BARCODE_HIBC_128, -1, "1234567890", "", 0, 50, 1, 123, 246, 116 }, - /*199*/ { BARCODE_HIBC_128, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 123, 246, 116 }, - /*200*/ { BARCODE_HIBC_39, -1, "1234567890", "", 0, 50, 1, 223, 446, 116 }, - /*201*/ { BARCODE_HIBC_39, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 223, 446, 116 }, + /*198*/ { BARCODE_HIBC_128, -1, "1234567890", "", 0, 50, 1, 123, 246, 118 }, + /*199*/ { BARCODE_HIBC_128, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 123, 246, 118 }, + /*200*/ { BARCODE_HIBC_39, -1, "1234567890", "", 0, 50, 1, 223, 446, 118 }, + /*201*/ { BARCODE_HIBC_39, COMPLIANT_HEIGHT, "1234567890", "", 0, 50, 1, 223, 446, 118 }, /*202*/ { BARCODE_HIBC_DM, -1, "ABC", "", 0, 12, 12, 12, 24, 24 }, /*203*/ { BARCODE_HIBC_DM, COMPLIANT_HEIGHT, "ABC", "", 0, 12, 12, 12, 24, 24 }, /*204*/ { BARCODE_HIBC_QR, -1, "1234567890AB", "", 0, 21, 21, 21, 42, 42 }, @@ -342,14 +342,14 @@ static void test_buffer(const testCtx *const p_ctx) { /*217*/ { BARCODE_HANXIN, COMPLIANT_HEIGHT, "1234567890AB", "", 0, 23, 23, 23, 46, 46 }, /*218*/ { BARCODE_MAILMARK_2D, -1, "012100123412345678AB19XY1A 0", "", 0, 24, 24, 24, 48, 48 }, /*219*/ { BARCODE_MAILMARK_2D, COMPLIANT_HEIGHT, "012100123412345678AB19XY1A 0", "", 0, 24, 24, 24, 48, 48 }, - /*220*/ { BARCODE_UPU_S10, -1, "EE876543216CA", "", 0, 50, 1, 156, 312, 116 }, - /*221*/ { BARCODE_UPU_S10, COMPLIANT_HEIGHT, "EE876543216CA", "", 0, 50, 1, 156, 312, 116 }, + /*220*/ { BARCODE_UPU_S10, -1, "EE876543216CA", "", 0, 50, 1, 156, 312, 118 }, + /*221*/ { BARCODE_UPU_S10, COMPLIANT_HEIGHT, "EE876543216CA", "", 0, 50, 1, 156, 312, 118 }, /*222*/ { BARCODE_MAILMARK_4S, -1, "01000000000000000AA00AA0A", "", 0, 10, 3, 155, 310, 20 }, /*223*/ { BARCODE_MAILMARK_4S, COMPLIANT_HEIGHT, "01000000000000000AA00AA0A", "", 0, 8, 3, 155, 310, 16 }, /*224*/ { BARCODE_AZRUNE, -1, "255", "", 0, 11, 11, 11, 22, 22 }, /*225*/ { BARCODE_AZRUNE, COMPLIANT_HEIGHT, "255", "", 0, 11, 11, 11, 22, 22 }, - /*226*/ { BARCODE_CODE32, -1, "12345678", "", 0, 50, 1, 103, 206, 116 }, - /*227*/ { BARCODE_CODE32, COMPLIANT_HEIGHT, "12345678", "", 0, 20, 1, 103, 206, 56 }, + /*226*/ { BARCODE_CODE32, -1, "12345678", "", 0, 50, 1, 103, 206, 118 }, + /*227*/ { BARCODE_CODE32, COMPLIANT_HEIGHT, "12345678", "", 0, 20, 1, 103, 206, 58 }, /*228*/ { BARCODE_EAN13_CC, -1, "123456789012", "[20]01", 0, 50, 7, 99, 226, 116 }, /*229*/ { BARCODE_EANX_CC, -1, "123456789012", "[20]01", 0, 50, 7, 99, 226, 116 }, /*230*/ { BARCODE_EAN13_CC, COMPLIANT_HEIGHT, "123456789012", "[20]01", 0, 81, 7, 99, 226, 178 }, @@ -374,14 +374,14 @@ static void test_buffer(const testCtx *const p_ctx) { /*249*/ { BARCODE_EANX_CC, -1, "1234567+12345", "[20]01", ZINT_WARN_NONCOMPLIANT, 50, 8, 125, 266, 116 }, /*250*/ { BARCODE_EAN8_CC, COMPLIANT_HEIGHT, "1234567+12345", "[20]01", ZINT_WARN_NONCOMPLIANT, 69, 8, 125, 266, 154 }, /*251*/ { BARCODE_EANX_CC, COMPLIANT_HEIGHT, "1234567+12345", "[20]01", ZINT_WARN_NONCOMPLIANT, 69, 8, 125, 266, 154 }, - /*252*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901231", "[20]01", 0, 50, 5, 145, 290, 116 }, - /*253*/ { BARCODE_GS1_128_CC, COMPLIANT_HEIGHT, "[01]12345678901231", "[20]01", 0, 71, 5, 145, 290, 158 }, - /*254*/ { BARCODE_DBAR_OMN_CC, -1, "1234567890123", "[20]01", 0, 21, 5, 100, 200, 58 }, - /*255*/ { BARCODE_DBAR_OMN_CC, COMPLIANT_HEIGHT, "1234567890123", "[20]01", 0, 40, 5, 100, 200, 96 }, - /*256*/ { BARCODE_DBAR_LTD_CC, -1, "1234567890123", "[20]01", 0, 19, 6, 79, 158, 54 }, - /*257*/ { BARCODE_DBAR_LTD_CC, COMPLIANT_HEIGHT, "1234567890123", "[20]01", 0, 19, 6, 79, 158, 54 }, - /*258*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231", "[20]01", 0, 41, 5, 134, 268, 98 }, - /*259*/ { BARCODE_DBAR_EXP_CC, COMPLIANT_HEIGHT, "[01]12345678901231", "[20]01", 0, 41, 5, 134, 268, 98 }, + /*252*/ { BARCODE_GS1_128_CC, -1, "[01]12345678901231", "[20]01", 0, 50, 5, 145, 290, 118 }, + /*253*/ { BARCODE_GS1_128_CC, COMPLIANT_HEIGHT, "[01]12345678901231", "[20]01", 0, 71, 5, 145, 290, 160 }, + /*254*/ { BARCODE_DBAR_OMN_CC, -1, "1234567890123", "[20]01", 0, 21, 5, 100, 200, 60 }, + /*255*/ { BARCODE_DBAR_OMN_CC, COMPLIANT_HEIGHT, "1234567890123", "[20]01", 0, 40, 5, 100, 200, 98 }, + /*256*/ { BARCODE_DBAR_LTD_CC, -1, "1234567890123", "[20]01", 0, 19, 6, 79, 158, 56 }, + /*257*/ { BARCODE_DBAR_LTD_CC, COMPLIANT_HEIGHT, "1234567890123", "[20]01", 0, 19, 6, 79, 158, 56 }, + /*258*/ { BARCODE_DBAR_EXP_CC, -1, "[01]12345678901231", "[20]01", 0, 41, 5, 134, 268, 100 }, + /*259*/ { BARCODE_DBAR_EXP_CC, COMPLIANT_HEIGHT, "[01]12345678901231", "[20]01", 0, 41, 5, 134, 268, 100 }, /*260*/ { BARCODE_UPCA_CC, -1, "12345678901", "[20]01", 0, 50, 7, 99, 226, 116 }, /*261*/ { BARCODE_UPCA_CC, COMPLIANT_HEIGHT, "12345678901", "[20]01", 0, 81, 7, 99, 226, 178 }, /*262*/ { BARCODE_UPCA_CC, -1, "12345678901+12", "[20]01", 0, 50, 7, 127, 276, 116 }, @@ -400,8 +400,8 @@ static void test_buffer(const testCtx *const p_ctx) { /*275*/ { BARCODE_DBAR_OMNSTK_CC, COMPLIANT_HEIGHT, "1234567890123", "[20]01", 0, 80, 11, 56, 112, 160 }, /*276*/ { BARCODE_DBAR_EXPSTK_CC, -1, "[01]12345678901231", "[20]01", 0, 78, 9, 102, 204, 156 }, /*277*/ { BARCODE_DBAR_EXPSTK_CC, COMPLIANT_HEIGHT, "[01]12345678901231", "[20]01", 0, 78, 9, 102, 204, 156 }, - /*278*/ { BARCODE_CHANNEL, -1, "01", "", 0, 50, 1, 19, 38, 116 }, - /*279*/ { BARCODE_CHANNEL, COMPLIANT_HEIGHT, "01", "", 0, 20, 1, 19, 38, 56 }, + /*278*/ { BARCODE_CHANNEL, -1, "01", "", 0, 50, 1, 19, 38, 118 }, + /*279*/ { BARCODE_CHANNEL, COMPLIANT_HEIGHT, "01", "", 0, 20, 1, 19, 38, 58 }, /*280*/ { BARCODE_CODEONE, -1, "12345678901234567890", "", 0, 16, 16, 18, 36, 32 }, /*281*/ { BARCODE_CODEONE, COMPLIANT_HEIGHT, "12345678901234567890", "", 0, 16, 16, 18, 36, 32 }, /*282*/ { BARCODE_GRIDMATRIX, -1, "ABC", "", 0, 18, 18, 18, 36, 36 }, @@ -412,8 +412,8 @@ static void test_buffer(const testCtx *const p_ctx) { /*287*/ { BARCODE_ULTRA, COMPLIANT_HEIGHT, "1234567890", "", 0, 13, 13, 18, 36, 26 }, /*288*/ { BARCODE_RMQR, -1, "12345", "", 0, 11, 11, 27, 54, 22 }, /*289*/ { BARCODE_RMQR, COMPLIANT_HEIGHT, "12345", "", 0, 11, 11, 27, 54, 22 }, - /*290*/ { BARCODE_BC412, -1, "1234567", "", 0, 16.5, 1, 102, 204, 49 }, - /*291*/ { BARCODE_BC412, COMPLIANT_HEIGHT, "1234567", "", 0, 16.5, 1, 102, 204, 49 }, + /*290*/ { BARCODE_BC412, -1, "1234567", "", 0, 16.5, 1, 102, 204, 51 }, + /*291*/ { BARCODE_BC412, COMPLIANT_HEIGHT, "1234567", "", 0, 16.5, 1, 102, 204, 51 }, /*292*/ { BARCODE_DXFILMEDGE, -1, "120476", "", 0, 6, 2, 23, 46, 12 }, /*293*/ { BARCODE_DXFILMEDGE, COMPLIANT_HEIGHT, "120476", "", 0, 6, 2, 23, 46, 12 }, }; @@ -852,9 +852,9 @@ static void test_stacking(const testCtx *const p_ctx) { }; /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */ static const struct item data[] = { - /* 0*/ { BARCODE_CODE128, -1, -1, -1, "A", "B", 50, 2, 46, 92, 116, -1, -1, -1 }, - /* 1*/ { BARCODE_CODE128, BARCODE_BIND, -1, -1, "A", "B", 50, 2, 46, 92, 116, 49, 4, 2 }, - /* 2*/ { BARCODE_CODE128, BARCODE_BIND, -1, 2, "A", "B", 50, 2, 46, 92, 116, 48, 4, 4 }, + /* 0*/ { BARCODE_CODE128, -1, -1, -1, "A", "B", 50, 2, 46, 92, 118, -1, -1, -1 }, + /* 1*/ { BARCODE_CODE128, BARCODE_BIND, -1, -1, "A", "B", 50, 2, 46, 92, 118, 49, 4, 2 }, + /* 2*/ { BARCODE_CODE128, BARCODE_BIND, -1, 2, "A", "B", 50, 2, 46, 92, 118, 48, 4, 4 }, }; const int data_size = ARRAY_SIZE(data); int i, length, ret; @@ -971,25 +971,25 @@ static void test_output_options(const testCtx *const p_ctx) { }; /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */ static const struct item data[] = { - /* 0*/ { BARCODE_CODE128, -1, -1, -1, -1, 0, 0, "A123", 0, 50, 1, 79, 158, 116, 0, 0, 4 }, - /* 1*/ { BARCODE_CODE128, -1, -1, -1, -1, 180, 0, "A123", 0, 50, 1, 79, 158, 116, 0, 115, 4 }, - /* 2*/ { BARCODE_CODE128, -1, -1, 2, -1, 0, 0, "A123", 0, 50, 1, 79, 158, 116, 0, 0, 4 }, - /* 3*/ { BARCODE_CODE128, -1, -1, 2, BARCODE_BIND, 0, 0, "A123", 0, 50, 1, 79, 158, 124, 1, 0, 4 }, - /* 4*/ { BARCODE_CODE128, -1, -1, 2, BARCODE_BIND, 0, 0, "A123", 0, 50, 1, 79, 158, 124, 0, 4, 4 }, - /* 5*/ { BARCODE_CODE128, -1, -1, 2, BARCODE_BOX, 0, 0, "A123", 0, 50, 1, 79, 166, 124, 1, 4, 4 }, - /* 6*/ { BARCODE_CODE128, -1, -1, 0, BARCODE_BIND, 0, 0, "A123", 0, 50, 1, 79, 158, 116, 0, 0, 4 }, - /* 7*/ { BARCODE_CODE128, -1, -1, 0, BARCODE_BOX, 0, 0, "A123", 0, 50, 1, 79, 158, 116, 0, 4, 4 }, - /* 8*/ { BARCODE_CODE128, -1, -1, -1, -1, 0, 0, "A123", 0, 50, 1, 79, 158, 116, 0, 0, 8 }, - /* 9*/ { BARCODE_CODE128, 3, -1, -1, -1, 0, 0, "A123", 0, 50, 1, 79, 170, 116, 1, 0, 8 }, - /* 10*/ { BARCODE_CODE128, 3, 1, -1, -1, 0, 0, "A123", 0, 50, 1, 79, 170, 120, 0, 0, 8 }, - /* 11*/ { BARCODE_CODE128, 3, -1, 4, -1, 0, 0, "A123", 0, 50, 1, 79, 170, 116, 1, 0, 8 }, - /* 12*/ { BARCODE_CODE128, 3, -1, 4, BARCODE_BIND, 0, 0, "A123", 0, 50, 1, 79, 170, 132, 1, 0, 0 }, - /* 13*/ { BARCODE_CODE128, 3, -1, 4, BARCODE_BIND, 0, 0, "A123", 0, 50, 1, 79, 170, 132, 0, 8, 0 }, - /* 14*/ { BARCODE_CODE128, 3, -1, 4, BARCODE_BOX, 0, 0, "A123", 0, 50, 1, 79, 186, 132, 1, 8, 0 }, + /* 0*/ { BARCODE_CODE128, -1, -1, -1, -1, 0, 0, "A123", 0, 50, 1, 79, 158, 118, 0, 0, 4 }, + /* 1*/ { BARCODE_CODE128, -1, -1, -1, -1, 180, 0, "A123", 0, 50, 1, 79, 158, 118, 0, 115, 4 }, + /* 2*/ { BARCODE_CODE128, -1, -1, 2, -1, 0, 0, "A123", 0, 50, 1, 79, 158, 118, 0, 0, 4 }, + /* 3*/ { BARCODE_CODE128, -1, -1, 2, BARCODE_BIND, 0, 0, "A123", 0, 50, 1, 79, 158, 126, 1, 0, 4 }, + /* 4*/ { BARCODE_CODE128, -1, -1, 2, BARCODE_BIND, 0, 0, "A123", 0, 50, 1, 79, 158, 126, 0, 4, 4 }, + /* 5*/ { BARCODE_CODE128, -1, -1, 2, BARCODE_BOX, 0, 0, "A123", 0, 50, 1, 79, 166, 126, 1, 4, 4 }, + /* 6*/ { BARCODE_CODE128, -1, -1, 0, BARCODE_BIND, 0, 0, "A123", 0, 50, 1, 79, 158, 118, 0, 0, 4 }, + /* 7*/ { BARCODE_CODE128, -1, -1, 0, BARCODE_BOX, 0, 0, "A123", 0, 50, 1, 79, 158, 118, 0, 4, 4 }, + /* 8*/ { BARCODE_CODE128, -1, -1, -1, -1, 0, 0, "A123", 0, 50, 1, 79, 158, 118, 0, 0, 8 }, + /* 9*/ { BARCODE_CODE128, 3, -1, -1, -1, 0, 0, "A123", 0, 50, 1, 79, 170, 118, 1, 0, 8 }, + /* 10*/ { BARCODE_CODE128, 3, 1, -1, -1, 0, 0, "A123", 0, 50, 1, 79, 170, 122, 0, 0, 8 }, + /* 11*/ { BARCODE_CODE128, 3, -1, 4, -1, 0, 0, "A123", 0, 50, 1, 79, 170, 118, 1, 0, 8 }, + /* 12*/ { BARCODE_CODE128, 3, -1, 4, BARCODE_BIND, 0, 0, "A123", 0, 50, 1, 79, 170, 134, 1, 0, 0 }, + /* 13*/ { BARCODE_CODE128, 3, -1, 4, BARCODE_BIND, 0, 0, "A123", 0, 50, 1, 79, 170, 134, 0, 8, 0 }, + /* 14*/ { BARCODE_CODE128, 3, -1, 4, BARCODE_BOX, 0, 0, "A123", 0, 50, 1, 79, 186, 134, 1, 8, 0 }, /* 15*/ { BARCODE_CODE128, -1, -1, -1, BARCODE_DOTTY_MODE, 0, 0, "A123", ZINT_ERROR_INVALID_OPTION, -1, -1, -1, -1, -1, -1, -1, -1 }, - /* 16*/ { BARCODE_CODE128, -1, -1, -1, OUT_BUFFER_INTERMEDIATE, 0, 0, "A123", 0, 50, 1, 79, 158, 116, 0, 0, 4 }, - /* 17*/ { BARCODE_CODE128, -1, -1, -1, OUT_BUFFER_INTERMEDIATE, 180, 0, "A123", 0, 50, 1, 79, 158, 116, 0, 115, 4 }, - /* 18*/ { BARCODE_CODE128, 3, -1, 4, BARCODE_BOX | OUT_BUFFER_INTERMEDIATE, 0, 0, "A123", 0, 50, 1, 79, 186, 132, 1, 8, 0 }, + /* 16*/ { BARCODE_CODE128, -1, -1, -1, OUT_BUFFER_INTERMEDIATE, 0, 0, "A123", 0, 50, 1, 79, 158, 118, 0, 0, 4 }, + /* 17*/ { BARCODE_CODE128, -1, -1, -1, OUT_BUFFER_INTERMEDIATE, 180, 0, "A123", 0, 50, 1, 79, 158, 118, 0, 115, 4 }, + /* 18*/ { BARCODE_CODE128, 3, -1, 4, BARCODE_BOX | OUT_BUFFER_INTERMEDIATE, 0, 0, "A123", 0, 50, 1, 79, 186, 134, 1, 8, 0 }, /* 19*/ { BARCODE_QRCODE, -1, -1, -1, -1, 0, 0, "A123", 0, 21, 21, 21, 42, 42, 0, 2, 2 }, /* 20*/ { BARCODE_QRCODE, -1, -1, -1, -1, 180, 0, "A123", 0, 21, 21, 21, 42, 42, 0, 39, 2 }, /* 21*/ { BARCODE_QRCODE, -1, -1, 3, -1, 0, 0, "A123", 0, 21, 21, 21, 42, 42, 0, 2, 2 }, @@ -1063,12 +1063,12 @@ static void test_output_options(const testCtx *const p_ctx) { /* 89*/ { BARCODE_MAXICODE, -1, -1, -1, OUT_BUFFER_INTERMEDIATE, 0, 0, "A123", 0, 165, 33, 30, 299, 298, 1, 4, 14 }, /* 90*/ { BARCODE_MAXICODE, -1, -1, -1, OUT_BUFFER_INTERMEDIATE, 270, 0, "A123", 0, 165, 33, 30, 298, 299, 1, 4, 4 }, /* 91*/ { BARCODE_MAXICODE, -1, -1, -1, OUT_BUFFER_INTERMEDIATE, 270, 0, "A123", 0, 165, 33, 30, 298, 299, 0, 4, 14 }, - /* 92*/ { BARCODE_ITF14, -1, -1, -1, -1, 0, 0, "123", 0, 50, 1, 135, 330, 136, 1, 110, 0 }, - /* 93*/ { BARCODE_ITF14, -1, -1, -1, -1, 90, 0, "123", 0, 50, 1, 135, 136, 330, 1, 0, 110 }, - /* 94*/ { BARCODE_ITF14, -1, -1, 0, -1, 0, 0, "123", 0, 50, 1, 135, 330, 136, 1, 110, 0 }, - /* 95*/ { BARCODE_ITF14, -1, -1, 0, BARCODE_BOX, 0, 0, "123", 0, 50, 1, 135, 310, 116, 0, 100, 0 }, - /* 96*/ { BARCODE_ITF14, -1, -1, -1, OUT_BUFFER_INTERMEDIATE, 0, 0, "123", 0, 50, 1, 135, 330, 136, 1, 110, 0 }, - /* 97*/ { BARCODE_ITF14, -1, -1, -1, OUT_BUFFER_INTERMEDIATE, 90, 0, "123", 0, 50, 1, 135, 136, 330, 1, 0, 110 }, + /* 92*/ { BARCODE_ITF14, -1, -1, -1, -1, 0, 0, "123", 0, 50, 1, 135, 330, 138, 1, 110, 0 }, + /* 93*/ { BARCODE_ITF14, -1, -1, -1, -1, 90, 0, "123", 0, 50, 1, 135, 138, 330, 1, 0, 110 }, + /* 94*/ { BARCODE_ITF14, -1, -1, 0, -1, 0, 0, "123", 0, 50, 1, 135, 330, 138, 1, 110, 0 }, + /* 95*/ { BARCODE_ITF14, -1, -1, 0, BARCODE_BOX, 0, 0, "123", 0, 50, 1, 135, 310, 118, 0, 100, 0 }, + /* 96*/ { BARCODE_ITF14, -1, -1, -1, OUT_BUFFER_INTERMEDIATE, 0, 0, "123", 0, 50, 1, 135, 330, 138, 1, 110, 0 }, + /* 97*/ { BARCODE_ITF14, -1, -1, -1, OUT_BUFFER_INTERMEDIATE, 90, 0, "123", 0, 50, 1, 135, 138, 330, 1, 0, 110 }, /* 98*/ { BARCODE_CODABLOCKF, -1, -1, -1, -1, 0, 0, "A123", 0, 20, 2, 101, 242, 44, 1, 43, 24 }, /* 99*/ { BARCODE_CODABLOCKF, -1, -1, -1, BARCODE_BIND_TOP, 0, 0, "A123", 0, 20, 2, 101, 242, 42, 0, 41, 24 }, /*100*/ { BARCODE_CODE16K, -1, -1, -1, -1, 0, 0, "A123", 0, 20, 2, 70, 162, 44, 1, 43, 0 }, @@ -1159,9 +1159,9 @@ static void test_dcontent_string_wrap(const testCtx *const p_ctx) { }; /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */ static const struct item data[] = { - /* 0*/ { BARCODE_CODE128, -1, "12", " E", 50, 1, 46, 92, 116, 104, 0 }, - /* 1*/ { BARCODE_CODE128, BOLD_TEXT, "12", " E", 50, 1, 46, 92, 116, 104, 0 }, - /* 2*/ { BARCODE_CODE128, SMALL_TEXT, "12", " E", 50, 1, 46, 92, 112, 103, 0 }, + /* 0*/ { BARCODE_CODE128, -1, "12", " E", 50, 1, 46, 92, 118, 104, 0 }, + /* 1*/ { BARCODE_CODE128, BOLD_TEXT, "12", " E", 50, 1, 46, 92, 118, 104, 0 }, + /* 2*/ { BARCODE_CODE128, SMALL_TEXT, "12", " E", 50, 1, 46, 92, 114, 103, 0 }, }; const int data_size = ARRAY_SIZE(data); int i, length, ret; @@ -1234,7 +1234,7 @@ static void test_code128_utf8(const testCtx *const p_ctx) { }; /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */ static const struct item data[] = { - /* 0*/ { "é", 50, 1, 57, 114, 116, 110, 53, 6 }, + /* 0*/ { "é", 50, 1, 57, 114, 118, 110, 54, 6 }, }; const int data_size = ARRAY_SIZE(data); int i, length, ret; @@ -1363,10 +1363,10 @@ static void test_scale(const testCtx *const p_ctx) { /* 48*/ { BARCODE_PDF417, -1, -1, -1, 43, 0.5, "1", "", 0, 45, 5, 103, 206 * 0.5, 45, 0 /*set_row*/, 45, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 49*/ { BARCODE_PDF417, -1, -1, -1, 44, 0.5, "1", "", 0, 45, 5, 103, 206 * 0.5, 45, 0 /*set_row*/, 45, 170 * 0.5, 14 * 0.5 }, /* Height specified */ /* 50*/ { BARCODE_PDF417, -1, -1, -1, 45, 0.5, "1", "", 0, 45, 5, 103, 206 * 0.5, 45, 0 /*set_row*/, 45, 170 * 0.5, 14 * 0.5 }, /* Height specified */ - /* 51*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 0, "123456789012", "", 0, 50, 1, 79, 158, 116, 104 /*set_row*/, 114, 20, 2 }, /* With no scaling */ - /* 52*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 1.5, "123456789012", "", 0, 50, 1, 79, 158 * 1.5, 116 * 1.5, 104 * 1.5 /*set_row*/, 114 * 1.5, 20 * 1.5, 1 * 1.5 }, - /* 53*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 2.0, "123456789012", "", 0, 50, 1, 79, 158 * 2.0, 116 * 2.0, 104 * 2.0 /*set_row*/, 114 * 2.0, 20 * 2.0 + 1, 1 * 2.0 + 1 }, - /* 54*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 3.5, "123456789012", "", 0, 50, 1, 79, 158 * 3.5, 116 * 3.5, 104 * 3.5 /*set_row*/, 114 * 3.5, 20 * 3.5 + 1, 1 * 3.5 + 0.5 }, + /* 51*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 0, "123456789012", "", 0, 50, 1, 79, 158, 118, 104 /*set_row*/, 114, 27, 2 }, /* With no scaling */ + /* 52*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 1.5, "123456789012", "", 0, 50, 1, 79, 158 * 1.5, 118 * 1.5, 104 * 1.5 + 1 /*set_row*/, 114 * 1.5, 27 * 1.5 + 1.5, 1 * 1.5 + 1.5 }, + /* 53*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 2.0, "123456789012", "", 0, 50, 1, 79, 158 * 2.0, 118 * 2.0, 104 * 2.0 /*set_row*/, 114 * 2.0 - 1, 27 * 2.0 + 2, 1 * 2.0 + 1 }, + /* 54*/ { BARCODE_DBAR_LTD, -1, -1, BOLD_TEXT, 0, 3.5, "123456789012", "", 0, 50, 1, 79, 158 * 3.5, 118 * 3.5 - 1, 104 * 3.5 - 1 /*set_row*/, 114 * 3.5 - 2, 27 * 3.5 + 3.5, 1 * 3.5 + 0.5 }, /* 55*/ { BARCODE_UPCA, -1, -1, -1, 0, 0, "12345678904", "", 0, 50, 1, 95, 226, 116, 104 /*set_row*/, 114, 5, 2 }, /* With no scaling */ /* 56*/ { BARCODE_UPCA, -1, -1, -1, 0, 2.5, "12345678904", "", 0, 50, 1, 95, 226 * 2.5, 116 * 2.5, 104 * 2.5 /*set_row*/, 114 * 2.5, 5 * 2.5 + 1.5, 2 * 2.5 }, /* 57*/ { BARCODE_UPCA, -1, -1, -1, 0, 4.5, "12345678904", "", 0, 50, 1, 95, 226 * 4.5, 116 * 4.5, 104 * 4.5 /*set_row*/, 114 * 4.5, 5 * 4.5 + 1.5, 2 * 4.5 }, @@ -1396,9 +1396,9 @@ static void test_scale(const testCtx *const p_ctx) { /* 81*/ { BARCODE_POSTNET, -1, -1, BARCODE_QUIET_ZONES, 0, 0.9, "12345", "", 0, 12, 2, 63, 146 * 0.9, 30 * 0.9, 3 * 0.9 + 1 /*set_row*/, 27 * 0.9, 10 * 0.9, 2 * 0.9 + 1 }, /* +1's due to interpolation */ /* 82*/ { BARCODE_POSTNET, -1, -1, BARCODE_QUIET_ZONES, 0, 2.3, "12345", "", 0, 12, 2, 63, 146 * 2.3, 30 * 2.3, 3 * 2.3 + 1 /*set_row*/, 27 * 2.3 - 1, 10 * 2.3, 2 * 2.3 + 1 }, /* -1/+1's due to interpolation */ /* 83*/ { BARCODE_POSTNET, -1, -1, BARCODE_QUIET_ZONES, 0, 3.1, "12345", "", 0, 12, 2, 63, 146 * 3.1, 30 * 3.1, 3 * 3.1 + 1 /*set_row*/, 27 * 3.1, 10 * 3.1, 2 * 3.2 + 1 }, /* +1's due to interpolation */ - /* 84*/ { BARCODE_ITF14, -1, 4, BARCODE_BIND, 61.8, 0, "12345", "", 0, 62, 1, 135, 310, 156, 8 /*set_row*/, 132, 20, 2 }, /* With no scaling */ - /* 85*/ { BARCODE_ITF14, -1, 4, BARCODE_BIND, 61.8, 2, "12345", "", 0, 61.75, 1, 135, 310 * 2, 156 * 2 - 1, 8 * 2 /*set_row*/, 132 * 2 - 1, 20 * 2, 2 * 2 }, /* -1's due to height rounding */ - /* 86*/ { BARCODE_ITF14, -1, 4, BARCODE_BIND, 61.8, 2.1, "12345", "", 0, 62, 1, 135, 310 * 2.1, 156 * 2.1, 8 * 2.1 /*set_row*/, 132 * 2.1, 20 * 2.1, 2 * 2.1 }, + /* 84*/ { BARCODE_ITF14, -1, 4, BARCODE_BIND, 61.8, 0, "12345", "", 0, 62, 1, 135, 310, 158, 8 /*set_row*/, 132, 20, 2 }, /* With no scaling */ + /* 85*/ { BARCODE_ITF14, -1, 4, BARCODE_BIND, 61.8, 2, "12345", "", 0, 61.75, 1, 135, 310 * 2, 158 * 2 - 1, 8 * 2 /*set_row*/, 132 * 2 - 1, 20 * 2, 2 * 2 }, /* -1's due to height rounding */ + /* 86*/ { BARCODE_ITF14, -1, 4, BARCODE_BIND, 61.8, 2.1, "12345", "", 0, 62, 1, 135, 310 * 2.1, 158 * 2.1, 8 * 2.1 /*set_row*/, 132 * 2.1, 20 * 2.1, 2 * 2.1 }, }; const int data_size = ARRAY_SIZE(data); int i, length, ret; @@ -1634,23 +1634,23 @@ static void test_quiet_zones(const testCtx *const p_ctx) { }; /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */ static const struct item data[] = { - /* 0*/ { BARCODE_CODE11, -1, -1, -1, -1, "1234", "", 0, 50, 1, 62, 124, 116, 1 /*set*/, 0, 100, 0, 2 }, - /* 1*/ { BARCODE_CODE11, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 62, 164, 116, 0 /*set*/, 0, 100, 0, 20 }, - /* 2*/ { BARCODE_CODE11, BARCODE_QUIET_ZONES | BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 62, 124, 116, 1 /*set*/, 0, 100, 0, 2 }, /* BARCODE_NO_QUIET_ZONES trumps BARCODE_QUIET_ZONES */ - /* 3*/ { BARCODE_C25STANDARD, -1, -1, -1, -1, "1234", "", 0, 50, 1, 57, 114, 116, 1 /*set*/, 0, 100, 0, 8 }, - /* 4*/ { BARCODE_C25STANDARD, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 57, 154, 116, 0 /*set*/, 0, 100, 0, 20 }, - /* 5*/ { BARCODE_C25INTER, -1, -1, -1, -1, "1234", "", 0, 50, 1, 45, 90, 116, 1 /*set*/, 0, 100, 0, 2 }, - /* 6*/ { BARCODE_C25INTER, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 45, 130, 116, 0 /*set*/, 0, 100, 0, 20 }, - /* 7*/ { BARCODE_C25IATA, -1, -1, -1, -1, "1234", "", 0, 50, 1, 65, 130, 116, 1 /*set*/, 0, 100, 0, 2 }, - /* 8*/ { BARCODE_C25IATA, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 65, 170, 116, 0 /*set*/, 0, 100, 0, 20 }, - /* 9*/ { BARCODE_C25LOGIC, -1, -1, -1, -1, "1234", "", 0, 50, 1, 49, 98, 116, 1 /*set*/, 0, 100, 0, 2 }, - /* 10*/ { BARCODE_C25LOGIC, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 49, 138, 116, 0 /*set*/, 0, 100, 0, 20 }, - /* 11*/ { BARCODE_C25IND, -1, -1, -1, -1, "1234", "", 0, 50, 1, 75, 150, 116, 1 /*set*/, 0, 100, 0, 2 }, - /* 12*/ { BARCODE_C25IND, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 75, 190, 116, 0 /*set*/, 0, 100, 0, 20 }, - /* 13*/ { BARCODE_CODE39, -1, -1, -1, -1, "1234", "", 0, 50, 1, 77, 154, 116, 1 /*set*/, 0, 100, 0, 2 }, - /* 14*/ { BARCODE_CODE39, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 77, 194, 116, 0 /*set*/, 0, 100, 0, 20 }, - /* 15*/ { BARCODE_EXCODE39, -1, -1, -1, -1, "1234", "", 0, 50, 1, 77, 154, 116, 1 /*set*/, 0, 100, 0, 2 }, - /* 16*/ { BARCODE_EXCODE39, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 77, 194, 116, 0 /*set*/, 0, 100, 0, 20 }, + /* 0*/ { BARCODE_CODE11, -1, -1, -1, -1, "1234", "", 0, 50, 1, 62, 124, 118, 1 /*set*/, 0, 100, 0, 2 }, + /* 1*/ { BARCODE_CODE11, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 62, 164, 118, 0 /*set*/, 0, 100, 0, 20 }, + /* 2*/ { BARCODE_CODE11, BARCODE_QUIET_ZONES | BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 62, 124, 118, 1 /*set*/, 0, 100, 0, 2 }, /* BARCODE_NO_QUIET_ZONES trumps BARCODE_QUIET_ZONES */ + /* 3*/ { BARCODE_C25STANDARD, -1, -1, -1, -1, "1234", "", 0, 50, 1, 57, 114, 118, 1 /*set*/, 0, 100, 0, 8 }, + /* 4*/ { BARCODE_C25STANDARD, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 57, 154, 118, 0 /*set*/, 0, 100, 0, 20 }, + /* 5*/ { BARCODE_C25INTER, -1, -1, -1, -1, "1234", "", 0, 50, 1, 45, 90, 118, 1 /*set*/, 0, 100, 0, 2 }, + /* 6*/ { BARCODE_C25INTER, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 45, 130, 118, 0 /*set*/, 0, 100, 0, 20 }, + /* 7*/ { BARCODE_C25IATA, -1, -1, -1, -1, "1234", "", 0, 50, 1, 65, 130, 118, 1 /*set*/, 0, 100, 0, 2 }, + /* 8*/ { BARCODE_C25IATA, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 65, 170, 118, 0 /*set*/, 0, 100, 0, 20 }, + /* 9*/ { BARCODE_C25LOGIC, -1, -1, -1, -1, "1234", "", 0, 50, 1, 49, 98, 118, 1 /*set*/, 0, 100, 0, 2 }, + /* 10*/ { BARCODE_C25LOGIC, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 49, 138, 118, 0 /*set*/, 0, 100, 0, 20 }, + /* 11*/ { BARCODE_C25IND, -1, -1, -1, -1, "1234", "", 0, 50, 1, 75, 150, 118, 1 /*set*/, 0, 100, 0, 2 }, + /* 12*/ { BARCODE_C25IND, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 75, 190, 118, 0 /*set*/, 0, 100, 0, 20 }, + /* 13*/ { BARCODE_CODE39, -1, -1, -1, -1, "1234", "", 0, 50, 1, 77, 154, 118, 1 /*set*/, 0, 100, 0, 2 }, + /* 14*/ { BARCODE_CODE39, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 77, 194, 118, 0 /*set*/, 0, 100, 0, 20 }, + /* 15*/ { BARCODE_EXCODE39, -1, -1, -1, -1, "1234", "", 0, 50, 1, 77, 154, 118, 1 /*set*/, 0, 100, 0, 2 }, + /* 16*/ { BARCODE_EXCODE39, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 77, 194, 118, 0 /*set*/, 0, 100, 0, 20 }, /* 17*/ { BARCODE_EAN13, -1, -1, -1, -1, "023456789012", "", 0, 50, 1, 95, 226, 116, 0 /*set*/, 0, 110, 212, 14 }, /* EAN-13 */ /* 18*/ { BARCODE_EANX, -1, -1, -1, -1, "023456789012", "", 0, 50, 1, 95, 226, 116, 0 /*set*/, 0, 110, 212, 14 }, /* EAN-13 */ /* 19*/ { BARCODE_EAN13, BARCODE_QUIET_ZONES, -1, -1, -1, "023456789012", "", 0, 50, 1, 95, 226, 116, 0 /*set*/, 0, 110, 212, 14 }, @@ -1696,38 +1696,38 @@ static void test_quiet_zones(const testCtx *const p_ctx) { /* 59*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, -1, -1, "02", "", 0, 50, 1, 20, 50, 116, 0 /*set*/, 0, 116, 40, 10 }, /* EAN-2 */ /* 60*/ { BARCODE_EAN_2ADDON, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "02", "", 0, 50, 1, 20, 40, 116, 1 /*set*/, 16, 116, 36, 4 }, /* EAN-2 */ /* 61*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "02", "", 0, 50, 1, 20, 40, 116, 1 /*set*/, 16, 116, 36, 4 }, /* EAN-2 */ - /* 62*/ { BARCODE_GS1_128, -1, -1, -1, -1, "[20]02", "", 0, 50, 1, 68, 136, 116, 1 /*set*/, 0, 100, 0, 4 }, - /* 63*/ { BARCODE_GS1_128, BARCODE_QUIET_ZONES, -1, -1, -1, "[20]02", "", 0, 50, 1, 68, 176, 116, 0 /*set*/, 0, 100, 0, 20 }, - /* 64*/ { BARCODE_CODABAR, -1, -1, -1, -1, "A0B", "", 0, 50, 1, 32, 64, 116, 1 /*set*/, 0, 100, 0, 2 }, - /* 65*/ { BARCODE_CODABAR, BARCODE_QUIET_ZONES, -1, -1, -1, "A0B", "", 0, 50, 1, 32, 104, 116, 0 /*set*/, 0, 100, 0, 20 }, - /* 66*/ { BARCODE_CODE128, -1, -1, -1, -1, "1234", "", 0, 50, 1, 57, 114, 116, 1 /*set*/, 0, 100, 0, 4 }, - /* 67*/ { BARCODE_CODE128, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 57, 154, 116, 0 /*set*/, 0, 100, 0, 20 }, - /* 68*/ { BARCODE_DPLEIT, -1, -1, -1, -1, "1234", "", 0, 72, 1, 135, 270, 160, 1 /*set*/, 0, 100, 0, 2 }, - /* 69*/ { BARCODE_DPLEIT, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 72, 1, 135, 310, 160, 0 /*set*/, 0, 100, 0, 20 }, - /* 70*/ { BARCODE_DPIDENT, -1, -1, -1, -1, "1234", "", 0, 72, 1, 117, 234, 160, 1 /*set*/, 0, 100, 0, 2 }, - /* 71*/ { BARCODE_DPIDENT, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 72, 1, 117, 274, 160, 0 /*set*/, 0, 100, 0, 20 }, + /* 62*/ { BARCODE_GS1_128, -1, -1, -1, -1, "[20]02", "", 0, 50, 1, 68, 136, 118, 1 /*set*/, 0, 100, 0, 4 }, + /* 63*/ { BARCODE_GS1_128, BARCODE_QUIET_ZONES, -1, -1, -1, "[20]02", "", 0, 50, 1, 68, 176, 118, 0 /*set*/, 0, 100, 0, 20 }, + /* 64*/ { BARCODE_CODABAR, -1, -1, -1, -1, "A0B", "", 0, 50, 1, 32, 64, 118, 1 /*set*/, 0, 100, 0, 2 }, + /* 65*/ { BARCODE_CODABAR, BARCODE_QUIET_ZONES, -1, -1, -1, "A0B", "", 0, 50, 1, 32, 104, 118, 0 /*set*/, 0, 100, 0, 20 }, + /* 66*/ { BARCODE_CODE128, -1, -1, -1, -1, "1234", "", 0, 50, 1, 57, 114, 118, 1 /*set*/, 0, 100, 0, 4 }, + /* 67*/ { BARCODE_CODE128, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 57, 154, 118, 0 /*set*/, 0, 100, 0, 20 }, + /* 68*/ { BARCODE_DPLEIT, -1, -1, -1, -1, "1234", "", 0, 72, 1, 135, 270, 162, 1 /*set*/, 0, 100, 0, 2 }, + /* 69*/ { BARCODE_DPLEIT, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 72, 1, 135, 310, 162, 0 /*set*/, 0, 100, 0, 20 }, + /* 70*/ { BARCODE_DPIDENT, -1, -1, -1, -1, "1234", "", 0, 72, 1, 117, 234, 162, 1 /*set*/, 0, 100, 0, 2 }, + /* 71*/ { BARCODE_DPIDENT, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 72, 1, 117, 274, 162, 0 /*set*/, 0, 100, 0, 20 }, /* 72*/ { BARCODE_CODE16K, -1, -1, -1, -1, "1234", "", 0, 20, 2, 70, 162, 44, 0 /*set*/, 2, 20, 0, 20 }, /* 73*/ { BARCODE_CODE16K, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 20, 2, 70, 162, 44, 0 /*set*/, 2, 20, 0, 20 }, /* 74*/ { BARCODE_CODE16K, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 20, 2, 70, 140, 44, 1 /*set*/, 2, 20, 0, 6 }, /* 75*/ { BARCODE_CODE49, -1, -1, -1, -1, "1234", "", 0, 20, 2, 70, 162, 44, 0 /*set*/, 2, 20, 0, 20 }, /* 76*/ { BARCODE_CODE49, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 20, 2, 70, 162, 44, 0 /*set*/, 2, 20, 0, 20 }, /* 77*/ { BARCODE_CODE49, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 20, 2, 70, 140, 44, 1 /*set*/, 2, 20, 0, 2 }, - /* 78*/ { BARCODE_CODE93, -1, -1, -1, -1, "1234", "", 0, 50, 1, 73, 146, 116, 1 /*set*/, 0, 100, 0, 2 }, - /* 79*/ { BARCODE_CODE93, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 73, 186, 116, 0 /*set*/, 0, 100, 0, 20 }, + /* 78*/ { BARCODE_CODE93, -1, -1, -1, -1, "1234", "", 0, 50, 1, 73, 146, 118, 1 /*set*/, 0, 100, 0, 2 }, + /* 79*/ { BARCODE_CODE93, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 73, 186, 118, 0 /*set*/, 0, 100, 0, 20 }, /* 80*/ { BARCODE_FLAT, -1, -1, -1, -1, "1234", "", 0, 50, 1, 36, 72, 100, 1 /*set*/, 0, 100, 0, 2 }, /* 81*/ { BARCODE_FLAT, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 36, 72, 100, 1 /*set*/, 0, 100, 0, 2 }, /* 82*/ { BARCODE_FLAT, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 36, 72, 100, 1 /*set*/, 0, 100, 0, 2 }, - /* 83*/ { BARCODE_DBAR_OMN, -1, -1, -1, -1, "1234", "", 0, 50, 1, 96, 192, 116, 0 /*set*/, 0, 100, 0, 2 }, - /* 84*/ { BARCODE_DBAR_OMN, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 96, 192, 116, 0 /*set*/, 0, 100, 0, 2 }, - /* 85*/ { BARCODE_DBAR_OMN, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 96, 192, 116, 0 /*set*/, 0, 100, 0, 2 }, - /* 86*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, "1234", "", 0, 50, 1, 79, 158, 116, 0 /*set*/, 0, 100, 0, 2 }, - /* 87*/ { BARCODE_DBAR_LTD, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 79, 158, 116, 0 /*set*/, 0, 100, 0, 2 }, - /* 88*/ { BARCODE_DBAR_LTD, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 79, 158, 116, 0 /*set*/, 0, 100, 0, 2 }, - /* 89*/ { BARCODE_DBAR_EXP, -1, -1, -1, -1, "[20]02", "", 0, 34, 1, 102, 204, 84, 0 /*set*/, 0, 84, 0, 2 }, - /* 90*/ { BARCODE_DBAR_EXP, BARCODE_QUIET_ZONES, -1, -1, -1, "[20]02", "", 0, 34, 1, 102, 204, 84, 0 /*set*/, 0, 84, 0, 2 }, - /* 91*/ { BARCODE_DBAR_EXP, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "[20]02", "", 0, 34, 1, 102, 204, 84, 0 /*set*/, 0, 84, 0, 2 }, - /* 92*/ { BARCODE_TELEPEN, -1, -1, -1, -1, "1234", "", 0, 50, 1, 112, 224, 116, 1 /*set*/, 0, 100, 0, 2 }, - /* 93*/ { BARCODE_TELEPEN, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 112, 264, 116, 0 /*set*/, 0, 100, 0, 20 }, + /* 83*/ { BARCODE_DBAR_OMN, -1, -1, -1, -1, "1234", "", 0, 50, 1, 96, 192, 118, 0 /*set*/, 0, 100, 0, 2 }, + /* 84*/ { BARCODE_DBAR_OMN, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 96, 192, 118, 0 /*set*/, 0, 100, 0, 2 }, + /* 85*/ { BARCODE_DBAR_OMN, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 96, 192, 118, 0 /*set*/, 0, 100, 0, 2 }, + /* 86*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, "1234", "", 0, 50, 1, 79, 158, 118, 0 /*set*/, 0, 100, 0, 2 }, + /* 87*/ { BARCODE_DBAR_LTD, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 79, 158, 118, 0 /*set*/, 0, 100, 0, 2 }, + /* 88*/ { BARCODE_DBAR_LTD, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 79, 158, 118, 0 /*set*/, 0, 100, 0, 2 }, + /* 89*/ { BARCODE_DBAR_EXP, -1, -1, -1, -1, "[20]02", "", 0, 34, 1, 102, 204, 86, 0 /*set*/, 0, 86, 0, 2 }, + /* 90*/ { BARCODE_DBAR_EXP, BARCODE_QUIET_ZONES, -1, -1, -1, "[20]02", "", 0, 34, 1, 102, 204, 86, 0 /*set*/, 0, 86, 0, 2 }, + /* 91*/ { BARCODE_DBAR_EXP, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "[20]02", "", 0, 34, 1, 102, 204, 86, 0 /*set*/, 0, 86, 0, 2 }, + /* 92*/ { BARCODE_TELEPEN, -1, -1, -1, -1, "1234", "", 0, 50, 1, 112, 224, 118, 1 /*set*/, 0, 100, 0, 2 }, + /* 93*/ { BARCODE_TELEPEN, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 112, 264, 118, 0 /*set*/, 0, 100, 0, 20 }, /* 94*/ { BARCODE_UPCA, -1, -1, -1, -1, "01457137763", "", 0, 50, 1, 95, 226, 116, 0 /*set*/, 0, 100, 0, 18 }, /* 95*/ { BARCODE_UPCA, BARCODE_QUIET_ZONES, -1, -1, -1, "01457137763", "", 0, 50, 1, 95, 226, 116, 0 /*set*/, 0, 100, 0, 18 }, /* 96*/ { BARCODE_UPCA, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "01457137763", "", 0, 50, 1, 95, 226, 116, 0 /*set*/, 0, 100, 0, 18 }, @@ -1766,16 +1766,16 @@ static void test_quiet_zones(const testCtx *const p_ctx) { /*129*/ { BARCODE_UPCE, BARCODE_NO_QUIET_ZONES, -1, -1, 0, "145713+12345", "", 0, 50, 1, 105, 210, 110, 1 /*set*/, 16, 100, 208, 2 }, /* Hide text */ /*130*/ { BARCODE_POSTNET, -1, -1, -1, -1, "12345", "", 0, 12, 2, 63, 126, 24, 1 /*set*/, 0, 24, 0, 2 }, /*131*/ { BARCODE_POSTNET, BARCODE_QUIET_ZONES, -1, -1, -1, "12345", "", 0, 12, 2, 63, 146, 30, 0 /*set*/, 0, 30, 0, 10 }, - /*132*/ { BARCODE_MSI_PLESSEY, -1, -1, -1, -1, "1234", "", 0, 50, 1, 55, 110, 116, 1 /*set*/, 0, 100, 0, 4 }, - /*133*/ { BARCODE_MSI_PLESSEY, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 55, 158, 116, 0 /*set*/, 0, 100, 0, 24 }, + /*132*/ { BARCODE_MSI_PLESSEY, -1, -1, -1, -1, "1234", "", 0, 50, 1, 55, 110, 118, 1 /*set*/, 0, 100, 0, 4 }, + /*133*/ { BARCODE_MSI_PLESSEY, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 55, 158, 118, 0 /*set*/, 0, 100, 0, 24 }, /*134*/ { BARCODE_FIM, -1, -1, -1, -1, "A", "", 0, 50, 1, 17, 34, 100, 1 /*set*/, 0, 100, 0, 2 }, /*135*/ { BARCODE_FIM, BARCODE_QUIET_ZONES, -1, -1, -1, "A", "", 0, 50, 1, 17, 50, 100, 0 /*set*/, 0, 100, 0, 10 }, - /*136*/ { BARCODE_LOGMARS, -1, -1, -1, -1, "1234", "", 0, 50, 1, 95, 190, 116, 1 /*set*/, 0, 100, 0, 2 }, - /*137*/ { BARCODE_LOGMARS, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 95, 230, 116, 0 /*set*/, 0, 100, 0, 20 }, + /*136*/ { BARCODE_LOGMARS, -1, -1, -1, -1, "1234", "", 0, 50, 1, 95, 190, 118, 1 /*set*/, 0, 100, 0, 2 }, + /*137*/ { BARCODE_LOGMARS, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 95, 230, 118, 0 /*set*/, 0, 100, 0, 20 }, /*138*/ { BARCODE_PHARMA, -1, -1, -1, -1, "1234", "", 0, 50, 1, 38, 76, 100, 1 /*set*/, 0, 100, 0, 2 }, /*139*/ { BARCODE_PHARMA, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 38, 100, 100, 0 /*set*/, 0, 100, 0, 12 }, - /*140*/ { BARCODE_PZN, -1, -1, -1, -1, "1234", "", 0, 50, 1, 142, 284, 116, 1 /*set*/, 0, 100, 0, 2 }, - /*141*/ { BARCODE_PZN, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 142, 324, 116, 0 /*set*/, 0, 100, 0, 20 }, + /*140*/ { BARCODE_PZN, -1, -1, -1, -1, "1234", "", 0, 50, 1, 142, 284, 118, 1 /*set*/, 0, 100, 0, 2 }, + /*141*/ { BARCODE_PZN, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 142, 324, 118, 0 /*set*/, 0, 100, 0, 20 }, /*142*/ { BARCODE_PHARMA_TWO, -1, -1, -1, -1, "1234", "", 0, 10, 2, 13, 26, 20, 1 /*set*/, 10, 20, 0, 2 }, /*143*/ { BARCODE_PHARMA_TWO, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 10, 2, 13, 50, 20, 0 /*set*/, 10, 20, 0, 12 }, /*144*/ { BARCODE_CEPNET, -1, -1, -1, -1, "12345678", "", 0, 5, 2, 93, 186, 10, 1 /*set*/, 0, 10, 0, 2 }, @@ -1789,8 +1789,8 @@ static void test_quiet_zones(const testCtx *const p_ctx) { /*152*/ { BARCODE_MAXICODE, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 165, 33, 30, 319, 318, 0 /*set*/, 0, 9, 0, 319 }, /*153*/ { BARCODE_QRCODE, -1, -1, -1, -1, "1234", "", 0, 21, 21, 21, 42, 42, 1 /*set*/, 0, 2, 0, 14 }, /*154*/ { BARCODE_QRCODE, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 21, 21, 21, 58, 58, 0 /*set*/, 0, 8, 0, 58 }, - /*155*/ { BARCODE_CODE128AB, -1, -1, -1, -1, "1234", "", 0, 50, 1, 79, 158, 116, 1 /*set*/, 0, 100, 0, 4 }, - /*156*/ { BARCODE_CODE128AB, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 79, 198, 116, 0 /*set*/, 0, 100, 0, 20 }, + /*155*/ { BARCODE_CODE128AB, -1, -1, -1, -1, "1234", "", 0, 50, 1, 79, 158, 118, 1 /*set*/, 0, 100, 0, 4 }, + /*156*/ { BARCODE_CODE128AB, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 79, 198, 118, 0 /*set*/, 0, 100, 0, 20 }, /*157*/ { BARCODE_AUSPOST, -1, -1, -1, -1, "12345678", "", 0, 8, 3, 73, 146, 16, 1 /*set*/, 0, 10, 0, 2 }, /*158*/ { BARCODE_AUSPOST, BARCODE_QUIET_ZONES, -1, -1, -1, "12345678", "", 0, 8, 3, 73, 186, 28, 0 /*set*/, 0, 28, 0, 20 }, /*159*/ { BARCODE_AUSREPLY, -1, -1, -1, -1, "1234", "", 0, 8, 3, 73, 146, 16, 1 /*set*/, 0, 10, 0, 2 }, @@ -1806,19 +1806,19 @@ static void test_quiet_zones(const testCtx *const p_ctx) { /*169*/ { BARCODE_RM4SCC, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 8, 3, 43, 98, 28, 0 /*set*/, 0, 28, 0, 6 }, /*170*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, "1234", "", 0, 10, 10, 10, 20, 20, 1 /*set*/, 0, 20, 0, 2 }, /*171*/ { BARCODE_DATAMATRIX, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 10, 10, 10, 24, 24, 0 /*set*/, 0, 24, 0, 2 }, - /*172*/ { BARCODE_EAN14, -1, -1, -1, -1, "1234", "", 0, 50, 1, 134, 268, 116, 1 /*set*/, 0, 100, 0, 4 }, - /*173*/ { BARCODE_EAN14, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 134, 308, 116, 0 /*set*/, 0, 100, 0, 20 }, - /*174*/ { BARCODE_VIN, -1, -1, -1, -1, "12345678701234567", "", 0, 50, 1, 246, 492, 116, 1 /*set*/, 0, 100, 0, 2 }, - /*175*/ { BARCODE_VIN, BARCODE_QUIET_ZONES, -1, -1, -1, "12345678701234567", "", 0, 50, 1, 246, 532, 116, 0 /*set*/, 0, 100, 0, 20 }, + /*172*/ { BARCODE_EAN14, -1, -1, -1, -1, "1234", "", 0, 50, 1, 134, 268, 118, 1 /*set*/, 0, 100, 0, 4 }, + /*173*/ { BARCODE_EAN14, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 134, 308, 118, 0 /*set*/, 0, 100, 0, 20 }, + /*174*/ { BARCODE_VIN, -1, -1, -1, -1, "12345678701234567", "", 0, 50, 1, 246, 492, 118, 1 /*set*/, 0, 100, 0, 2 }, + /*175*/ { BARCODE_VIN, BARCODE_QUIET_ZONES, -1, -1, -1, "12345678701234567", "", 0, 50, 1, 246, 532, 118, 0 /*set*/, 0, 100, 0, 20 }, /*176*/ { BARCODE_CODABLOCKF, -1, -1, -1, -1, "1234", "", 0, 20, 2, 101, 242, 44, 0 /*set*/, 0, 44, 0, 20 }, /*177*/ { BARCODE_CODABLOCKF, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 20, 2, 101, 242, 44, 0 /*set*/, 0, 44, 0, 20 }, /*178*/ { BARCODE_CODABLOCKF, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 20, 2, 101, 202, 44, 1 /*set*/, 0, 44, 0, 4 }, - /*179*/ { BARCODE_NVE18, -1, -1, -1, -1, "1234", "", 0, 50, 1, 156, 312, 116, 1 /*set*/, 0, 100, 0, 4 }, - /*180*/ { BARCODE_NVE18, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 156, 352, 116, 0 /*set*/, 0, 100, 0, 20 }, + /*179*/ { BARCODE_NVE18, -1, -1, -1, -1, "1234", "", 0, 50, 1, 156, 312, 118, 1 /*set*/, 0, 100, 0, 4 }, + /*180*/ { BARCODE_NVE18, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 156, 352, 118, 0 /*set*/, 0, 100, 0, 20 }, /*181*/ { BARCODE_JAPANPOST, -1, -1, -1, -1, "1234", "", 0, 8, 3, 133, 266, 16, 1 /*set*/, 0, 16, 0, 2 }, /*182*/ { BARCODE_JAPANPOST, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 8, 3, 133, 278, 28, 0 /*set*/, 0, 28, 0, 6 }, - /*183*/ { BARCODE_KOREAPOST, -1, -1, -1, -1, "1234", "", 0, 50, 1, 167, 334, 116, 0 /*set*/, 0, 100, 0, 8 }, - /*184*/ { BARCODE_KOREAPOST, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 167, 374, 116, 0 /*set*/, 0, 100, 0, 28 }, + /*183*/ { BARCODE_KOREAPOST, -1, -1, -1, -1, "1234", "", 0, 50, 1, 167, 334, 118, 0 /*set*/, 0, 100, 0, 8 }, + /*184*/ { BARCODE_KOREAPOST, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 167, 374, 118, 0 /*set*/, 0, 100, 0, 28 }, /*185*/ { BARCODE_DBAR_STK, -1, -1, -1, -1, "1234", "", 0, 13, 3, 50, 100, 26, 1 /*set*/, 12, 26, 0, 2 }, /*186*/ { BARCODE_DBAR_STK, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 13, 3, 50, 100, 26, 1 /*set*/, 12, 26, 0, 2 }, /*187*/ { BARCODE_DBAR_STK, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 13, 3, 50, 100, 26, 1 /*set*/, 12, 26, 0, 2 }, @@ -1834,13 +1834,13 @@ static void test_quiet_zones(const testCtx *const p_ctx) { /*197*/ { BARCODE_MICROPDF417, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 22, 11, 38, 80, 48, 0 /*set*/, 0, 48, 0, 2 }, /*198*/ { BARCODE_USPS_IMAIL, -1, -1, -1, -1, "12345678901234567890", "", 0, 8, 3, 129, 258, 16, 1 /*set*/, 0, 10, 0, 2 }, /*199*/ { BARCODE_USPS_IMAIL, BARCODE_QUIET_ZONES, -1, -1, -1, "12345678901234567890", "", 0, 8, 3, 129, 276, 20, 0 /*set*/, 0, 20, 0, 9 }, - /*200*/ { BARCODE_PLESSEY, -1, -1, -1, -1, "1234", "", 0, 50, 1, 131, 262, 116, 1 /*set*/, 0, 100, 0, 6 }, - /*201*/ { BARCODE_PLESSEY, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 131, 310, 116, 0 /*set*/, 0, 100, 0, 24 }, - /*202*/ { BARCODE_TELEPEN_NUM, -1, -1, -1, -1, "1234", "", 0, 50, 1, 80, 160, 116, 1 /*set*/, 0, 100, 0, 2 }, - /*203*/ { BARCODE_TELEPEN_NUM, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 80, 200, 116, 0 /*set*/, 0, 100, 0, 20 }, - /*204*/ { BARCODE_ITF14, -1, -1, -1, -1, "1234", "", 0, 50, 1, 135, 330, 136, 0 /*set*/, 10, 110, 10, 20 }, - /*205*/ { BARCODE_ITF14, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 135, 330, 136, 0 /*set*/, 10, 110, 10, 20 }, - /*206*/ { BARCODE_ITF14, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 135, 290, 136, 1 /*set*/, 0, 120, 10, 2 }, + /*200*/ { BARCODE_PLESSEY, -1, -1, -1, -1, "1234", "", 0, 50, 1, 131, 262, 118, 1 /*set*/, 0, 100, 0, 6 }, + /*201*/ { BARCODE_PLESSEY, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 131, 310, 118, 0 /*set*/, 0, 100, 0, 24 }, + /*202*/ { BARCODE_TELEPEN_NUM, -1, -1, -1, -1, "1234", "", 0, 50, 1, 80, 160, 118, 1 /*set*/, 0, 100, 0, 2 }, + /*203*/ { BARCODE_TELEPEN_NUM, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 80, 200, 118, 0 /*set*/, 0, 100, 0, 20 }, + /*204*/ { BARCODE_ITF14, -1, -1, -1, -1, "1234", "", 0, 50, 1, 135, 330, 138, 0 /*set*/, 10, 110, 10, 20 }, + /*205*/ { BARCODE_ITF14, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 135, 330, 138, 0 /*set*/, 10, 110, 10, 20 }, + /*206*/ { BARCODE_ITF14, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 135, 290, 138, 1 /*set*/, 0, 120, 10, 2 }, /*207*/ { BARCODE_KIX, -1, -1, -1, -1, "1234", "", 0, 8, 3, 31, 62, 16, 1 /*set*/, 6, 10, 0, 2 }, /*208*/ { BARCODE_KIX, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 8, 3, 31, 74, 28, 0 /*set*/, 0, 28, 0, 6 }, /*209*/ { BARCODE_AZTEC, -1, -1, -1, -1, "1234", "", 0, 15, 15, 15, 30, 30, 1 /*set*/, 2, 6, 0, 4 }, @@ -1849,14 +1849,14 @@ static void test_quiet_zones(const testCtx *const p_ctx) { /*212*/ { BARCODE_DAFT, -1, -1, -1, -1, "FADT", "", 0, 8, 3, 7, 14, 16, 1 /*set*/, 0, 16, 0, 2 }, /*213*/ { BARCODE_DAFT, BARCODE_QUIET_ZONES, -1, -1, -1, "FADT", "", 0, 8, 3, 7, 14, 16, 1 /*set*/, 0, 16, 0, 2 }, /*214*/ { BARCODE_DAFT, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "FADT", "", 0, 8, 3, 7, 14, 16, 1 /*set*/, 0, 16, 0, 2 }, - /*215*/ { BARCODE_DPD, -1, -1, -1, -1, "1234567890123456789012345678", "", 0, 50, 1, 189, 378, 122, 1 /*set*/, 0, 100, 0, 4 }, - /*216*/ { BARCODE_DPD, BARCODE_QUIET_ZONES, -1, -1, -1, "1234567890123456789012345678", "", 0, 50, 1, 189, 428, 122, 0 /*set*/, 0, 100, 0, 24 }, + /*215*/ { BARCODE_DPD, -1, -1, -1, -1, "1234567890123456789012345678", "", 0, 50, 1, 189, 378, 124, 1 /*set*/, 0, 100, 0, 4 }, + /*216*/ { BARCODE_DPD, BARCODE_QUIET_ZONES, -1, -1, -1, "1234567890123456789012345678", "", 0, 50, 1, 189, 428, 124, 0 /*set*/, 0, 100, 0, 24 }, /*217*/ { BARCODE_MICROQR, -1, -1, -1, -1, "1234", "", 0, 11, 11, 11, 22, 22, 1 /*set*/, 0, 14, 0, 2 }, /*218*/ { BARCODE_MICROQR, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 11, 11, 11, 30, 30, 0 /*set*/, 0, 30, 0, 4 }, - /*219*/ { BARCODE_HIBC_128, -1, -1, -1, -1, "1234", "", 0, 50, 1, 90, 180, 116, 1 /*set*/, 0, 100, 0, 4 }, - /*220*/ { BARCODE_HIBC_128, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 90, 220, 116, 0 /*set*/, 0, 100, 0, 20 }, - /*221*/ { BARCODE_HIBC_39, -1, -1, -1, -1, "1234", "", 0, 50, 1, 127, 254, 116, 1 /*set*/, 0, 100, 0, 2 }, - /*222*/ { BARCODE_HIBC_39, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 127, 294, 116, 0 /*set*/, 0, 100, 0, 20 }, + /*219*/ { BARCODE_HIBC_128, -1, -1, -1, -1, "1234", "", 0, 50, 1, 90, 180, 118, 1 /*set*/, 0, 100, 0, 4 }, + /*220*/ { BARCODE_HIBC_128, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 90, 220, 118, 0 /*set*/, 0, 100, 0, 20 }, + /*221*/ { BARCODE_HIBC_39, -1, -1, -1, -1, "1234", "", 0, 50, 1, 127, 254, 118, 1 /*set*/, 0, 100, 0, 2 }, + /*222*/ { BARCODE_HIBC_39, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 127, 294, 118, 0 /*set*/, 0, 100, 0, 20 }, /*223*/ { BARCODE_HIBC_DM, -1, -1, -1, -1, "1234", "", 0, 12, 12, 12, 24, 24, 1 /*set*/, 0, 24, 0, 2 }, /*224*/ { BARCODE_HIBC_DM, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 12, 12, 12, 28, 28, 0 /*set*/, 0, 28, 0, 2 }, /*225*/ { BARCODE_HIBC_QR, -1, -1, -1, -1, "1234", "", 0, 21, 21, 21, 42, 42, 1 /*set*/, 0, 2, 0, 14 }, @@ -1877,15 +1877,15 @@ static void test_quiet_zones(const testCtx *const p_ctx) { /*240*/ { BARCODE_HANXIN, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 23, 23, 23, 58, 58, 0 /*set*/, 0, 58, 0, 6 }, /*241*/ { BARCODE_MAILMARK_2D, -1, -1, -1, -1, "012100123412345678AB19XY1A 0", "", 0, 24, 24, 24, 48, 48, 1 /*set*/, 0, 48, 0, 2 }, /*242*/ { BARCODE_MAILMARK_2D, BARCODE_QUIET_ZONES, -1, -1, -1, "012100123412345678AB19XY1A 0", "", 0, 24, 24, 24, 64, 64, 0 /*set*/, 0, 64, 0, 8 }, - /*243*/ { BARCODE_UPU_S10, -1, -1, -1, -1, "EE876543216CA", "", 0, 50, 1, 156, 312, 116, 1 /*set*/, 0, 100, 0, 4 }, - /*244*/ { BARCODE_UPU_S10, BARCODE_QUIET_ZONES, -1, -1, -1, "EE876543216CA", "", 0, 50, 1, 156, 352, 116, 0 /*set*/, 0, 100, 0, 20 }, + /*243*/ { BARCODE_UPU_S10, -1, -1, -1, -1, "EE876543216CA", "", 0, 50, 1, 156, 312, 118, 1 /*set*/, 0, 100, 0, 4 }, + /*244*/ { BARCODE_UPU_S10, BARCODE_QUIET_ZONES, -1, -1, -1, "EE876543216CA", "", 0, 50, 1, 156, 352, 118, 0 /*set*/, 0, 100, 0, 20 }, /*245*/ { BARCODE_MAILMARK_4S, -1, -1, -1, -1, "01000000000000000AA00AA0A", "", 0, 10, 3, 155, 310, 20, 1 /*set*/, 0, 20, 0, 2 }, /*246*/ { BARCODE_MAILMARK_4S, BARCODE_QUIET_ZONES, -1, -1, -1, "01000000000000000AA00AA0A", "", 0, 10, 3, 155, 322, 32, 0 /*set*/, 0, 32, 0, 6 }, /*247*/ { BARCODE_AZRUNE, -1, -1, -1, -1, "123", "", 0, 11, 11, 11, 22, 22, 1 /*set*/, 0, 6, 0, 4 }, /*248*/ { BARCODE_AZRUNE, BARCODE_QUIET_ZONES, -1, -1, -1, "123", "", 0, 11, 11, 11, 22, 22, 1 /*set*/, 0, 6, 0, 4 }, /*249*/ { BARCODE_AZRUNE, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "123", "", 0, 11, 11, 11, 22, 22, 1 /*set*/, 0, 6, 0, 4 }, - /*250*/ { BARCODE_CODE32, -1, -1, -1, -1, "1234", "", 0, 50, 1, 103, 206, 116, 1 /*set*/, 0, 100, 0, 2 }, - /*251*/ { BARCODE_CODE32, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 103, 246, 116, 0 /*set*/, 0, 100, 0, 20 }, + /*250*/ { BARCODE_CODE32, -1, -1, -1, -1, "1234", "", 0, 50, 1, 103, 206, 118, 1 /*set*/, 0, 100, 0, 2 }, + /*251*/ { BARCODE_CODE32, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 103, 246, 118, 0 /*set*/, 0, 100, 0, 20 }, /*252*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, "023456789012", "", 0, 50, 7, 99, 226, 116, 0 /*set*/, 24, 110, 212, 14 }, /*253*/ { BARCODE_EANX_CC, -1, -1, -1, -1, "023456789012", "", 0, 50, 7, 99, 226, 116, 0 /*set*/, 24, 110, 212, 14 }, /*254*/ { BARCODE_EAN13_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "023456789012", "", 0, 50, 7, 99, 226, 116, 0 /*set*/, 24, 110, 212, 14 }, @@ -1898,33 +1898,33 @@ static void test_quiet_zones(const testCtx *const p_ctx) { /*261*/ { BARCODE_EANX_CC, BARCODE_QUIET_ZONES, -1, -1, 0, "023456789012", "", 0, 50, 7, 99, 226, 110, 0 /*set*/, 24, 110, 0, 22 }, /* Hide text */ /*262*/ { BARCODE_EAN13_CC, BARCODE_NO_QUIET_ZONES, -1, -1, 0, "023456789012", "", 0, 50, 7, 99, 198, 110, 1 /*set*/, 24, 110, 6, 2 }, /* Hide text */ /*263*/ { BARCODE_EANX_CC, BARCODE_NO_QUIET_ZONES, -1, -1, 0, "023456789012", "", 0, 50, 7, 99, 198, 110, 1 /*set*/, 24, 110, 6, 2 }, /* Hide text */ - /*264*/ { BARCODE_GS1_128_CC, -1, -1, -1, -1, "[20]02", "", 0, 50, 5, 99, 198, 116, 1 /*set*/, 14, 100, 24, 4 }, /* CC-A */ - /*265*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "[20]02", "", 0, 50, 5, 99, 204, 116, 0 /*set*/, 14, 100, 24, 2 }, - /*266*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "[20]02", "", 0, 50, 5, 99, 204, 116, 1 /*set*/, 14, 100, 26, 4 }, - /*267*/ { BARCODE_GS1_128_CC, -1, -1, -1, -1, "[91]1", "", 0, 50, 5, 100, 200, 116, 1 /*set*/, 14, 100, 20, 4 }, /* CC-A */ - /*268*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "[91]1", "", 0, 50, 5, 100, 222, 116, 0 /*set*/, 14, 100, 20, 2 }, - /*269*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "[91]1", "", 0, 50, 5, 100, 222, 116, 1 /*set*/, 14, 100, 22, 4 }, - /*270*/ { BARCODE_GS1_128_CC, -1, 2, -1, -1, "[91]1", "", 0, 50, 6, 100, 200, 116, 1 /*set*/, 18, 100, 20, 4 }, /* CC-B */ - /*271*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, 2, -1, -1, "[91]1", "", 0, 50, 6, 100, 222, 116, 0 /*set*/, 18, 100, 20, 2 }, - /*272*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, 2, -1, -1, "[91]1", "", 0, 50, 6, 100, 222, 116, 1 /*set*/, 18, 100, 22, 4 }, - /*273*/ { BARCODE_GS1_128_CC, -1, 3, -1, -1, "[20]02", "", 0, 50, 15, 86, 172, 116, 1 /*set*/, 80, 100, 14, 4 }, /* CC-C */ - /*274*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, 3, -1, -1, "[20]02", "", 0, 50, 15, 86, 198, 116, 0 /*set*/, 80, 100, 14, 4 }, - /*275*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, 3, -1, -1, "[20]02", "", 0, 50, 15, 86, 198, 116, 1 /*set*/, 80, 100, 20, 4 }, - /*276*/ { BARCODE_DBAR_OMN_CC, -1, -1, -1, -1, "1234", "", 0, 21, 5, 100, 200, 58, 1 /*set*/, 14, 42, 10, 2 }, /* CC-A */ - /*277*/ { BARCODE_DBAR_OMN_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 21, 5, 100, 202, 58, 0 /*set*/, 14, 42, 10, 2 }, - /*278*/ { BARCODE_DBAR_OMN_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 21, 5, 100, 202, 58, 1 /*set*/, 14, 42, 12, 2 }, - /*279*/ { BARCODE_DBAR_OMN_CC, -1, 2, -1, -1, "1234", "", 0, 23, 6, 100, 200, 62, 1 /*set*/, 18, 46, 10, 2 }, /* CC-B */ - /*280*/ { BARCODE_DBAR_OMN_CC, BARCODE_QUIET_ZONES, 2, -1, -1, "1234", "", 0, 23, 6, 100, 202, 62, 0 /*set*/, 18, 46, 10, 2 }, - /*281*/ { BARCODE_DBAR_OMN_CC, BARCODE_QUIET_ZONES, 2, -1, -1, "1234", "", 0, 23, 6, 100, 202, 62, 1 /*set*/, 18, 46, 12, 2 }, - /*282*/ { BARCODE_DBAR_LTD_CC, -1, -1, -1, -1, "1234", "", 0, 19, 6, 79, 158, 54, 1 /*set*/, 18, 38, 2, 2 }, /* CC-A */ - /*283*/ { BARCODE_DBAR_LTD_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 19, 6, 79, 158, 54, 1 /*set*/, 18, 38, 2, 2 }, /* Same */ - /*284*/ { BARCODE_DBAR_LTD_CC, -1, 2, -1, -1, "1234", "", 0, 23, 8, 88, 176, 62, 1 /*set*/, 26, 46, 20, 2 }, /* CC-B */ - /*285*/ { BARCODE_DBAR_LTD_CC, BARCODE_QUIET_ZONES, 2, -1, -1, "1234", "", 0, 23, 8, 88, 178, 62, 0 /*set*/, 26, 46, 20, 2 }, - /*286*/ { BARCODE_DBAR_LTD_CC, BARCODE_QUIET_ZONES, 2, -1, -1, "1234", "", 0, 23, 8, 88, 178, 62, 1 /*set*/, 26, 46, 22, 2 }, - /*287*/ { BARCODE_DBAR_EXP_CC, -1, -1, -1, -1, "[20]12", "", 0, 41, 5, 102, 204, 98, 1 /*set*/, 14, 82, 2, 2 }, /* CC-A */ - /*288*/ { BARCODE_DBAR_EXP_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "[20]12", "", 0, 41, 5, 102, 204, 98, 1 /*set*/, 14, 82, 2, 2 }, /* Same */ - /*289*/ { BARCODE_DBAR_EXP_CC, -1, 2, -1, -1, "[20]12", "", 0, 43, 6, 102, 204, 102, 1 /*set*/, 18, 86, 2, 2 }, /* CC-B */ - /*290*/ { BARCODE_DBAR_EXP_CC, BARCODE_QUIET_ZONES, 2, -1, -1, "[20]12", "", 0, 43, 6, 102, 204, 102, 1 /*set*/, 18, 86, 2, 2 }, /* Same */ + /*264*/ { BARCODE_GS1_128_CC, -1, -1, -1, -1, "[20]02", "", 0, 50, 5, 99, 198, 118, 1 /*set*/, 14, 100, 24, 4 }, /* CC-A */ + /*265*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "[20]02", "", 0, 50, 5, 99, 204, 118, 0 /*set*/, 14, 100, 24, 2 }, + /*266*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "[20]02", "", 0, 50, 5, 99, 204, 118, 1 /*set*/, 14, 100, 26, 4 }, + /*267*/ { BARCODE_GS1_128_CC, -1, -1, -1, -1, "[91]1", "", 0, 50, 5, 100, 200, 118, 1 /*set*/, 14, 100, 20, 4 }, /* CC-A */ + /*268*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "[91]1", "", 0, 50, 5, 100, 222, 118, 0 /*set*/, 14, 100, 20, 2 }, + /*269*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "[91]1", "", 0, 50, 5, 100, 222, 118, 1 /*set*/, 14, 100, 22, 4 }, + /*270*/ { BARCODE_GS1_128_CC, -1, 2, -1, -1, "[91]1", "", 0, 50, 6, 100, 200, 118, 1 /*set*/, 18, 100, 20, 4 }, /* CC-B */ + /*271*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, 2, -1, -1, "[91]1", "", 0, 50, 6, 100, 222, 118, 0 /*set*/, 18, 100, 20, 2 }, + /*272*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, 2, -1, -1, "[91]1", "", 0, 50, 6, 100, 222, 118, 1 /*set*/, 18, 100, 22, 4 }, + /*273*/ { BARCODE_GS1_128_CC, -1, 3, -1, -1, "[20]02", "", 0, 50, 15, 86, 172, 118, 1 /*set*/, 80, 100, 14, 4 }, /* CC-C */ + /*274*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, 3, -1, -1, "[20]02", "", 0, 50, 15, 86, 198, 118, 0 /*set*/, 80, 100, 14, 4 }, + /*275*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, 3, -1, -1, "[20]02", "", 0, 50, 15, 86, 198, 118, 1 /*set*/, 80, 100, 20, 4 }, + /*276*/ { BARCODE_DBAR_OMN_CC, -1, -1, -1, -1, "1234", "", 0, 21, 5, 100, 200, 60, 1 /*set*/, 14, 42, 10, 2 }, /* CC-A */ + /*277*/ { BARCODE_DBAR_OMN_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 21, 5, 100, 202, 60, 0 /*set*/, 14, 42, 10, 2 }, + /*278*/ { BARCODE_DBAR_OMN_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 21, 5, 100, 202, 60, 1 /*set*/, 14, 42, 12, 2 }, + /*279*/ { BARCODE_DBAR_OMN_CC, -1, 2, -1, -1, "1234", "", 0, 23, 6, 100, 200, 64, 1 /*set*/, 18, 46, 10, 2 }, /* CC-B */ + /*280*/ { BARCODE_DBAR_OMN_CC, BARCODE_QUIET_ZONES, 2, -1, -1, "1234", "", 0, 23, 6, 100, 202, 64, 0 /*set*/, 18, 46, 10, 2 }, + /*281*/ { BARCODE_DBAR_OMN_CC, BARCODE_QUIET_ZONES, 2, -1, -1, "1234", "", 0, 23, 6, 100, 202, 64, 1 /*set*/, 18, 46, 12, 2 }, + /*282*/ { BARCODE_DBAR_LTD_CC, -1, -1, -1, -1, "1234", "", 0, 19, 6, 79, 158, 56, 1 /*set*/, 18, 38, 2, 2 }, /* CC-A */ + /*283*/ { BARCODE_DBAR_LTD_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 19, 6, 79, 158, 56, 1 /*set*/, 18, 38, 2, 2 }, /* Same */ + /*284*/ { BARCODE_DBAR_LTD_CC, -1, 2, -1, -1, "1234", "", 0, 23, 8, 88, 176, 64, 1 /*set*/, 26, 46, 20, 2 }, /* CC-B */ + /*285*/ { BARCODE_DBAR_LTD_CC, BARCODE_QUIET_ZONES, 2, -1, -1, "1234", "", 0, 23, 8, 88, 178, 64, 0 /*set*/, 26, 46, 20, 2 }, + /*286*/ { BARCODE_DBAR_LTD_CC, BARCODE_QUIET_ZONES, 2, -1, -1, "1234", "", 0, 23, 8, 88, 178, 64, 1 /*set*/, 26, 46, 22, 2 }, + /*287*/ { BARCODE_DBAR_EXP_CC, -1, -1, -1, -1, "[20]12", "", 0, 41, 5, 102, 204, 100, 1 /*set*/, 14, 82, 2, 2 }, /* CC-A */ + /*288*/ { BARCODE_DBAR_EXP_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "[20]12", "", 0, 41, 5, 102, 204, 100, 1 /*set*/, 14, 82, 2, 2 }, /* Same */ + /*289*/ { BARCODE_DBAR_EXP_CC, -1, 2, -1, -1, "[20]12", "", 0, 43, 6, 102, 204, 104, 1 /*set*/, 18, 86, 2, 2 }, /* CC-B */ + /*290*/ { BARCODE_DBAR_EXP_CC, BARCODE_QUIET_ZONES, 2, -1, -1, "[20]12", "", 0, 43, 6, 102, 204, 104, 1 /*set*/, 18, 86, 2, 2 }, /* Same */ /*291*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, "01457137763", "", 0, 50, 7, 99, 226, 116, 1 /*set*/, 24, 100, 206, 2 }, /*292*/ { BARCODE_UPCA_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "01457137763", "", 0, 50, 7, 99, 226, 116, 1 /*set*/, 24, 100, 206, 2 }, /*293*/ { BARCODE_UPCA_CC, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "01457137763", "", 0, 50, 7, 99, 226, 116, 1 /*set*/, 24, 100, 206, 2 }, @@ -1949,8 +1949,8 @@ static void test_quiet_zones(const testCtx *const p_ctx) { /*312*/ { BARCODE_DBAR_EXPSTK_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "[20]12", "", 0, 41, 5, 102, 204, 82, 1 /*set*/, 14, 82, 2, 2 }, /* Same */ /*313*/ { BARCODE_DBAR_EXPSTK_CC, -1, 2, -1, -1, "[20]12", "", 0, 43, 6, 102, 204, 86, 1 /*set*/, 18, 86, 202, 2 }, /* CC-B */ /*314*/ { BARCODE_DBAR_EXPSTK_CC, BARCODE_QUIET_ZONES, 2, -1, -1, "[20]12", "", 0, 43, 6, 102, 204, 86, 1 /*set*/, 18, 86, 202, 2 }, /* Same */ - /*315*/ { BARCODE_CHANNEL, -1, -1, -1, -1, "1234", "", 0, 50, 1, 27, 54, 116, 1 /*set*/, 0, 100, 0, 2 }, - /*316*/ { BARCODE_CHANNEL, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 27, 60, 116, 0 /*set*/, 0, 100, 0, 2 }, + /*315*/ { BARCODE_CHANNEL, -1, -1, -1, -1, "1234", "", 0, 50, 1, 27, 54, 118, 1 /*set*/, 0, 100, 0, 2 }, + /*316*/ { BARCODE_CHANNEL, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 27, 60, 118, 0 /*set*/, 0, 100, 0, 2 }, /*317*/ { BARCODE_CODEONE, -1, -1, -1, -1, "1234", "", 0, 16, 16, 18, 36, 32, 1 /*set*/, 0, 6, 0, 2 }, /* Versions A to H - no quiet zone */ /*318*/ { BARCODE_CODEONE, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 16, 16, 18, 36, 32, 1 /*set*/, 0, 6, 0, 2 }, /*319*/ { BARCODE_CODEONE, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 16, 16, 18, 36, 32, 1 /*set*/, 0, 6, 0, 2 }, @@ -1965,8 +1965,8 @@ static void test_quiet_zones(const testCtx *const p_ctx) { /*328*/ { BARCODE_ULTRA, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 13, 13, 15, 34, 30, 0 /*set*/, 0, 2, 0, 34 }, /*329*/ { BARCODE_RMQR, -1, -1, -1, -1, "1234", "", 0, 11, 11, 27, 54, 22, 1 /*set*/, 0, 14, 0, 2 }, /*330*/ { BARCODE_RMQR, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 11, 11, 27, 62, 30, 0 /*set*/, 0, 30, 0, 4 }, - /*331*/ { BARCODE_BC412, -1, -1, -1, -1, "1234567", "", 0, 16.5, 1, 102, 204, 49, 1 /*set*/, 0, 32, 0, 2 }, - /*332*/ { BARCODE_BC412, BARCODE_QUIET_ZONES, -1, -1, -1, "1234567", "", 0, 16.5, 1, 102, 244, 49, 0 /*set*/, 0, 32, 0, 2 }, + /*331*/ { BARCODE_BC412, -1, -1, -1, -1, "1234567", "", 0, 16.5, 1, 102, 204, 51, 1 /*set*/, 0, 32, 0, 2 }, + /*332*/ { BARCODE_BC412, BARCODE_QUIET_ZONES, -1, -1, -1, "1234567", "", 0, 16.5, 1, 102, 244, 51, 0 /*set*/, 0, 32, 0, 2 }, /*333*/ { BARCODE_DXFILMEDGE, -1, -1, -1, -1, "120476", "", 0, 6, 2, 23, 46, 12, 1 /*set*/, 0, 6, 0, 3 }, /*334*/ { BARCODE_DXFILMEDGE, BARCODE_QUIET_ZONES, -1, -1, -1, "120476", "", 0, 6, 2, 23, 52, 12, 0 /*set*/, 0, 6, 0, 3 }, }; @@ -2082,35 +2082,35 @@ static void test_text_gap(const testCtx *const p_ctx) { }; /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */ static const struct item data[] = { - /* 0*/ { BARCODE_CODE11, -1, -1, -1, 1, 0, "1234", "", 0, 50, 1, 62, 124, 116, 1 /*set*/, 104, 105, 55, 6 }, /* Default */ - /* 1*/ { BARCODE_CODE11, -1, -1, -1, 1, 0, "1234", "", 0, 50, 1, 62, 124, 116, 0 /*set*/, 103, 104, 0, 124 }, /* Default */ - /* 2*/ { BARCODE_CODE11, -1, -1, -1, 0.1, 0, "1234", "", 0, 50, 1, 62, 124, 115, 1 /*set*/, 102, 103, 55, 6 }, - /* 3*/ { BARCODE_CODE11, -1, -1, -1, 0.3, 0, "1234", "", 0, 50, 1, 62, 124, 115, 1 /*set*/, 102, 103, 55, 6 }, - /* 4*/ { BARCODE_CODE11, -1, -1, -1, 0.4, 0, "1234", "", 0, 50, 1, 62, 124, 115, 1 /*set*/, 102, 103, 55, 6 }, - /* 5*/ { BARCODE_CODE11, -1, -1, -1, 0.5, 0, "1234", "", 0, 50, 1, 62, 124, 115, 1 /*set*/, 103, 104, 55, 6 }, - /* 6*/ { BARCODE_CODE11, -1, -1, -1, 0.5, 0, "1234", "", 0, 50, 1, 62, 124, 115, 0 /*set*/, 102, 103, 0, 124 }, - /* 7*/ { BARCODE_CODE11, -1, -1, -1, 0.6, 0, "1234", "", 0, 50, 1, 62, 124, 116, 1 /*set*/, 103, 104, 55, 6 }, - /* 8*/ { BARCODE_CODE11, -1, -1, -1, 0.9, 0, "1234", "", 0, 50, 1, 62, 124, 116, 1 /*set*/, 103, 104, 55, 6 }, - /* 9*/ { BARCODE_CODE11, -1, -1, -1, 0.9, 0, "1234", "", 0, 50, 1, 62, 124, 116, 0 /*set*/, 102, 103, 0, 124 }, - /* 10*/ { BARCODE_CODE11, -1, -1, -1, 1.5, 0, "1234", "", 0, 50, 1, 62, 124, 117, 1 /*set*/, 105, 106, 55, 6 }, - /* 11*/ { BARCODE_CODE11, -1, -1, -1, 1.5, 0, "1234", "", 0, 50, 1, 62, 124, 117, 0 /*set*/, 104, 105, 0, 124 }, - /* 12*/ { BARCODE_CODE11, -1, -1, -1, 2.0, 0, "1234", "", 0, 50, 1, 62, 124, 118, 1 /*set*/, 106, 107, 55, 6 }, - /* 13*/ { BARCODE_CODE11, -1, -1, -1, 2.0, 0, "1234", "", 0, 50, 1, 62, 124, 118, 0 /*set*/, 105, 106, 0, 124 }, - /* 14*/ { BARCODE_CODE11, -1, -1, -1, 3.0, 0, "1234", "", 0, 50, 1, 62, 124, 120, 1 /*set*/, 108, 109, 55, 6 }, - /* 15*/ { BARCODE_CODE11, -1, -1, -1, 3.0, 0, "1234", "", 0, 50, 1, 62, 124, 120, 0 /*set*/, 107, 108, 0, 124 }, - /* 16*/ { BARCODE_CODE11, -1, -1, -1, 4.0, 0, "1234", "", 0, 50, 1, 62, 124, 122, 1 /*set*/, 110, 111, 55, 6 }, - /* 17*/ { BARCODE_CODE11, -1, -1, -1, 4.0, 0, "1234", "", 0, 50, 1, 62, 124, 122, 0 /*set*/, 109, 110, 0, 124 }, - /* 18*/ { BARCODE_CODE11, -1, -1, -1, 5.0, 0, "1234", "", 0, 50, 1, 62, 124, 124, 1 /*set*/, 112, 113, 55, 6 }, - /* 19*/ { BARCODE_CODE11, -1, -1, -1, 5.0, 0, "1234", "", 0, 50, 1, 62, 124, 124, 0 /*set*/, 111, 112, 0, 124 }, - /* 20*/ { BARCODE_CODE11, -1, -1, -1, 10.0, 0, "1234", "", 0, 50, 1, 62, 124, 134, 1 /*set*/, 122, 123, 55, 6 }, - /* 21*/ { BARCODE_CODE11, -1, -1, -1, 10.0, 0, "1234", "", 0, 50, 1, 62, 124, 134, 0 /*set*/, 121, 122, 0, 124 }, - /* 22*/ { BARCODE_CODE11, -1, -1, -1, -1.0, 0, "1234", "", 0, 50, 1, 62, 124, 112, 1 /*set*/, 100, 101, 55, 6 }, - /* 23*/ { BARCODE_CODE11, -1, -1, -1, -0.5, 0, "1234", "", 0, 50, 1, 62, 124, 113, 1 /*set*/, 101, 102, 55, 6 }, - /* 24*/ { BARCODE_CODE11, -1, -1, -1, -0.5, 0, "1234", "", 0, 50, 1, 62, 124, 113, 0 /*set*/, 100, 101, 0, 124 }, - /* 25*/ { BARCODE_CODE11, -1, -1, -1, 1, 3.0, "1234", "", 0, 50, 1, 62, 372, 348, 1 /*set*/, 312, 315, 165, 18 }, /* Scale default */ - /* 26*/ { BARCODE_CODE11, -1, -1, -1, 1, 3.0, "1234", "", 0, 50, 1, 62, 372, 348, 0 /*set*/, 311, 312, 0, 372 }, /* Scale default */ - /* 27*/ { BARCODE_CODE11, -1, -1, -1, 1.5, 3.0, "1234", "", 0, 50, 1, 62, 372, 351, 1 /*set*/, 315, 318, 165, 18 }, /* Scale */ - /* 28*/ { BARCODE_CODE11, -1, -1, -1, 1.5, 3.0, "1234", "", 0, 50, 1, 62, 372, 351, 0 /*set*/, 314, 315, 0, 372 }, /* Scale */ + /* 0*/ { BARCODE_CODE11, -1, -1, -1, 1, 0, "1234", "", 0, 50, 1, 62, 124, 118, 1 /*set*/, 104, 105, 71, 4 }, /* Default */ + /* 1*/ { BARCODE_CODE11, -1, -1, -1, 1, 0, "1234", "", 0, 50, 1, 62, 124, 118, 0 /*set*/, 103, 104, 0, 124 }, /* Default */ + /* 2*/ { BARCODE_CODE11, -1, -1, -1, 0.1, 0, "1234", "", 0, 50, 1, 62, 124, 116, 1 /*set*/, 102, 103, 71, 4 }, + /* 3*/ { BARCODE_CODE11, -1, -1, -1, 0.3, 0, "1234", "", 0, 50, 1, 62, 124, 117, 1 /*set*/, 102, 103, 71, 4 }, + /* 4*/ { BARCODE_CODE11, -1, -1, -1, 0.4, 0, "1234", "", 0, 50, 1, 62, 124, 117, 1 /*set*/, 102, 103, 71, 4 }, + /* 5*/ { BARCODE_CODE11, -1, -1, -1, 0.5, 0, "1234", "", 0, 50, 1, 62, 124, 117, 1 /*set*/, 103, 104, 71, 4 }, + /* 6*/ { BARCODE_CODE11, -1, -1, -1, 0.5, 0, "1234", "", 0, 50, 1, 62, 124, 117, 0 /*set*/, 102, 103, 0, 124 }, + /* 7*/ { BARCODE_CODE11, -1, -1, -1, 0.6, 0, "1234", "", 0, 50, 1, 62, 124, 117, 1 /*set*/, 103, 104, 71, 4 }, + /* 8*/ { BARCODE_CODE11, -1, -1, -1, 0.9, 0, "1234", "", 0, 50, 1, 62, 124, 118, 1 /*set*/, 103, 104, 71, 4 }, + /* 9*/ { BARCODE_CODE11, -1, -1, -1, 0.9, 0, "1234", "", 0, 50, 1, 62, 124, 118, 0 /*set*/, 102, 103, 0, 124 }, + /* 10*/ { BARCODE_CODE11, -1, -1, -1, 1.5, 0, "1234", "", 0, 50, 1, 62, 124, 119, 1 /*set*/, 105, 106, 71, 4 }, + /* 11*/ { BARCODE_CODE11, -1, -1, -1, 1.5, 0, "1234", "", 0, 50, 1, 62, 124, 119, 0 /*set*/, 104, 105, 0, 124 }, + /* 12*/ { BARCODE_CODE11, -1, -1, -1, 2.0, 0, "1234", "", 0, 50, 1, 62, 124, 120, 1 /*set*/, 106, 107, 71, 4 }, + /* 13*/ { BARCODE_CODE11, -1, -1, -1, 2.0, 0, "1234", "", 0, 50, 1, 62, 124, 120, 0 /*set*/, 105, 106, 0, 124 }, + /* 14*/ { BARCODE_CODE11, -1, -1, -1, 3.0, 0, "1234", "", 0, 50, 1, 62, 124, 122, 1 /*set*/, 108, 109, 71, 4 }, + /* 15*/ { BARCODE_CODE11, -1, -1, -1, 3.0, 0, "1234", "", 0, 50, 1, 62, 124, 122, 0 /*set*/, 107, 108, 0, 124 }, + /* 16*/ { BARCODE_CODE11, -1, -1, -1, 4.0, 0, "1234", "", 0, 50, 1, 62, 124, 124, 1 /*set*/, 110, 111, 71, 4 }, + /* 17*/ { BARCODE_CODE11, -1, -1, -1, 4.0, 0, "1234", "", 0, 50, 1, 62, 124, 124, 0 /*set*/, 109, 110, 0, 124 }, + /* 18*/ { BARCODE_CODE11, -1, -1, -1, 5.0, 0, "1234", "", 0, 50, 1, 62, 124, 126, 1 /*set*/, 112, 113, 71, 4 }, + /* 19*/ { BARCODE_CODE11, -1, -1, -1, 5.0, 0, "1234", "", 0, 50, 1, 62, 124, 126, 0 /*set*/, 111, 112, 0, 124 }, + /* 20*/ { BARCODE_CODE11, -1, -1, -1, 10.0, 0, "1234", "", 0, 50, 1, 62, 124, 136, 1 /*set*/, 122, 123, 71, 4 }, + /* 21*/ { BARCODE_CODE11, -1, -1, -1, 10.0, 0, "1234", "", 0, 50, 1, 62, 124, 136, 0 /*set*/, 121, 122, 0, 124 }, + /* 22*/ { BARCODE_CODE11, -1, -1, -1, -1.0, 0, "1234", "", 0, 50, 1, 62, 124, 114, 1 /*set*/, 100, 101, 71, 4 }, + /* 23*/ { BARCODE_CODE11, -1, -1, -1, -0.5, 0, "1234", "", 0, 50, 1, 62, 124, 115, 1 /*set*/, 101, 102, 71, 4 }, + /* 24*/ { BARCODE_CODE11, -1, -1, -1, -0.5, 0, "1234", "", 0, 50, 1, 62, 124, 115, 0 /*set*/, 100, 101, 0, 124 }, + /* 25*/ { BARCODE_CODE11, -1, -1, -1, 1, 3.0, "1234", "", 0, 50, 1, 62, 372, 353, 1 /*set*/, 312, 315, 170, 9 }, /* Scale default */ + /* 26*/ { BARCODE_CODE11, -1, -1, -1, 1, 3.0, "1234", "", 0, 50, 1, 62, 372, 353, 0 /*set*/, 311, 312, 0, 372 }, /* Scale default */ + /* 27*/ { BARCODE_CODE11, -1, -1, -1, 1.5, 3.0, "1234", "", 0, 50, 1, 62, 372, 356, 1 /*set*/, 315, 318, 170, 9 }, /* Scale */ + /* 28*/ { BARCODE_CODE11, -1, -1, -1, 1.5, 3.0, "1234", "", 0, 50, 1, 62, 372, 356, 0 /*set*/, 314, 315, 0, 372 }, /* Scale */ /* 29*/ { BARCODE_UPCA, -1, -1, -1, 1, 0, "01457130763", "", 0, 50, 1, 95, 226, 116, 1 /*set*/, 102, 104, 82, 9 }, /* Default */ /* 30*/ { BARCODE_UPCA, -1, -1, -1, 1, 0, "01457130763", "", 0, 50, 1, 95, 226, 116, 0 /*set*/, 101, 102, 38, 72 }, /* Default */ /* 31*/ { BARCODE_UPCA, -1, -1, -1, 0.5, 0, "01457130763", "", 0, 50, 1, 95, 226, 115, 1 /*set*/, 101, 103, 82, 9 }, @@ -3343,12 +3343,12 @@ static void test_hrt_content_segs(const testCtx *const p_ctx) { const char *expected_errtxt; }; static const struct item data[] = { - /* 0*/ { BARCODE_CODE128, -1, -1, BARCODE_MEMORY_FILE, "12345\00067890", 11, 0, 116, 268, "12345 67890", -1, "", -1, "" }, - /* 1*/ { BARCODE_CODE128, -1, -1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "12345\00067890", 11, 0, 116, 268, "12345 67890", -1, "12345\00067890", 11, "" }, - /* 2*/ { BARCODE_EXCODE39, -1, -1, BARCODE_MEMORY_FILE, "12345\00067890", 11, 0, 116, 362, "12345 67890", -1, "", -1, "" }, - /* 3*/ { BARCODE_EXCODE39, -1, -1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "12345\00067890", 11, 0, 116, 362, "12345 67890", -1, "12345\00067890", 11, "" }, - /* 4*/ { BARCODE_TELEPEN, -1, -1, BARCODE_MEMORY_FILE, "12345\00067890", 11, 0, 116, 448, "12345 67890", -1, "", -1, "" }, - /* 5*/ { BARCODE_TELEPEN, -1, -1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "12345\00067890", 11, 0, 116, 448, "12345 67890", -1, "12345\00067890n", 12, "" }, + /* 0*/ { BARCODE_CODE128, -1, -1, BARCODE_MEMORY_FILE, "12345\00067890", 11, 0, 118, 268, "12345 67890", -1, "", -1, "" }, + /* 1*/ { BARCODE_CODE128, -1, -1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "12345\00067890", 11, 0, 118, 268, "12345 67890", -1, "12345\00067890", 11, "" }, + /* 2*/ { BARCODE_EXCODE39, -1, -1, BARCODE_MEMORY_FILE, "12345\00067890", 11, 0, 118, 362, "12345 67890", -1, "", -1, "" }, + /* 3*/ { BARCODE_EXCODE39, -1, -1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "12345\00067890", 11, 0, 118, 362, "12345 67890", -1, "12345\00067890", 11, "" }, + /* 4*/ { BARCODE_TELEPEN, -1, -1, BARCODE_MEMORY_FILE, "12345\00067890", 11, 0, 118, 448, "12345 67890", -1, "", -1, "" }, + /* 5*/ { BARCODE_TELEPEN, -1, -1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "12345\00067890", 11, 0, 118, 448, "12345 67890", -1, "12345\00067890n", 12, "" }, /* 6*/ { BARCODE_EAN13, -1, -1, BARCODE_MEMORY_FILE, "123456789012", -1, 0, 116, 226, "1234567890128", -1, "", -1, "" }, /* 7*/ { BARCODE_EANX, -1, -1, BARCODE_MEMORY_FILE, "123456789012", -1, 0, 116, 226, "1234567890128", -1, "", -1, "" }, /* 8*/ { BARCODE_EAN13, -1, -1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "123456789012", -1, 0, 116, 226, "1234567890128", -1, "1234567890128", -1, "" }, @@ -3357,10 +3357,10 @@ static void test_hrt_content_segs(const testCtx *const p_ctx) { /* 11*/ { BARCODE_EANX, -1, -1, BARCODE_MEMORY_FILE, "123456789012+12", -1, 0, 116, 276, "1234567890128+12", -1, "", -1, "" }, /* 12*/ { BARCODE_EAN13, -1, -1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "123456789012+12", -1, 0, 116, 276, "1234567890128+12", -1, "123456789012812", -1, "" }, /* 13*/ { BARCODE_EANX, -1, -1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "123456789012+12", -1, 0, 116, 276, "1234567890128+12", -1, "123456789012812", -1, "" }, - /* 14*/ { BARCODE_CODE39, -1, -1, BARCODE_MEMORY_FILE, "ABC14", -1, 0, 116, 180, "*ABC14*", -1, "", -1, "" }, - /* 15*/ { BARCODE_CODE39, -1, -1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "ABC14", -1, 0, 116, 180, "*ABC14*", -1, "ABC14", -1, "" }, - /* 16*/ { BARCODE_CODE39, -1, 1, BARCODE_MEMORY_FILE, "ABC14", -1, 0, 116, 206, "*ABC14_*", -1, "", -1, "" }, /* Check digit space rendered as underscore */ - /* 17*/ { BARCODE_CODE39, -1, 1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "ABC14", -1, 0, 116, 206, "*ABC14_*", -1, "ABC14 ", -1, "" }, + /* 14*/ { BARCODE_CODE39, -1, -1, BARCODE_MEMORY_FILE, "ABC14", -1, 0, 118, 180, "*ABC14*", -1, "", -1, "" }, + /* 15*/ { BARCODE_CODE39, -1, -1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "ABC14", -1, 0, 118, 180, "*ABC14*", -1, "ABC14", -1, "" }, + /* 16*/ { BARCODE_CODE39, -1, 1, BARCODE_MEMORY_FILE, "ABC14", -1, 0, 118, 206, "*ABC14_*", -1, "", -1, "" }, /* Check digit space rendered as underscore */ + /* 17*/ { BARCODE_CODE39, -1, 1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "ABC14", -1, 0, 118, 206, "*ABC14_*", -1, "ABC14 ", -1, "" }, /* 18*/ { BARCODE_POSTNET, -1, -1, BARCODE_MEMORY_FILE, "12345", -1, 0, 24, 126, "", -1, "", -1, "" }, /* 19*/ { BARCODE_POSTNET, -1, -1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "12345", -1, 0, 24, 126, "", -1, "123455", -1, "" }, /* HRT not printed */ /* 20*/ { BARCODE_POSTNET, 0, -1, BARCODE_MEMORY_FILE, "12345", -1, 0, 24, 126, "", -1, "", -1, "" }, diff --git a/backend/tests/test_svg.c b/backend/tests/test_svg.c index 6e7d669f..ce7be32b 100644 --- a/backend/tests/test_svg.c +++ b/backend/tests/test_svg.c @@ -43,6 +43,7 @@ static void test_print(const testCtx *const p_ctx) { int whitespace_width; int whitespace_height; int show_hrt; + int font_height; int option_1; int option_2; int option_3; @@ -57,126 +58,130 @@ static void test_print(const testCtx *const p_ctx) { const char *comment; }; static const struct item data[] = { - /* 0*/ { BARCODE_CODE128, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "<>\"&'", "", 0, "code128_amperands.svg", "" }, - /* 1*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "Égjpqy", "", 0, "code128_egrave_bold.svg", "" }, - /* 2*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT | EMBED_VECTOR_FONT, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "Égjpqy", "", 0, "code128_egrave_bold_embed.svg", "" }, - /* 3*/ { BARCODE_CODE128, UNICODE_MODE, 3, BOLD_TEXT | BARCODE_BOX, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "Égjpqy", "", 0, "code128_egrave_bold_box3.svg", "" }, - /* 4*/ { BARCODE_CODE128, UNICODE_MODE, 2, BOLD_TEXT | BARCODE_BOX, 2, 2, -1, -1, -1, -1, 0, "", "", 0, "Égjpqy", "", 0, "code128_egrave_bold_hvwsp2_box2.svg", "" }, - /* 5*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, 3, 3, -1, -1, -1, -1, 0, "", "", 0, "Égjpqy", "", 0, "code128_egrave_bold_hvwsp3.svg", "" }, - /* 6*/ { BARCODE_GS1_128_CC, -1, -1, -1, -1, -1, -1, 3, -1, -1, 0, "", "", 0, "[00]030123456789012340", "[02]13012345678909[37]24[10]1234567ABCDEFG", 0, "gs1_128_cc_fig12.svg", "" }, - /* 7*/ { BARCODE_CODABLOCKF, -1, -1, -1, -1, -1, -1, 3, -1, -1, 0, "", "", 0, "AAAAAAAAA", "", 0, "codablockf_3rows.svg", "" }, - /* 8*/ { BARCODE_CODABLOCKF, -1, -1, -1, 2, 2, -1, 3, -1, -1, 0, "", "", 0, "AAAAAAAAA", "", 0, "codablockf_hvwsp2.svg", "" }, - /* 9*/ { BARCODE_CODABLOCKF, -1, 2, BARCODE_BOX, 2, 2, -1, -1, -1, -1, 0, "", "", 0, "AAAAAAAAA", "", 0, "codablockf_hvwsp2_box2.svg", "" }, - /* 10*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501101531000", "", 0, "ean13_ggs_5.2.2.1-1.svg", "" }, - /* 11*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501101531000", "", 0, "ean13_ggs_5.2.2.1-1.svg", "" }, - /* 12*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501101531000", "", 0, "ean13_ggs_5.2.2.1-1_gws.svg", "" }, - /* 13*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501101531000", "", 0, "ean13_ggs_5.2.2.1-1_gws.svg", "" }, - /* 14*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE | EMBED_VECTOR_FONT, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501101531000", "", 0, "ean13_ggs_5.2.2.1-1_gws_embed.svg", "" }, - /* 15*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE | EMBED_VECTOR_FONT, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501101531000", "", 0, "ean13_ggs_5.2.2.1-1_gws_embed.svg", "" }, - /* 16*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2.svg", "" }, - /* 17*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2.svg", "" }, - /* 18*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2_gws.svg", "" }, - /* 19*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2_gws.svg", "" }, - /* 20*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2.svg", "" }, - /* 21*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2.svg", "" }, - /* 22*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2_gws.svg", "" }, - /* 23*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2_gws.svg", "" }, - /* 24*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4.svg", "" }, - /* 25*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4.svg", "" }, - /* 26*/ { BARCODE_EAN13_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4_gws.svg", "" }, - /* 27*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4_gws.svg", "" }, - /* 28*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4.svg", "" }, - /* 29*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4.svg", "" }, - /* 30*/ { BARCODE_EAN13_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4_gws.svg", "" }, - /* 31*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4_gws.svg", "" }, - /* 32*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4.svg", "" }, - /* 33*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4.svg", "" }, - /* 34*/ { BARCODE_EAN13_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_gws.svg", "" }, - /* 35*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_gws.svg", "" }, - /* 36*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, -1, 0, 2, -1, -1, 0, "", "", 0, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_notext.svg", "" }, - /* 37*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, 0, 2, -1, -1, 0, "", "", 0, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_notext.svg", "" }, - /* 38*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "012345678905+24", "", 0, "upca_2addon_ggs_5.2.6.6-5.svg", "" }, - /* 39*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "012345678905+24", "", 0, "upca_2addon_ggs_5.2.6.6-5_gws.svg", "" }, - /* 40*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "614141234417+12345", "", 0, "upca_5addon.svg", "" }, - /* 41*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "614141234417+12345", "", 0, "upca_5addon_gws.svg", "" }, - /* 42*/ { BARCODE_UPCA, -1, 3, BARCODE_BIND, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "614141234417+12345", "", 0, "upca_5addon_bind3.svg", "" }, - /* 43*/ { BARCODE_UPCA, -1, -1, SMALL_TEXT | BOLD_TEXT, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "614141234417+12345", "", 0, "upca_5addon_small_bold.svg", "Note BOLD_TEXT ignored for UPC/EAN" }, - /* 44*/ { BARCODE_UPCA, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, -1, -1, -1, -1, 1, "", "", 0, "012345678905+24", "", 0, "upca_2addon_h1.svg", "" }, - /* 45*/ { BARCODE_UPCA, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, 0, -1, -1, -1, 1, "", "", 0, "012345678905+24", "", 0, "upca_2addon_h1_notext.svg", "" }, - /* 46*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "12345678901+12", "[91]123456789", 0, "upca_cc_2addon_cca_3x4.svg", "" }, - /* 47*/ { BARCODE_UPCA_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "12345678901+12", "[91]123456789", 0, "upca_cc_2addon_cca_3x4_gws.svg", "" }, - /* 48*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4.svg", "" }, - /* 49*/ { BARCODE_UPCA_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_gws.svg", "" }, - /* 50*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, 0, 2, -1, -1, 0, "", "", 0, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_notext.svg", "" }, - /* 51*/ { BARCODE_UPCA_CC, -1, 3, BARCODE_BIND, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_bind3.svg", "" }, - /* 52*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12", "", 0, "upce_2addon.svg", "" }, - /* 53*/ { BARCODE_UPCE, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12", "", 0, "upce_2addon_gws.svg", "" }, - /* 54*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", 0, "upce_5addon.svg", "" }, - /* 55*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", 0, "upce_5addon_small.svg", "" }, - /* 56*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", 0, "upce_5addon_small_gws.svg", "" }, - /* 57*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, 0, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", 0, "upce_5addon_notext.svg", "" }, - /* 58*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2.svg", "" }, - /* 59*/ { BARCODE_UPCE_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2_gws.svg", "" }, - /* 60*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "FF0000EE", "0000FF11", 0, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2_fgbgalpha.svg", "" }, - /* 61*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "FFFFFF00", 0, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2_nobg.svg", "" }, - /* 62*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 270, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2_rotate_270.svg", "" }, - /* 63*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 3, "", "", 0, "0654321+89", "[91]1", 0, "upce_cc_2addon_h3.svg", "" }, - /* 64*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, 0, 1, -1, -1, 3, "", "", 0, "0654321+89", "[91]1", 0, "upce_cc_2addon_h3_notext.svg", "" }, - /* 65*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2.svg", "" }, - /* 66*/ { BARCODE_UPCE_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2_gws.svg", "" }, - /* 67*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, 0, 2, -1, -1, 0, "", "", 0, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2_notext.svg", "" }, - /* 68*/ { BARCODE_EAN8, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501234", "", 0, "ean8_gss_5.2.2.2-1.svg", "" }, - /* 69*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501234", "", 0, "ean8_gss_5.2.2.2-1.svg", "" }, - /* 70*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501234", "", 0, "ean8_gss_5.2.2.2-1_gws.svg", "" }, - /* 71*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501234", "", 0, "ean8_gss_5.2.2.2-1_gws.svg", "" }, - /* 72*/ { BARCODE_EAN8, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon.svg", "" }, - /* 73*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon.svg", "" }, - /* 74*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_gws.svg", "" }, - /* 75*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_gws.svg", "" }, - /* 76*/ { BARCODE_EAN8, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, -1, -1, -1, -1, 1, "", "", 0, " 16", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_h1.svg", "" }, - /* 77*/ { BARCODE_EANX, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, -1, -1, -1, -1, 1, "", "", 0, " 16", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_h1.svg", "" }, - /* 78*/ { BARCODE_EAN8, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, 0, -1, -1, -1, 1, "", "", 0, " 16", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_h1_notext.svg", "" }, - /* 79*/ { BARCODE_EANX, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, 0, -1, -1, -1, 1, "", "", 0, " 16", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_h1_notext.svg", "" }, - /* 80*/ { BARCODE_EAN8, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon.svg", "" }, - /* 81*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon.svg", "" }, - /* 82*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon_gws.svg", "" }, - /* 83*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon_gws.svg", "" }, - /* 84*/ { BARCODE_EAN8_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3.svg", "" }, - /* 85*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3.svg", "" }, - /* 86*/ { BARCODE_EAN8_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3_gws.svg", "" }, - /* 87*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3_gws.svg", "" }, - /* 88*/ { BARCODE_EAN8_CC, -1, -1, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3.svg", "" }, - /* 89*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3.svg", "" }, - /* 90*/ { BARCODE_EAN8_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3_gws.svg", "" }, - /* 91*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3_gws.svg", "" }, - /* 92*/ { BARCODE_EAN_5ADDON, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "ean5.svg", "" }, - /* 93*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "ean5.svg", "" }, - /* 94*/ { BARCODE_EAN_5ADDON, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "ean5_gws.svg", "" }, - /* 95*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "ean5_gws.svg", "" }, - /* 96*/ { BARCODE_EAN_5ADDON, -1, 2, BARCODE_BIND, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "ean5_bind2.svg", "" }, - /* 97*/ { BARCODE_EANX, -1, 2, BARCODE_BIND, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "ean5_bind2.svg", "" }, - /* 98*/ { BARCODE_EAN_2ADDON, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12", "", 0, "ean2.svg", "" }, - /* 99*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12", "", 0, "ean2.svg", "" }, - /*100*/ { BARCODE_EAN_2ADDON, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12", "", 0, "ean2_gws.svg", "" }, - /*101*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12", "", 0, "ean2_gws.svg", "" }, - /*102*/ { BARCODE_EAN_2ADDON, -1, 1, BARCODE_BOX, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12", "", 0, "ean2_box1.svg", "" }, - /*103*/ { BARCODE_EANX, -1, 1, BARCODE_BOX, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12", "", 0, "ean2_box1.svg", "" }, - /*104*/ { BARCODE_CODE39, -1, -1, SMALL_TEXT, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "123", "", 0, "code39_small.svg", "" }, - /*105*/ { BARCODE_POSTNET, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "postnet_zip.svg", "" }, - /*106*/ { BARCODE_MAXICODE, -1, 2, BARCODE_BOX, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_box2.svg", "" }, - /*107*/ { BARCODE_MAXICODE, -1, 1, BARCODE_BIND, -1, 1, -1, -1, -1, -1, 0, "", "", 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_vwsp1_bind1.svg", "" }, - /*108*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "121212DD", "EEEEEE22", 90, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_fgbg_rotate_90.svg", "" }, - /*109*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, -1, 1, -1, -1, -1, -1, 0, "", "", 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "datamatrix_vwsp1_bind1_dotty.svg", "" }, - /*110*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, 1, 1, -1, -1, -1, -1, 0, "", "", 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "datamatrix_hvwsp1_bind1_dotty.svg", "" }, - /*111*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345678909", "", 0, "dbar_ltd.svg", "" }, - /*112*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, "", "", 0, "Your Data Here!", "", ZINT_WARN_NONCOMPLIANT, "pdf417_height5.svg", "" }, - /*113*/ { BARCODE_USPS_IMAIL, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7.75, "", "", 0, "12345678901234567890", "", 0, "imail_height7.75.svg", "" }, - /*114*/ { BARCODE_ULTRA, -1, 3, BARCODE_BOX, 2, 2, -1, -1, -1, -1, 0, "FF0000", "0000FF", 0, "12345678901234567890", "", 0, "ultra_fgbg_hvwsp2_box3.svg", "" }, - /*115*/ { BARCODE_TELEPEN, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.4, "", "", 180, "A", "", 0, "telepen_height0.4_rotate_180.svg", "" }, - /*116*/ { BARCODE_CODE49, -1, -1, COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, -1, 0, "FF11157F", "", 0, "A", "", 0, "code49_comph_fgalpha.svg", "" }, - /*117*/ { BARCODE_CODABLOCKF, -1, -1, COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, 2, 0, "00000033", "FFFFFF66", 0, "1234567890123456789012345678901234", "", 0, "codablockf_comph_sep2_fgbgalpha.svg", "" }, - /*118*/ { BARCODE_DPD, -1, -1, BARCODE_QUIET_ZONES | COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "008182709980000020028101276", "", 0, "dpd_compliant.svg", "" }, - /*119*/ { BARCODE_CHANNEL, -1, -1, CMYK_COLOUR | COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, -1, 0, "100,85,0,20", "FFFFFF00", 0, "123", "", 0, "channel_cmyk_nobg.svg", "" }, + /* 0*/ { BARCODE_CODE128, UNICODE_MODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10.0, "", "", 0, "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~", "", 0, "code128_latin1_1.svg", "" }, + /* 1*/ { BARCODE_CODE128, UNICODE_MODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10.0, "", "", 0, "¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ", "", 0, "code128_latin1_2.svg", "" }, + /* 2*/ { BARCODE_CODE128, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "<>\"&'", "", 0, "code128_amperands.svg", "" }, + /* 3*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "Égjpqy", "", 0, "code128_egrave_bold.svg", "" }, + /* 4*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT | EMBED_VECTOR_FONT, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "Égjpqy", "", 0, "code128_egrave_bold_embed.svg", "" }, + /* 5*/ { BARCODE_CODE128, UNICODE_MODE, 3, BOLD_TEXT | BARCODE_BOX, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "Égjpqy", "", 0, "code128_egrave_bold_box3.svg", "" }, + /* 6*/ { BARCODE_CODE128, UNICODE_MODE, 2, BOLD_TEXT | BARCODE_BOX, 2, 2, -1, -1, -1, -1, -1, 0, "", "", 0, "Égjpqy", "", 0, "code128_egrave_bold_hvwsp2_box2.svg", "" }, + /* 7*/ { BARCODE_CODE128, UNICODE_MODE, -1, BOLD_TEXT, 3, 3, -1, -1, -1, -1, -1, 0, "", "", 0, "Égjpqy", "", 0, "code128_egrave_bold_hvwsp3.svg", "" }, + /* 8*/ { BARCODE_GS1_128_CC, -1, -1, -1, -1, -1, -1, -1, 3, -1, -1, 0, "", "", 0, "[00]030123456789012340", "[02]13012345678909[37]24[10]1234567ABCDEFG", 0, "gs1_128_cc_fig12.svg", "" }, + /* 9*/ { BARCODE_CODABLOCKF, -1, -1, -1, -1, -1, -1, -1, 3, -1, -1, 0, "", "", 0, "AAAAAAAAA", "", 0, "codablockf_3rows.svg", "" }, + /* 10*/ { BARCODE_CODABLOCKF, -1, -1, -1, 2, 2, -1, -1, 3, -1, -1, 0, "", "", 0, "AAAAAAAAA", "", 0, "codablockf_hvwsp2.svg", "" }, + /* 11*/ { BARCODE_CODABLOCKF, -1, 2, BARCODE_BOX, 2, 2, -1, -1, -1, -1, -1, 0, "", "", 0, "AAAAAAAAA", "", 0, "codablockf_hvwsp2_box2.svg", "" }, + /* 12*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501101531000", "", 0, "ean13_ggs_5.2.2.1-1.svg", "" }, + /* 13*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501101531000", "", 0, "ean13_ggs_5.2.2.1-1.svg", "" }, + /* 14*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501101531000", "", 0, "ean13_ggs_5.2.2.1-1_gws.svg", "" }, + /* 15*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501101531000", "", 0, "ean13_ggs_5.2.2.1-1_gws.svg", "" }, + /* 16*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE | EMBED_VECTOR_FONT, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501101531000", "", 0, "ean13_ggs_5.2.2.1-1_gws_embed.svg", "" }, + /* 17*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE | EMBED_VECTOR_FONT, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501101531000", "", 0, "ean13_ggs_5.2.2.1-1_gws_embed.svg", "" }, + /* 18*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2.svg", "" }, + /* 19*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2.svg", "" }, + /* 20*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2_gws.svg", "" }, + /* 21*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9771384524017+12", "", 0, "ean13_2addon_ggs_5.2.2.5.1-2_gws.svg", "" }, + /* 22*/ { BARCODE_EAN13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2.svg", "" }, + /* 23*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2.svg", "" }, + /* 24*/ { BARCODE_EAN13, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2_gws.svg", "" }, + /* 25*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9780877799306+54321", "", 0, "ean13_5addon_ggs_5.2.2.5.2-2_gws.svg", "" }, + /* 26*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4.svg", "" }, + /* 27*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4.svg", "" }, + /* 28*/ { BARCODE_EAN13_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4_gws.svg", "" }, + /* 29*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012", "[91]12345678901234567890123456789", 0, "ean13_cc_cca_5x4_gws.svg", "" }, + /* 30*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4.svg", "" }, + /* 31*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4.svg", "" }, + /* 32*/ { BARCODE_EAN13_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4_gws.svg", "" }, + /* 33*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "123456789012+12", "[91]123456789012345678901", 0, "ean13_cc_2addon_cca_4x4_gws.svg", "" }, + /* 34*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4.svg", "" }, + /* 35*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4.svg", "" }, + /* 36*/ { BARCODE_EAN13_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_gws.svg", "" }, + /* 37*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_gws.svg", "" }, + /* 38*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, -1, 0, -1, 2, -1, -1, 0, "", "", 0, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_notext.svg", "" }, + /* 39*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, 0, -1, 2, -1, -1, 0, "", "", 0, "123456789012+54321", "[91]1234567890", 0, "ean13_cc_5addon_ccb_3x4_notext.svg", "" }, + /* 40*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "012345678905+24", "", 0, "upca_2addon_ggs_5.2.6.6-5.svg", "" }, + /* 41*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "012345678905+24", "", 0, "upca_2addon_ggs_5.2.6.6-5_gws.svg", "" }, + /* 42*/ { BARCODE_UPCA, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "614141234417+12345", "", 0, "upca_5addon.svg", "" }, + /* 43*/ { BARCODE_UPCA, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "614141234417+12345", "", 0, "upca_5addon_gws.svg", "" }, + /* 44*/ { BARCODE_UPCA, -1, 3, BARCODE_BIND, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "614141234417+12345", "", 0, "upca_5addon_bind3.svg", "" }, + /* 45*/ { BARCODE_UPCA, -1, -1, SMALL_TEXT | BOLD_TEXT, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "614141234417+12345", "", 0, "upca_5addon_small_bold.svg", "Note BOLD_TEXT ignored for UPC/EAN" }, + /* 46*/ { BARCODE_UPCA, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, -1, -1, -1, -1, -1, 1, "", "", 0, "012345678905+24", "", 0, "upca_2addon_h1.svg", "" }, + /* 47*/ { BARCODE_UPCA, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, 0, -1, -1, -1, -1, 1, "", "", 0, "012345678905+24", "", 0, "upca_2addon_h1_notext.svg", "" }, + /* 48*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "12345678901+12", "[91]123456789", 0, "upca_cc_2addon_cca_3x4.svg", "" }, + /* 49*/ { BARCODE_UPCA_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "12345678901+12", "[91]123456789", 0, "upca_cc_2addon_cca_3x4_gws.svg", "" }, + /* 50*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4.svg", "" }, + /* 51*/ { BARCODE_UPCA_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_gws.svg", "" }, + /* 52*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, -1, 0, -1, 2, -1, -1, 0, "", "", 0, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_notext.svg", "" }, + /* 53*/ { BARCODE_UPCA_CC, -1, 3, BARCODE_BIND, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "12345678901+12121", "[91]1234567890123", 0, "upca_cc_5addon_ccb_4x4_bind3.svg", "" }, + /* 54*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12", "", 0, "upce_2addon.svg", "" }, + /* 55*/ { BARCODE_UPCE, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12", "", 0, "upce_2addon_gws.svg", "" }, + /* 56*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", 0, "upce_5addon.svg", "" }, + /* 57*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", 0, "upce_5addon_small.svg", "" }, + /* 58*/ { BARCODE_UPCE, -1, -1, SMALL_TEXT | EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", 0, "upce_5addon_small_gws.svg", "" }, + /* 59*/ { BARCODE_UPCE, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", 0, "upce_5addon_notext.svg", "" }, + /* 60*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2.svg", "" }, + /* 61*/ { BARCODE_UPCE_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2_gws.svg", "" }, + /* 62*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "FF0000EE", "0000FF11", 0, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2_fgbgalpha.svg", "" }, + /* 63*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "FFFFFF00", 0, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2_nobg.svg", "" }, + /* 64*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 270, "0654321+89", "[91]1", 0, "upce_cc_2addon_cca_5x2_rotate_270.svg", "" }, + /* 65*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 3, "", "", 0, "0654321+89", "[91]1", 0, "upce_cc_2addon_h3.svg", "" }, + /* 66*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, 0, -1, 1, -1, -1, 3, "", "", 0, "0654321+89", "[91]1", 0, "upce_cc_2addon_h3_notext.svg", "" }, + /* 67*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2.svg", "" }, + /* 68*/ { BARCODE_UPCE_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2_gws.svg", "" }, + /* 69*/ { BARCODE_UPCE_CC, -1, -1, -1, -1, -1, 0, -1, 2, -1, -1, 0, "", "", 0, "1876543+56789", "[91]12345", 0, "upce_cc_5addon_ccb_8x2_notext.svg", "" }, + /* 70*/ { BARCODE_EAN8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501234", "", 0, "ean8_gss_5.2.2.2-1.svg", "" }, + /* 71*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501234", "", 0, "ean8_gss_5.2.2.2-1.svg", "" }, + /* 72*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501234", "", 0, "ean8_gss_5.2.2.2-1_gws.svg", "" }, + /* 73*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "9501234", "", 0, "ean8_gss_5.2.2.2-1_gws.svg", "" }, + /* 74*/ { BARCODE_EAN8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon.svg", "" }, + /* 75*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon.svg", "" }, + /* 76*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_gws.svg", "" }, + /* 77*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_gws.svg", "" }, + /* 78*/ { BARCODE_EAN8, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, -1, -1, -1, -1, -1, 1, "", "", 0, " 16", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_h1.svg", "" }, + /* 79*/ { BARCODE_EANX, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, -1, -1, -1, -1, -1, 1, "", "", 0, " 16", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_h1.svg", "" }, + /* 80*/ { BARCODE_EAN8, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, 0, -1, -1, -1, -1, 1, "", "", 0, " 16", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_h1_notext.svg", "" }, + /* 81*/ { BARCODE_EANX, -1, -1, BARCODE_NO_QUIET_ZONES, -1, -1, 0, -1, -1, -1, -1, 1, "", "", 0, " 16", "", ZINT_WARN_NONCOMPLIANT, "ean8_2addon_h1_notext.svg", "" }, + /* 82*/ { BARCODE_EAN8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon.svg", "" }, + /* 83*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon.svg", "" }, + /* 84*/ { BARCODE_EAN8, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon_gws.svg", "" }, + /* 85*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "1234567+12345", "", ZINT_WARN_NONCOMPLIANT, "ean8_5addon_gws.svg", "" }, + /* 86*/ { BARCODE_EAN8_CC, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3.svg", "" }, + /* 87*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3.svg", "" }, + /* 88*/ { BARCODE_EAN8_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3_gws.svg", "" }, + /* 89*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 1, -1, -1, 0, "", "", 0, "9876543+65", "[91]1234567", ZINT_WARN_NONCOMPLIANT, "ean8_cc_2addon_cca_4x3_gws.svg", "" }, + /* 90*/ { BARCODE_EAN8_CC, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3.svg", "" }, + /* 91*/ { BARCODE_EANX_CC, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3.svg", "" }, + /* 92*/ { BARCODE_EAN8_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3_gws.svg", "" }, + /* 93*/ { BARCODE_EANX_CC, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, 2, -1, -1, 0, "", "", 0, "9876543+74083", "[91]123456789012345678", ZINT_WARN_NONCOMPLIANT, "ean8_cc_5addon_ccb_8x3_gws.svg", "" }, + /* 94*/ { BARCODE_EAN_5ADDON, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "ean5.svg", "" }, + /* 95*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "ean5.svg", "" }, + /* 96*/ { BARCODE_EAN_5ADDON, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "ean5_gws.svg", "" }, + /* 97*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "ean5_gws.svg", "" }, + /* 98*/ { BARCODE_EAN_5ADDON, -1, 2, BARCODE_BIND, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "ean5_bind2.svg", "" }, + /* 99*/ { BARCODE_EANX, -1, 2, BARCODE_BIND, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "ean5_bind2.svg", "" }, + /*100*/ { BARCODE_EAN_2ADDON, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12", "", 0, "ean2.svg", "" }, + /*101*/ { BARCODE_EANX, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12", "", 0, "ean2.svg", "" }, + /*102*/ { BARCODE_EAN_2ADDON, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12", "", 0, "ean2_gws.svg", "" }, + /*103*/ { BARCODE_EANX, -1, -1, EANUPC_GUARD_WHITESPACE, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12", "", 0, "ean2_gws.svg", "" }, + /*104*/ { BARCODE_EAN_2ADDON, -1, 1, BARCODE_BOX, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12", "", 0, "ean2_box1.svg", "" }, + /*105*/ { BARCODE_EANX, -1, 1, BARCODE_BOX, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12", "", 0, "ean2_box1.svg", "" }, + /*106*/ { BARCODE_CODE39, -1, -1, SMALL_TEXT, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "123", "", 0, "code39_small.svg", "" }, + /*107*/ { BARCODE_POSTNET, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345", "", 0, "postnet_zip.svg", "" }, + /*108*/ { BARCODE_MAXICODE, -1, 2, BARCODE_BOX, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_box2.svg", "" }, + /*109*/ { BARCODE_MAXICODE, -1, 1, BARCODE_BIND, -1, 1, -1, -1, -1, -1, -1, 0, "", "", 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_vwsp1_bind1.svg", "" }, + /*110*/ { BARCODE_MAXICODE, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "121212DD", "EEEEEE22", 90, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "maxicode_fgbg_rotate_90.svg", "" }, + /*111*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, -1, 1, -1, -1, -1, -1, -1, 0, "", "", 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "datamatrix_vwsp1_bind1_dotty.svg", "" }, + /*112*/ { BARCODE_DATAMATRIX, -1, 1, BARCODE_BIND | BARCODE_DOTTY_MODE, 1, 1, -1, -1, -1, -1, -1, 0, "", "", 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", 0, "datamatrix_hvwsp1_bind1_dotty.svg", "" }, + /*113*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "12345678909", "", 0, "dbar_ltd.svg", "" }, + /*114*/ { BARCODE_PDF417, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, "", "", 0, "Your Data Here!", "", ZINT_WARN_NONCOMPLIANT, "pdf417_height5.svg", "" }, + /*115*/ { BARCODE_USPS_IMAIL, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7.75, "", "", 0, "12345678901234567890", "", 0, "imail_height7.75.svg", "" }, + /*116*/ { BARCODE_ULTRA, -1, 3, BARCODE_BOX, 2, 2, -1, -1, -1, -1, -1, 0, "FF0000", "0000FF", 0, "12345678901234567890", "", 0, "ultra_fgbg_hvwsp2_box3.svg", "" }, + /*117*/ { BARCODE_TELEPEN, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.4, "", "", 180, "A", "", 0, "telepen_height0.4_rotate_180.svg", "" }, + /*118*/ { BARCODE_CODE49, -1, -1, COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, -1, -1, 0, "FF11157F", "", 0, "A", "", 0, "code49_comph_fgalpha.svg", "" }, + /*119*/ { BARCODE_CODABLOCKF, -1, -1, COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, -1, 2, 0, "00000033", "FFFFFF66", 0, "1234567890123456789012345678901234", "", 0, "codablockf_comph_sep2_fgbgalpha.svg", "" }, + /*120*/ { BARCODE_DPD, -1, -1, BARCODE_QUIET_ZONES | COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, -1, -1, 0, "", "", 0, "008182709980000020028101276", "", 0, "dpd_compliant.svg", "" }, + /*121*/ { BARCODE_CHANNEL, -1, -1, CMYK_COLOUR | COMPLIANT_HEIGHT, -1, -1, -1, -1, -1, -1, -1, 0, "100,85,0,20", "FFFFFF00", 0, "123", "", 0, "channel_cmyk_nobg.svg", "" }, + /*122*/ { BARCODE_DBAR_EXPSTK, -1, -1, COMPLIANT_HEIGHT, -1, -1, ZINT_HRT_STACKED, -1, -1, -1, -1, 0, "", "", 0, "[01]09501101530003[17]140704[10]AB-123", "", 0, "dbar_expstk.svg", "" }, + /*123*/ { BARCODE_DBAR_EXPSTK, -1, -1, COMPLIANT_HEIGHT, -1, -1, ZINT_HRT_STACKED | ZINT_HRT_GS1_NEWLINE, 28, -1, -1, -1, 0, "", "", 0, "[01]09501101530003[17]140704[10]AB-123", "", 0, "dbar_expstk_gs1nl_fh28.svg", "" }, }; const int data_size = ARRAY_SIZE(data); int i, length, ret; @@ -223,6 +228,9 @@ static void test_print(const testCtx *const p_ctx) { if (data[i].show_hrt != -1) { symbol->show_hrt = data[i].show_hrt; } + if (data[i].font_height != -1) { + symbol->show_hrt |= data[i].font_height << 16; + } if (data[i].height) { symbol->height = data[i].height; } @@ -263,10 +271,12 @@ static void test_print(const testCtx *const p_ctx) { "i:%d testUtilDataPath == 0\n", i); if (p_ctx->generate) { - printf(" /*%3d*/ { %s, %s, %d, %s, %d, %d, %d, %d, %d, %d, %.8g, \"%s\", \"%s\", %d, \"%s\", \"%s\", %s, \"%s\", \"%s\" },\n", + printf(" /*%3d*/ { %s, %s, %d, %s, %d, %d, %s, %d, %d, %d, %d, %.8g, \"%s\", \"%s\", %d, \"%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].whitespace_height, data[i].show_hrt, + data[i].whitespace_width, data[i].whitespace_height, + testUtilShowHRTName(data[i].show_hrt), data[i].font_height, data[i].option_1, data[i].option_2, data[i].option_3, data[i].height, data[i].fgcolour, data[i].bgcolour, data[i].rotate_angle, testUtilEscape(data[i].data, length, escaped, escaped_size), data[i].composite, diff --git a/backend/tests/test_vector.c b/backend/tests/test_vector.c index bc45e729..832d96d7 100644 --- a/backend/tests/test_vector.c +++ b/backend/tests/test_vector.c @@ -502,7 +502,7 @@ static void test_options(const testCtx *const p_ctx) { }; /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */ struct item data[] = { - /* 0*/ { BARCODE_CODE128, "123456", "7890ab", 0, "A", 0, 1, 46, 92, 116.28 }, + /* 0*/ { BARCODE_CODE128, "123456", "7890ab", 0, "A", 0, 1, 46, 92, 117.920624 }, /* 1*/ { BARCODE_CODE128, "12345", NULL, 0, "A", ZINT_ERROR_INVALID_OPTION, -1, -1, -1, -1 }, /* 2*/ { BARCODE_CODE128, NULL, "1234567", 0, "A", ZINT_ERROR_INVALID_OPTION, -1, -1, -1, -1 }, /* 3*/ { BARCODE_CODE128, "12345 ", NULL, 0, "A", ZINT_ERROR_INVALID_OPTION, -1, -1, -1, -1 }, @@ -563,14 +563,14 @@ static void test_buffer_vector(const testCtx *const p_ctx) { float expected_vector_height; }; struct item data[] = { - /* 0*/ { BARCODE_CODE11, "1234567890", "", 0, 50, 1, 108, 216, 116.28 }, - /* 1*/ { BARCODE_C25STANDARD, "1234567890", "", 0, 50, 1, 117, 234, 116.28 }, - /* 2*/ { BARCODE_C25INTER, "1234567890", "", 0, 50, 1, 99, 198, 116.28 }, - /* 3*/ { BARCODE_C25IATA, "1234567890", "", 0, 50, 1, 149, 298, 116.28 }, - /* 4*/ { BARCODE_C25LOGIC, "1234567890", "", 0, 50, 1, 109, 218, 116.28 }, - /* 5*/ { BARCODE_C25IND, "1234567890", "", 0, 50, 1, 159, 318, 116.28 }, - /* 6*/ { BARCODE_CODE39, "1234567890", "", 0, 50, 1, 155, 310, 116.28 }, - /* 7*/ { BARCODE_EXCODE39, "1234567890", "", 0, 50, 1, 155, 310, 116.28 }, + /* 0*/ { BARCODE_CODE11, "1234567890", "", 0, 50, 1, 108, 216, 117.920624 }, + /* 1*/ { BARCODE_C25STANDARD, "1234567890", "", 0, 50, 1, 117, 234, 117.920624 }, + /* 2*/ { BARCODE_C25INTER, "1234567890", "", 0, 50, 1, 99, 198, 117.920624 }, + /* 3*/ { BARCODE_C25IATA, "1234567890", "", 0, 50, 1, 149, 298, 117.920624 }, + /* 4*/ { BARCODE_C25LOGIC, "1234567890", "", 0, 50, 1, 109, 218, 117.920624 }, + /* 5*/ { BARCODE_C25IND, "1234567890", "", 0, 50, 1, 159, 318, 117.920624 }, + /* 6*/ { BARCODE_CODE39, "1234567890", "", 0, 50, 1, 155, 310, 117.920624 }, + /* 7*/ { BARCODE_EXCODE39, "1234567890", "", 0, 50, 1, 155, 310, 117.920624 }, /* 8*/ { BARCODE_EAN13, "123456789012", "", 0, 50, 1, 95, 226, 118 }, /* 9*/ { BARCODE_EANX, "123456789012", "", 0, 50, 1, 95, 226, 118 }, /* 10*/ { BARCODE_EAN13, "1234567890128", "", 0, 50, 1, 95, 226, 118 }, @@ -601,19 +601,19 @@ static void test_buffer_vector(const testCtx *const p_ctx) { /* 35*/ { BARCODE_EAN_2ADDON, "12", "", 0, 50, 1, 20, 50, 118 }, /* 36*/ { BARCODE_EANX, "12", "", 0, 50, 1, 20, 50, 118 }, /* 37*/ { BARCODE_EANX_CHK, "12", "", 0, 50, 1, 20, 50, 118 }, - /* 38*/ { BARCODE_GS1_128, "[01]12345678901231", "", 0, 50, 1, 134, 268, 116.28 }, - /* 39*/ { BARCODE_CODABAR, "A00000000B", "", 0, 50, 1, 102, 204, 116.28 }, - /* 40*/ { BARCODE_CODE128, "1234567890", "", 0, 50, 1, 90, 180, 116.28 }, - /* 41*/ { BARCODE_DPLEIT, "1234567890123", "", 0, 72, 1, 135, 270, 160.28 }, - /* 42*/ { BARCODE_DPIDENT, "12345678901", "", 0, 72, 1, 117, 234, 160.28 }, + /* 38*/ { BARCODE_GS1_128, "[01]12345678901231", "", 0, 50, 1, 134, 268, 117.920624 }, + /* 39*/ { BARCODE_CODABAR, "A00000000B", "", 0, 50, 1, 102, 204, 117.920624 }, + /* 40*/ { BARCODE_CODE128, "1234567890", "", 0, 50, 1, 90, 180, 117.920624 }, + /* 41*/ { BARCODE_DPLEIT, "1234567890123", "", 0, 72, 1, 135, 270, 161.920624 }, + /* 42*/ { BARCODE_DPIDENT, "12345678901", "", 0, 72, 1, 117, 234, 161.920624 }, /* 43*/ { BARCODE_CODE16K, "1234567890", "", 0, 20, 2, 70, 162, 44 }, /* 44*/ { BARCODE_CODE49, "1234567890", "", 0, 20, 2, 70, 162, 44 }, - /* 45*/ { BARCODE_CODE93, "1234567890", "", 0, 50, 1, 127, 254, 116.28 }, + /* 45*/ { BARCODE_CODE93, "1234567890", "", 0, 50, 1, 127, 254, 117.920624 }, /* 46*/ { BARCODE_FLAT, "1234567890", "", 0, 50, 1, 90, 180, 100 }, - /* 47*/ { BARCODE_DBAR_OMN, "1234567890123", "", 0, 50, 1, 96, 192, 116.28 }, - /* 48*/ { BARCODE_DBAR_LTD, "1234567890123", "", 0, 50, 1, 79, 158, 116.28 }, - /* 49*/ { BARCODE_DBAR_EXP, "[01]12345678901231", "", 0, 34, 1, 134, 268, 84.279999 }, - /* 50*/ { BARCODE_TELEPEN, "1234567890", "", 0, 50, 1, 208, 416, 116.28 }, + /* 47*/ { BARCODE_DBAR_OMN, "1234567890123", "", 0, 50, 1, 96, 192, 117.920624 }, + /* 48*/ { BARCODE_DBAR_LTD, "1234567890123", "", 0, 50, 1, 79, 158, 117.920624 }, + /* 49*/ { BARCODE_DBAR_EXP, "[01]12345678901231", "", 0, 34, 1, 134, 268, 85.9206238 }, + /* 50*/ { BARCODE_TELEPEN, "1234567890", "", 0, 50, 1, 208, 416, 117.920624 }, /* 51*/ { BARCODE_UPCA, "12345678901", "", 0, 50, 1, 95, 226, 118 }, /* 52*/ { BARCODE_UPCA_CHK, "123456789012", "", 0, 50, 1, 95, 226, 118 }, /* 53*/ { BARCODE_UPCA, "12345678901+12", "", 0, 50, 1, 124, 276, 118 }, @@ -627,18 +627,18 @@ static void test_buffer_vector(const testCtx *const p_ctx) { /* 61*/ { BARCODE_UPCE, "1234567+12345", "", 0, 50, 1, 105, 238, 118 }, /* 62*/ { BARCODE_UPCE_CHK, "12345670+12345", "", 0, 50, 1, 105, 238, 118 }, /* 63*/ { BARCODE_POSTNET, "12345678901", "", 0, 12, 2, 123, 246, 24 }, - /* 64*/ { BARCODE_MSI_PLESSEY, "1234567890", "", 0, 50, 1, 127, 254, 116.28 }, + /* 64*/ { BARCODE_MSI_PLESSEY, "1234567890", "", 0, 50, 1, 127, 254, 117.920624 }, /* 65*/ { BARCODE_FIM, "A", "", 0, 50, 1, 17, 34, 100 }, - /* 66*/ { BARCODE_LOGMARS, "1234567890", "", 0, 50, 1, 191, 382, 116.28 }, + /* 66*/ { BARCODE_LOGMARS, "1234567890", "", 0, 50, 1, 191, 382, 117.920624 }, /* 67*/ { BARCODE_PHARMA, "123456", "", 0, 50, 1, 58, 116, 100 }, - /* 68*/ { BARCODE_PZN, "123456", "", 0, 50, 1, 142, 284, 116.28 }, + /* 68*/ { BARCODE_PZN, "123456", "", 0, 50, 1, 142, 284, 117.920624 }, /* 69*/ { BARCODE_PHARMA_TWO, "12345678", "", 0, 10, 2, 29, 58, 20 }, /* 70*/ { BARCODE_CEPNET, "12345678", "", 0, 5.375, 2, 93, 186, 10.75 }, /* 71*/ { BARCODE_PDF417, "1234567890", "", 0, 21, 7, 103, 206, 42 }, /* 72*/ { BARCODE_PDF417COMP, "1234567890", "", 0, 21, 7, 69, 138, 42 }, /* 73*/ { BARCODE_MAXICODE, "1234567890", "", 0, 165, 33, 30, 60, 57.7333984 }, /* 74*/ { BARCODE_QRCODE, "1234567890AB", "", 0, 21, 21, 21, 42, 42 }, - /* 75*/ { BARCODE_CODE128AB, "1234567890", "", 0, 50, 1, 145, 290, 116.28 }, + /* 75*/ { BARCODE_CODE128AB, "1234567890", "", 0, 50, 1, 145, 290, 117.920624 }, /* 76*/ { BARCODE_AUSPOST, "12345678901234567890123", "", 0, 8, 3, 133, 266, 16 }, /* 77*/ { BARCODE_AUSREPLY, "12345678", "", 0, 8, 3, 73, 146, 16 }, /* 78*/ { BARCODE_AUSROUTE, "12345678", "", 0, 8, 3, 73, 146, 16 }, @@ -648,28 +648,28 @@ static void test_buffer_vector(const testCtx *const p_ctx) { /* 82*/ { BARCODE_ISBNX, "123456789+12345", "", 0, 50, 1, 149, 330, 118 }, /* 83*/ { BARCODE_RM4SCC, "1234567890", "", 0, 8, 3, 91, 182, 16 }, /* 84*/ { BARCODE_DATAMATRIX, "ABC", "", 0, 10, 10, 10, 20, 20 }, - /* 85*/ { BARCODE_EAN14, "1234567890123", "", 0, 50, 1, 134, 268, 116.28 }, - /* 86*/ { BARCODE_VIN, "12345678701234567", "", 0, 50, 1, 246, 492, 116.28 }, + /* 85*/ { BARCODE_EAN14, "1234567890123", "", 0, 50, 1, 134, 268, 117.920624 }, + /* 86*/ { BARCODE_VIN, "12345678701234567", "", 0, 50, 1, 246, 492, 117.920624 }, /* 87*/ { BARCODE_CODABLOCKF, "1234567890", "", 0, 20, 2, 101, 242, 44 }, - /* 88*/ { BARCODE_NVE18, "12345678901234567", "", 0, 50, 1, 156, 312, 116.28 }, + /* 88*/ { BARCODE_NVE18, "12345678901234567", "", 0, 50, 1, 156, 312, 117.920624 }, /* 89*/ { BARCODE_JAPANPOST, "1234567890", "", 0, 8, 3, 133, 266, 16 }, - /* 90*/ { BARCODE_KOREAPOST, "123456", "", 0, 50, 1, 167, 334, 116.28 }, + /* 90*/ { BARCODE_KOREAPOST, "123456", "", 0, 50, 1, 167, 334, 117.920624 }, /* 91*/ { BARCODE_DBAR_STK, "1234567890123", "", 0, 13, 3, 50, 100, 26 }, /* 92*/ { BARCODE_DBAR_OMNSTK, "1234567890123", "", 0, 69, 5, 50, 100, 138 }, /* 93*/ { BARCODE_DBAR_EXPSTK, "[01]12345678901231", "", 0, 71, 5, 102, 204, 142 }, /* 94*/ { BARCODE_PLANET, "12345678901", "", 0, 12, 2, 123, 246, 24 }, /* 95*/ { BARCODE_MICROPDF417, "1234567890", "", 0, 12, 6, 82, 164, 24 }, /* 96*/ { BARCODE_USPS_IMAIL, "12345678901234567890", "", 0, 8, 3, 129, 258, 16 }, - /* 97*/ { BARCODE_PLESSEY, "1234567890", "", 0, 50, 1, 227, 454, 116.28 }, - /* 98*/ { BARCODE_TELEPEN_NUM, "1234567890", "", 0, 50, 1, 128, 256, 116.28 }, - /* 99*/ { BARCODE_ITF14, "1234567890", "", 0, 50, 1, 135, 330, 136.28 }, + /* 97*/ { BARCODE_PLESSEY, "1234567890", "", 0, 50, 1, 227, 454, 117.920624 }, + /* 98*/ { BARCODE_TELEPEN_NUM, "1234567890", "", 0, 50, 1, 128, 256, 117.920624 }, + /* 99*/ { BARCODE_ITF14, "1234567890", "", 0, 50, 1, 135, 330, 137.920624 }, /*100*/ { BARCODE_KIX, "123456ABCDE", "", 0, 8, 3, 87, 174, 16 }, /*101*/ { BARCODE_AZTEC, "1234567890AB", "", 0, 15, 15, 15, 30, 30 }, /*102*/ { BARCODE_DAFT, "DAFTDAFTDAFTDAFT", "", 0, 8, 3, 31, 62, 16 }, - /*103*/ { BARCODE_DPD, "0123456789012345678901234567", "", 0, 50, 1, 189, 378, 122.28 }, + /*103*/ { BARCODE_DPD, "0123456789012345678901234567", "", 0, 50, 1, 189, 378, 123.920624 }, /*104*/ { BARCODE_MICROQR, "12345", "", 0, 11, 11, 11, 22, 22 }, - /*105*/ { BARCODE_HIBC_128, "1234567890", "", 0, 50, 1, 123, 246, 116.28 }, - /*106*/ { BARCODE_HIBC_39, "1234567890", "", 0, 50, 1, 223, 446, 116.28 }, + /*105*/ { BARCODE_HIBC_128, "1234567890", "", 0, 50, 1, 123, 246, 117.920624 }, + /*106*/ { BARCODE_HIBC_39, "1234567890", "", 0, 50, 1, 223, 446, 117.920624 }, /*107*/ { BARCODE_HIBC_DM, "ABC", "", 0, 12, 12, 12, 24, 24 }, /*108*/ { BARCODE_HIBC_QR, "1234567890AB", "", 0, 21, 21, 21, 42, 42 }, /*109*/ { BARCODE_HIBC_PDF, "1234567890", "", 0, 24, 8, 103, 206, 48 }, @@ -679,10 +679,10 @@ static void test_buffer_vector(const testCtx *const p_ctx) { /*113*/ { BARCODE_DOTCODE, "ABC", "", 0, 11, 11, 16, 32, 22 }, /*114*/ { BARCODE_HANXIN, "1234567890AB", "", 0, 23, 23, 23, 46, 46 }, /*115*/ { BARCODE_MAILMARK_2D, "012100123412345678AB19XY1A 0", "", 0, 24, 24, 24, 48, 48 }, - /*116*/ { BARCODE_UPU_S10, "EE876543216CA", "", 0, 50, 1, 156, 312, 116.28 }, + /*116*/ { BARCODE_UPU_S10, "EE876543216CA", "", 0, 50, 1, 156, 312, 117.920624 }, /*117*/ { BARCODE_MAILMARK_4S, "01000000000000000AA00AA0A", "", 0, 10, 3, 155, 310, 20 }, /*118*/ { BARCODE_AZRUNE, "255", "", 0, 11, 11, 11, 22, 22 }, - /*119*/ { BARCODE_CODE32, "12345678", "", 0, 50, 1, 103, 206, 116.28 }, + /*119*/ { BARCODE_CODE32, "12345678", "", 0, 50, 1, 103, 206, 117.920624 }, /*120*/ { BARCODE_EAN13_CC, "123456789012", "[20]01", 0, 50, 7, 99, 226, 118 }, /*121*/ { BARCODE_EANX_CC, "123456789012", "[20]01", 0, 50, 7, 99, 226, 118 }, /*122*/ { BARCODE_EAN13_CC, "123456789012+12", "[20]01", 0, 50, 7, 125, 276, 118 }, @@ -695,10 +695,10 @@ static void test_buffer_vector(const testCtx *const p_ctx) { /*129*/ { BARCODE_EANX_CC, "1234567+12", "[20]01", ZINT_WARN_NONCOMPLIANT, 50, 8, 98, 212, 118 }, /*130*/ { BARCODE_EAN8_CC, "1234567+12345", "[20]01", ZINT_WARN_NONCOMPLIANT, 50, 8, 125, 266, 118 }, /*131*/ { BARCODE_EANX_CC, "1234567+12345", "[20]01", ZINT_WARN_NONCOMPLIANT, 50, 8, 125, 266, 118 }, - /*132*/ { BARCODE_GS1_128_CC, "[01]12345678901231", "[20]01", 0, 50, 5, 145, 290, 116.28 }, - /*133*/ { BARCODE_DBAR_OMN_CC, "1234567890123", "[20]01", 0, 21, 5, 100, 200, 58.279999 }, - /*134*/ { BARCODE_DBAR_LTD_CC, "1234567890123", "[20]01", 0, 19, 6, 79, 158, 54.279999 }, - /*135*/ { BARCODE_DBAR_EXP_CC, "[01]12345678901231", "[20]01", 0, 41, 5, 134, 268, 98.279999 }, + /*132*/ { BARCODE_GS1_128_CC, "[01]12345678901231", "[20]01", 0, 50, 5, 145, 290, 117.920624 }, + /*133*/ { BARCODE_DBAR_OMN_CC, "1234567890123", "[20]01", 0, 21, 5, 100, 200, 59.9206238 }, + /*134*/ { BARCODE_DBAR_LTD_CC, "1234567890123", "[20]01", 0, 19, 6, 79, 158, 55.9206238 }, + /*135*/ { BARCODE_DBAR_EXP_CC, "[01]12345678901231", "[20]01", 0, 41, 5, 134, 268, 99.9206238 }, /*136*/ { BARCODE_UPCA_CC, "12345678901", "[20]01", 0, 50, 7, 99, 226, 118 }, /*137*/ { BARCODE_UPCA_CC, "12345678901+12", "[20]01", 0, 50, 7, 127, 276, 118 }, /*138*/ { BARCODE_UPCA_CC, "12345678901+12345", "[20]01", 0, 50, 7, 154, 330, 118 }, @@ -708,13 +708,13 @@ static void test_buffer_vector(const testCtx *const p_ctx) { /*142*/ { BARCODE_DBAR_STK_CC, "1234567890123", "[20]01", 0, 24, 9, 56, 112, 48 }, /*143*/ { BARCODE_DBAR_OMNSTK_CC, "1234567890123", "[20]01", 0, 80, 11, 56, 112, 160 }, /*144*/ { BARCODE_DBAR_EXPSTK_CC, "[01]12345678901231", "[20]01", 0, 78, 9, 102, 204, 156 }, - /*145*/ { BARCODE_CHANNEL, "01", "", 0, 50, 1, 19, 38, 116.28 }, + /*145*/ { BARCODE_CHANNEL, "01", "", 0, 50, 1, 19, 38, 117.920624 }, /*146*/ { BARCODE_CODEONE, "12345678901234567890", "", 0, 16, 16, 18, 36, 32 }, /*147*/ { BARCODE_GRIDMATRIX, "ABC", "", 0, 18, 18, 18, 36, 36 }, /*148*/ { BARCODE_UPNQR, "1234567890AB", "", 0, 77, 77, 77, 154, 154 }, /*149*/ { BARCODE_ULTRA, "1234567890", "", 0, 13, 13, 18, 36, 26 }, /*150*/ { BARCODE_RMQR, "12345", "", 0, 11, 11, 27, 54, 22 }, - /*151*/ { BARCODE_BC412, "1234567", "", 0, 16.666666, 1, 102, 204, 49.613335 }, + /*151*/ { BARCODE_BC412, "1234567", "", 0, 16.666666, 1, 102, 204, 51.2539597 }, /*152*/ { BARCODE_DXFILMEDGE, "120476", "", 0, 6, 2, 23, 46, 12 }, }; int data_size = ARRAY_SIZE(data); @@ -1342,21 +1342,21 @@ static void test_output_options(const testCtx *const p_ctx) { }; /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */ struct item data[] = { - /* 0*/ { BARCODE_CODE128, -1, -1, -1, -1, "A123", 0, 50, 1, 79, 158, 116.28, 0, 0, 4 }, - /* 1*/ { BARCODE_CODE128, -1, -1, 2, -1, "A123", 0, 50, 1, 79, 158, 116.28, 0, 0, 4 }, - /* 2*/ { BARCODE_CODE128, -1, -1, 2, BARCODE_BIND, "A123", 0, 50, 1, 79, 158, 124.28, 1, 0, 4 }, - /* 3*/ { BARCODE_CODE128, -1, -1, 2, BARCODE_BIND, "A123", 0, 50, 1, 79, 158, 124.28, 0, 4, 4 }, - /* 4*/ { BARCODE_CODE128, -1, -1, 2, BARCODE_BOX, "A123", 0, 50, 1, 79, 166, 124.28, 1, 4, 4 }, - /* 5*/ { BARCODE_CODE128, -1, -1, 0, BARCODE_BIND, "A123", 0, 50, 1, 79, 158, 116.28, 0, 0, 4 }, - /* 6*/ { BARCODE_CODE128, -1, -1, 0, BARCODE_BOX, "A123", 0, 50, 1, 79, 158, 116.28, 0, 4, 4 }, - /* 7*/ { BARCODE_CODE128, -1, -1, -1, -1, "A123", 0, 50, 1, 79, 158, 116.28, 0, 2, 0 }, - /* 8*/ { BARCODE_CODE128, 1, -1, -1, -1, "A123", 0, 50, 1, 79, 162, 116.28, 1, 2, 0 }, - /* 9*/ { BARCODE_CODE128, 1, 2, -1, -1, "A123", 0, 50, 1, 79, 162, 124.28, 0, 2, 0 }, - /* 10*/ { BARCODE_CODE128, 1, 2, -1, -1, "A123", 0, 50, 1, 79, 162, 124.28, 1, 2, 4 }, - /* 11*/ { BARCODE_CODE128, -1, -1, -1, -1, "A123", 0, 50, 1, 79, 158, 116.28, 0, 6, 8 }, - /* 12*/ { BARCODE_CODE128, 3, -1, 4, BARCODE_BIND, "A123", 0, 50, 1, 79, 170, 132.28, 1, 6, 8 }, - /* 13*/ { BARCODE_CODE128, 3, -1, 4, BARCODE_BIND, "A123", 0, 50, 1, 79, 170, 132.28, 0, 14, 8 }, - /* 14*/ { BARCODE_CODE128, 3, -1, 4, BARCODE_BOX, "A123", 0, 50, 1, 79, 186, 132.28, 1, 14, 8 }, + /* 0*/ { BARCODE_CODE128, -1, -1, -1, -1, "A123", 0, 50, 1, 79, 158, 117.920624, 0, 0, 4 }, + /* 1*/ { BARCODE_CODE128, -1, -1, 2, -1, "A123", 0, 50, 1, 79, 158, 117.920624, 0, 0, 4 }, + /* 2*/ { BARCODE_CODE128, -1, -1, 2, BARCODE_BIND, "A123", 0, 50, 1, 79, 158, 125.920624, 1, 0, 4 }, + /* 3*/ { BARCODE_CODE128, -1, -1, 2, BARCODE_BIND, "A123", 0, 50, 1, 79, 158, 125.920624, 0, 4, 4 }, + /* 4*/ { BARCODE_CODE128, -1, -1, 2, BARCODE_BOX, "A123", 0, 50, 1, 79, 166, 125.920624, 1, 4, 4 }, + /* 5*/ { BARCODE_CODE128, -1, -1, 0, BARCODE_BIND, "A123", 0, 50, 1, 79, 158, 117.920624, 0, 0, 4 }, + /* 6*/ { BARCODE_CODE128, -1, -1, 0, BARCODE_BOX, "A123", 0, 50, 1, 79, 158, 117.920624, 0, 4, 4 }, + /* 7*/ { BARCODE_CODE128, -1, -1, -1, -1, "A123", 0, 50, 1, 79, 158, 117.920624, 0, 2, 0 }, + /* 8*/ { BARCODE_CODE128, 1, -1, -1, -1, "A123", 0, 50, 1, 79, 162, 117.920624, 1, 2, 0 }, + /* 9*/ { BARCODE_CODE128, 1, 2, -1, -1, "A123", 0, 50, 1, 79, 162, 125.920624, 0, 2, 0 }, + /* 10*/ { BARCODE_CODE128, 1, 2, -1, -1, "A123", 0, 50, 1, 79, 162, 125.920624, 1, 2, 4 }, + /* 11*/ { BARCODE_CODE128, -1, -1, -1, -1, "A123", 0, 50, 1, 79, 158, 117.920624, 0, 6, 8 }, + /* 12*/ { BARCODE_CODE128, 3, -1, 4, BARCODE_BIND, "A123", 0, 50, 1, 79, 170, 133.920624, 1, 6, 8 }, + /* 13*/ { BARCODE_CODE128, 3, -1, 4, BARCODE_BIND, "A123", 0, 50, 1, 79, 170, 133.920624, 0, 14, 8 }, + /* 14*/ { BARCODE_CODE128, 3, -1, 4, BARCODE_BOX, "A123", 0, 50, 1, 79, 186, 133.920624, 1, 14, 8 }, /* 15*/ { BARCODE_CODE128, -1, -1, -1, BARCODE_DOTTY_MODE, "A123", ZINT_ERROR_INVALID_OPTION, -1, -1, -1, -1, -1, -1, -1, -1 }, /* 16*/ { BARCODE_QRCODE, -1, -1, -1, -1, "A123", 0, 21, 21, 21, 42, 42, 0, 0, 6 }, /* 17*/ { BARCODE_QRCODE, -1, -1, 3, -1, "A123", 0, 21, 21, 21, 42, 42, 0, 0, 6 }, @@ -1398,9 +1398,9 @@ static void test_output_options(const testCtx *const p_ctx) { /* 53*/ { BARCODE_MAXICODE, -1, -1, 30, BARCODE_BIND_TOP | BARCODE_BOX, "A123", 0, 165, 33, 30, 60, 117.733398, 1, 0, 0 }, /* BIND_TOP trumps BOX */ /* 54*/ { BARCODE_MAXICODE, -1, -1, 30, BARCODE_BIND_TOP | BARCODE_BOX, "A123", 0, 165, 33, 30, 60, 117.733398, 0, 0, 117.733398 }, /* 55*/ { BARCODE_MAXICODE, -1, -1, -1, BARCODE_DOTTY_MODE, "A123", ZINT_ERROR_INVALID_OPTION, -1, -1, -1, -1, -1, -1, -1, -1 }, - /* 56*/ { BARCODE_ITF14, -1, -1, -1, -1, "123", 0, 50, 1, 135, 330, 136.28, 1, 320, 10 }, - /* 57*/ { BARCODE_ITF14, -1, -1, 0, -1, "123", 0, 50, 1, 135, 330, 136.28, 1, 320, 10 }, - /* 58*/ { BARCODE_ITF14, -1, -1, 0, BARCODE_BOX, "123", 0, 50, 1, 135, 310, 116.28, 0, 300, 0 }, /* No zero-width/height rectangles */ + /* 56*/ { BARCODE_ITF14, -1, -1, -1, -1, "123", 0, 50, 1, 135, 330, 137.920624, 1, 320, 10 }, + /* 57*/ { BARCODE_ITF14, -1, -1, 0, -1, "123", 0, 50, 1, 135, 330, 137.920624, 1, 320, 10 }, + /* 58*/ { BARCODE_ITF14, -1, -1, 0, BARCODE_BOX, "123", 0, 50, 1, 135, 310, 117.920624, 0, 300, 0 }, /* No zero-width/height rectangles */ /* 59*/ { BARCODE_CODABLOCKF, -1, -1, -1, -1, "A123", 0, 20, 2, 101, 242, 44, 1, 20, 42 }, /* 60*/ { BARCODE_CODABLOCKF, -1, -1, -1, BARCODE_BIND_TOP, "A123", 0, 20, 2, 101, 242, 42, 0, 20, 42 }, /* 61*/ { BARCODE_CODE16K, -1, -1, -1, -1, "A123", 0, 20, 2, 70, 162, 44, 1, 0, 42 }, @@ -1849,23 +1849,23 @@ static void test_quiet_zones(const testCtx *const p_ctx) { }; /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */ struct item data[] = { - /* 0*/ { BARCODE_CODE11, -1, -1, -1, -1, "1234", "", 0, 50, 1, 62, 124, 116.28, 0, 0, 2, 100 }, - /* 1*/ { BARCODE_CODE11, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 62, 164, 116.28, 20, 0, 2, 100 }, - /* 2*/ { BARCODE_CODE11, BARCODE_QUIET_ZONES | BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 62, 124, 116.28, 0, 0, 2, 100 }, /* BARCODE_NO_QUIET_ZONES trumps BARCODE_QUIET_ZONES */ - /* 3*/ { BARCODE_C25STANDARD, -1, -1, -1, -1, "1234", "", 0, 50, 1, 57, 114, 116.28, 0, 0, 8, 100 }, - /* 4*/ { BARCODE_C25STANDARD, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 57, 154, 116.28, 20, 0, 8, 100 }, - /* 5*/ { BARCODE_C25INTER, -1, -1, -1, -1, "1234", "", 0, 50, 1, 45, 90, 116.28, 0, 0, 2, 100 }, - /* 6*/ { BARCODE_C25INTER, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 45, 130, 116.28, 20, 0, 2, 100 }, - /* 7*/ { BARCODE_C25IATA, -1, -1, -1, -1, "1234", "", 0, 50, 1, 65, 130, 116.28, 0, 0, 2, 100 }, - /* 8*/ { BARCODE_C25IATA, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 65, 170, 116.28, 20, 0, 2, 100 }, - /* 9*/ { BARCODE_C25LOGIC, -1, -1, -1, -1, "1234", "", 0, 50, 1, 49, 98, 116.28, 0, 0, 2, 100 }, - /* 10*/ { BARCODE_C25LOGIC, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 49, 138, 116.28, 20, 0, 2, 100 }, - /* 11*/ { BARCODE_C25IND, -1, -1, -1, -1, "1234", "", 0, 50, 1, 75, 150, 116.28, 0, 0, 6, 100 }, - /* 12*/ { BARCODE_C25IND, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 75, 190, 116.28, 20, 0, 6, 100 }, - /* 13*/ { BARCODE_CODE39, -1, -1, -1, -1, "1234", "", 0, 50, 1, 77, 154, 116.28, 0, 0, 2, 100 }, - /* 14*/ { BARCODE_CODE39, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 77, 194, 116.28, 20, 0, 2, 100 }, - /* 15*/ { BARCODE_EXCODE39, -1, -1, -1, -1, "1234", "", 0, 50, 1, 77, 154, 116.28, 0, 0, 2, 100 }, - /* 16*/ { BARCODE_EXCODE39, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 77, 194, 116.28, 20, 0, 2, 100 }, + /* 0*/ { BARCODE_CODE11, -1, -1, -1, -1, "1234", "", 0, 50, 1, 62, 124, 117.920624, 0, 0, 2, 100 }, + /* 1*/ { BARCODE_CODE11, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 62, 164, 117.920624, 20, 0, 2, 100 }, + /* 2*/ { BARCODE_CODE11, BARCODE_QUIET_ZONES | BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 62, 124, 117.920624, 0, 0, 2, 100 }, /* BARCODE_NO_QUIET_ZONES trumps BARCODE_QUIET_ZONES */ + /* 3*/ { BARCODE_C25STANDARD, -1, -1, -1, -1, "1234", "", 0, 50, 1, 57, 114, 117.920624, 0, 0, 8, 100 }, + /* 4*/ { BARCODE_C25STANDARD, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 57, 154, 117.920624, 20, 0, 8, 100 }, + /* 5*/ { BARCODE_C25INTER, -1, -1, -1, -1, "1234", "", 0, 50, 1, 45, 90, 117.920624, 0, 0, 2, 100 }, + /* 6*/ { BARCODE_C25INTER, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 45, 130, 117.920624, 20, 0, 2, 100 }, + /* 7*/ { BARCODE_C25IATA, -1, -1, -1, -1, "1234", "", 0, 50, 1, 65, 130, 117.920624, 0, 0, 2, 100 }, + /* 8*/ { BARCODE_C25IATA, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 65, 170, 117.920624, 20, 0, 2, 100 }, + /* 9*/ { BARCODE_C25LOGIC, -1, -1, -1, -1, "1234", "", 0, 50, 1, 49, 98, 117.920624, 0, 0, 2, 100 }, + /* 10*/ { BARCODE_C25LOGIC, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 49, 138, 117.920624, 20, 0, 2, 100 }, + /* 11*/ { BARCODE_C25IND, -1, -1, -1, -1, "1234", "", 0, 50, 1, 75, 150, 117.920624, 0, 0, 6, 100 }, + /* 12*/ { BARCODE_C25IND, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 75, 190, 117.920624, 20, 0, 6, 100 }, + /* 13*/ { BARCODE_CODE39, -1, -1, -1, -1, "1234", "", 0, 50, 1, 77, 154, 117.920624, 0, 0, 2, 100 }, + /* 14*/ { BARCODE_CODE39, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 77, 194, 117.920624, 20, 0, 2, 100 }, + /* 15*/ { BARCODE_EXCODE39, -1, -1, -1, -1, "1234", "", 0, 50, 1, 77, 154, 117.920624, 0, 0, 2, 100 }, + /* 16*/ { BARCODE_EXCODE39, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 77, 194, 117.920624, 20, 0, 2, 100 }, /* 17*/ { BARCODE_EAN13, -1, -1, -1, -1, "023456789012", "", 0, 50, 1, 95, 226, 118, 22, 0, 2, 110 }, /* 18*/ { BARCODE_EANX, -1, -1, -1, -1, "023456789012", "", 0, 50, 1, 95, 226, 118, 22, 0, 2, 110 }, /* 19*/ { BARCODE_EAN13, BARCODE_QUIET_ZONES, -1, -1, -1, "023456789012", "", 0, 50, 1, 95, 226, 118, 22, 0, 2, 110 }, @@ -1911,38 +1911,38 @@ static void test_quiet_zones(const testCtx *const p_ctx) { /* 59*/ { BARCODE_EANX, BARCODE_QUIET_ZONES, -1, -1, -1, "02", "", 0, 50, 1, 20, 50, 118, 36, 18, 4, 100 }, /* EAN-2 */ /* 60*/ { BARCODE_EAN_2ADDON, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "02", "", 0, 50, 1, 20, 40, 118, 36, 18, 4, 100 }, /* EAN-2 - only width changes */ /* 61*/ { BARCODE_EANX, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "02", "", 0, 50, 1, 20, 40, 118, 36, 18, 4, 100 }, /* EAN-2 - only width changes */ - /* 62*/ { BARCODE_GS1_128, -1, -1, -1, -1, "[20]02", "", 0, 50, 1, 68, 136, 116.28, 0, 0, 4, 100 }, - /* 63*/ { BARCODE_GS1_128, BARCODE_QUIET_ZONES, -1, -1, -1, "[20]02", "", 0, 50, 1, 68, 176, 116.28, 20, 0, 4, 100 }, - /* 64*/ { BARCODE_CODABAR, -1, -1, -1, -1, "A0B", "", 0, 50, 1, 32, 64, 116.28, 0, 0, 2, 100 }, - /* 65*/ { BARCODE_CODABAR, BARCODE_QUIET_ZONES, -1, -1, -1, "A0B", "", 0, 50, 1, 32, 104, 116.28, 20, 0, 2, 100 }, - /* 66*/ { BARCODE_CODE128, -1, -1, -1, -1, "1234", "", 0, 50, 1, 57, 114, 116.28, 0, 0, 4, 100 }, - /* 67*/ { BARCODE_CODE128, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 57, 154, 116.28, 20, 0, 4, 100 }, - /* 68*/ { BARCODE_DPLEIT, -1, -1, -1, -1, "1234", "", 0, 72, 1, 135, 270, 160.28, 0, 0, 2, 144 }, - /* 69*/ { BARCODE_DPLEIT, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 72, 1, 135, 310, 160.28, 20, 0, 2, 144 }, - /* 70*/ { BARCODE_DPIDENT, -1, -1, -1, -1, "1234", "", 0, 72, 1, 117, 234, 160.28, 0, 0, 2, 144 }, - /* 71*/ { BARCODE_DPIDENT, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 72, 1, 117, 274, 160.28, 20, 0, 2, 144 }, + /* 62*/ { BARCODE_GS1_128, -1, -1, -1, -1, "[20]02", "", 0, 50, 1, 68, 136, 117.920624, 0, 0, 4, 100 }, + /* 63*/ { BARCODE_GS1_128, BARCODE_QUIET_ZONES, -1, -1, -1, "[20]02", "", 0, 50, 1, 68, 176, 117.920624, 20, 0, 4, 100 }, + /* 64*/ { BARCODE_CODABAR, -1, -1, -1, -1, "A0B", "", 0, 50, 1, 32, 64, 117.920624, 0, 0, 2, 100 }, + /* 65*/ { BARCODE_CODABAR, BARCODE_QUIET_ZONES, -1, -1, -1, "A0B", "", 0, 50, 1, 32, 104, 117.920624, 20, 0, 2, 100 }, + /* 66*/ { BARCODE_CODE128, -1, -1, -1, -1, "1234", "", 0, 50, 1, 57, 114, 117.920624, 0, 0, 4, 100 }, + /* 67*/ { BARCODE_CODE128, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 57, 154, 117.920624, 20, 0, 4, 100 }, + /* 68*/ { BARCODE_DPLEIT, -1, -1, -1, -1, "1234", "", 0, 72, 1, 135, 270, 161.920624, 0, 0, 2, 144 }, + /* 69*/ { BARCODE_DPLEIT, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 72, 1, 135, 310, 161.920624, 20, 0, 2, 144 }, + /* 70*/ { BARCODE_DPIDENT, -1, -1, -1, -1, "1234", "", 0, 72, 1, 117, 234, 161.920624, 0, 0, 2, 144 }, + /* 71*/ { BARCODE_DPIDENT, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 72, 1, 117, 274, 161.920624, 20, 0, 2, 144 }, /* 72*/ { BARCODE_CODE16K, -1, -1, -1, -1, "1234", "", 0, 20, 2, 70, 162, 44, 20, 2, 6, 19 }, /* 73*/ { BARCODE_CODE16K, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 20, 2, 70, 162, 44, 20, 2, 6, 19 }, /* 74*/ { BARCODE_CODE16K, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 20, 2, 70, 140, 44, 0, 2, 6, 19 }, /* 75*/ { BARCODE_CODE49, -1, -1, -1, -1, "1234", "", 0, 20, 2, 70, 162, 44, 20, 2, 2, 19 }, /* 76*/ { BARCODE_CODE49, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 20, 2, 70, 162, 44, 20, 2, 2, 19 }, /* 77*/ { BARCODE_CODE49, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 20, 2, 70, 140, 44, 0, 2, 2, 19 }, - /* 78*/ { BARCODE_CODE93, -1, -1, -1, -1, "1234", "", 0, 50, 1, 73, 146, 116.28, 0, 0, 2, 100 }, - /* 79*/ { BARCODE_CODE93, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 73, 186, 116.28, 20, 0, 2, 100 }, + /* 78*/ { BARCODE_CODE93, -1, -1, -1, -1, "1234", "", 0, 50, 1, 73, 146, 117.920624, 0, 0, 2, 100 }, + /* 79*/ { BARCODE_CODE93, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 73, 186, 117.920624, 20, 0, 2, 100 }, /* 80*/ { BARCODE_FLAT, -1, -1, -1, -1, "1234", "", 0, 50, 1, 36, 72, 100, 0, 0, 2, 100 }, /* 81*/ { BARCODE_FLAT, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 36, 72, 100, 0, 0, 2, 100 }, /* 82*/ { BARCODE_FLAT, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 36, 72, 100, 0, 0, 2, 100 }, - /* 83*/ { BARCODE_DBAR_OMN, -1, -1, -1, -1, "1234", "", 0, 50, 1, 96, 192, 116.28, 2, 0, 2, 100 }, - /* 84*/ { BARCODE_DBAR_OMN, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 96, 192, 116.28, 2, 0, 2, 100 }, - /* 85*/ { BARCODE_DBAR_OMN, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 96, 192, 116.28, 2, 0, 2, 100 }, - /* 86*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, "1234", "", 0, 50, 1, 79, 158, 116.28, 2, 0, 2, 100 }, - /* 87*/ { BARCODE_DBAR_LTD, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 79, 158, 116.28, 2, 0, 2, 100 }, - /* 88*/ { BARCODE_DBAR_LTD, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 79, 158, 116.28, 2, 0, 2, 100 }, - /* 89*/ { BARCODE_DBAR_EXP, -1, -1, -1, -1, "[20]02", "", 0, 34, 1, 102, 204, 84.279999, 2, 0, 2, 68 }, - /* 90*/ { BARCODE_DBAR_EXP, BARCODE_QUIET_ZONES, -1, -1, -1, "[20]02", "", 0, 34, 1, 102, 204, 84.279999, 2, 0, 2, 68 }, - /* 91*/ { BARCODE_DBAR_EXP, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "[20]02", "", 0, 34, 1, 102, 204, 84.279999, 2, 0, 2, 68 }, - /* 92*/ { BARCODE_TELEPEN, -1, -1, -1, -1, "1234", "", 0, 50, 1, 112, 224, 116.28, 0, 0, 2, 100 }, - /* 93*/ { BARCODE_TELEPEN, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 112, 264, 116.28, 20, 0, 2, 100 }, + /* 83*/ { BARCODE_DBAR_OMN, -1, -1, -1, -1, "1234", "", 0, 50, 1, 96, 192, 117.920624, 2, 0, 2, 100 }, + /* 84*/ { BARCODE_DBAR_OMN, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 96, 192, 117.920624, 2, 0, 2, 100 }, + /* 85*/ { BARCODE_DBAR_OMN, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 96, 192, 117.920624, 2, 0, 2, 100 }, + /* 86*/ { BARCODE_DBAR_LTD, -1, -1, -1, -1, "1234", "", 0, 50, 1, 79, 158, 117.920624, 2, 0, 2, 100 }, + /* 87*/ { BARCODE_DBAR_LTD, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 79, 158, 117.920624, 2, 0, 2, 100 }, + /* 88*/ { BARCODE_DBAR_LTD, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 79, 158, 117.920624, 2, 0, 2, 100 }, + /* 89*/ { BARCODE_DBAR_EXP, -1, -1, -1, -1, "[20]02", "", 0, 34, 1, 102, 204, 85.9206238, 2, 0, 2, 68 }, + /* 90*/ { BARCODE_DBAR_EXP, BARCODE_QUIET_ZONES, -1, -1, -1, "[20]02", "", 0, 34, 1, 102, 204, 85.9206238, 2, 0, 2, 68 }, + /* 91*/ { BARCODE_DBAR_EXP, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "[20]02", "", 0, 34, 1, 102, 204, 85.9206238, 2, 0, 2, 68 }, + /* 92*/ { BARCODE_TELEPEN, -1, -1, -1, -1, "1234", "", 0, 50, 1, 112, 224, 117.920624, 0, 0, 2, 100 }, + /* 93*/ { BARCODE_TELEPEN, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 112, 264, 117.920624, 20, 0, 2, 100 }, /* 94*/ { BARCODE_UPCA, -1, -1, -1, -1, "01457137763", "", 0, 50, 1, 95, 226, 118, 18, 0, 2, 110 }, /* 95*/ { BARCODE_UPCA, BARCODE_QUIET_ZONES, -1, -1, -1, "01457137763", "", 0, 50, 1, 95, 226, 118, 18, 0, 2, 110 }, /* 96*/ { BARCODE_UPCA, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "01457137763", "", 0, 50, 1, 95, 226, 118, 18, 0, 2, 110 }, @@ -1981,16 +1981,16 @@ static void test_quiet_zones(const testCtx *const p_ctx) { /*129*/ { BARCODE_UPCE, BARCODE_NO_QUIET_ZONES, -1, -1, 0, "145713+12345", "", 0, 50, 1, 105, 210, 110, 208, 18, 2, 92 }, /* Hide text */ /*130*/ { BARCODE_POSTNET, -1, -1, -1, -1, "12345", "", 0, 12, 2, 63, 126, 24, 0, 0, 2, 24 }, /*131*/ { BARCODE_POSTNET, BARCODE_QUIET_ZONES, -1, -1, -1, "12345", "", 0, 12, 2, 63, 146, 30.4, 10, 3.2, 2, 24 }, - /*132*/ { BARCODE_MSI_PLESSEY, -1, -1, -1, -1, "1234", "", 0, 50, 1, 55, 110, 116.28, 0, 0, 4, 100 }, - /*133*/ { BARCODE_MSI_PLESSEY, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 55, 158, 116.28, 24, 0, 4, 100 }, + /*132*/ { BARCODE_MSI_PLESSEY, -1, -1, -1, -1, "1234", "", 0, 50, 1, 55, 110, 117.920624, 0, 0, 4, 100 }, + /*133*/ { BARCODE_MSI_PLESSEY, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 55, 158, 117.920624, 24, 0, 4, 100 }, /*134*/ { BARCODE_FIM, -1, -1, -1, -1, "A", "", 0, 50, 1, 17, 34, 100, 0, 0, 2, 100 }, /*135*/ { BARCODE_FIM, BARCODE_QUIET_ZONES, -1, -1, -1, "A", "", 0, 50, 1, 17, 50.955414, 100, 10.585987, 0, 2, 100 }, - /*136*/ { BARCODE_LOGMARS, -1, -1, -1, -1, "1234", "", 0, 50, 1, 95, 190, 116.28, 0, 0, 2, 100 }, - /*137*/ { BARCODE_LOGMARS, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 95, 230, 116.28, 20, 0, 2, 100 }, + /*136*/ { BARCODE_LOGMARS, -1, -1, -1, -1, "1234", "", 0, 50, 1, 95, 190, 117.920624, 0, 0, 2, 100 }, + /*137*/ { BARCODE_LOGMARS, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 95, 230, 117.920624, 20, 0, 2, 100 }, /*138*/ { BARCODE_PHARMA, -1, -1, -1, -1, "1234", "", 0, 50, 1, 38, 76, 100, 0, 0, 2, 100 }, /*139*/ { BARCODE_PHARMA, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 38, 100, 100, 12, 0, 2, 100 }, - /*140*/ { BARCODE_PZN, -1, -1, -1, -1, "1234", "", 0, 50, 1, 142, 284, 116.28, 0, 0, 2, 100 }, - /*141*/ { BARCODE_PZN, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 142, 324, 116.28, 20, 0, 2, 100 }, + /*140*/ { BARCODE_PZN, -1, -1, -1, -1, "1234", "", 0, 50, 1, 142, 284, 117.920624, 0, 0, 2, 100 }, + /*141*/ { BARCODE_PZN, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 142, 324, 117.920624, 20, 0, 2, 100 }, /*142*/ { BARCODE_PHARMA_TWO, -1, -1, -1, -1, "1234", "", 0, 10, 2, 13, 26, 20, 8, 0, 2, 10 }, /*143*/ { BARCODE_PHARMA_TWO, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 10, 2, 13, 50, 20, 20, 0, 2, 10 }, /*144*/ { BARCODE_CEPNET, -1, -1, -1, -1, "12345678", "", 0, 5.375, 2, 93, 186, 10.75, 0, 0, 2, 10.75 }, @@ -2003,8 +2003,8 @@ static void test_quiet_zones(const testCtx *const p_ctx) { /*151*/ { BARCODE_MAXICODE, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 165, 33, 30, 64, 61.733398, 31, 30.866699, 16.430941, 0 }, /*152*/ { BARCODE_QRCODE, -1, -1, -1, -1, "1234", "", 0, 21, 21, 21, 42, 42, 0, 0, 14, 2 }, /*153*/ { BARCODE_QRCODE, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 21, 21, 21, 58, 58, 8, 8, 14, 2 }, - /*154*/ { BARCODE_CODE128AB, -1, -1, -1, -1, "1234", "", 0, 50, 1, 79, 158, 116.28, 0, 0, 4, 100 }, - /*155*/ { BARCODE_CODE128AB, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 79, 198, 116.28, 20, 0, 4, 100 }, + /*154*/ { BARCODE_CODE128AB, -1, -1, -1, -1, "1234", "", 0, 50, 1, 79, 158, 117.920624, 0, 0, 4, 100 }, + /*155*/ { BARCODE_CODE128AB, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 79, 198, 117.920624, 20, 0, 4, 100 }, /*156*/ { BARCODE_AUSPOST, -1, -1, -1, -1, "12345678", "", 0, 8, 3, 73, 146, 16, 0, 0, 2, 10 }, /*157*/ { BARCODE_AUSPOST, BARCODE_QUIET_ZONES, -1, -1, -1, "12345678", "", 0, 8, 3, 73, 186, 29.333332, 20, 6.6666665, 2, 10 }, /*158*/ { BARCODE_AUSREPLY, -1, -1, -1, -1, "1234", "", 0, 8, 3, 73, 146, 16, 0, 0, 2, 10 }, @@ -2020,19 +2020,19 @@ static void test_quiet_zones(const testCtx *const p_ctx) { /*168*/ { BARCODE_RM4SCC, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 8, 3, 43, 98.283463, 28.283464, 6.1417322, 6.1417322, 2, 10 }, /*169*/ { BARCODE_DATAMATRIX, -1, -1, -1, -1, "1234", "", 0, 10, 10, 10, 20, 20, 0, 0, 2, 2 }, /*170*/ { BARCODE_DATAMATRIX, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 10, 10, 10, 24, 24, 2, 2, 2, 2 }, - /*171*/ { BARCODE_EAN14, -1, -1, -1, -1, "1234", "", 0, 50, 1, 134, 268, 116.28, 0, 0, 4, 100 }, - /*172*/ { BARCODE_EAN14, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 134, 308, 116.28, 20, 0, 4, 100 }, - /*173*/ { BARCODE_VIN, -1, -1, -1, -1, "12345678701234567", "", 0, 50, 1, 246, 492, 116.28, 0, 0, 2, 100 }, - /*174*/ { BARCODE_VIN, BARCODE_QUIET_ZONES, -1, -1, -1, "12345678701234567", "", 0, 50, 1, 246, 532, 116.28, 20, 0, 2, 100 }, + /*171*/ { BARCODE_EAN14, -1, -1, -1, -1, "1234", "", 0, 50, 1, 134, 268, 117.920624, 0, 0, 4, 100 }, + /*172*/ { BARCODE_EAN14, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 134, 308, 117.920624, 20, 0, 4, 100 }, + /*173*/ { BARCODE_VIN, -1, -1, -1, -1, "12345678701234567", "", 0, 50, 1, 246, 492, 117.920624, 0, 0, 2, 100 }, + /*174*/ { BARCODE_VIN, BARCODE_QUIET_ZONES, -1, -1, -1, "12345678701234567", "", 0, 50, 1, 246, 532, 117.920624, 20, 0, 2, 100 }, /*175*/ { BARCODE_CODABLOCKF, -1, -1, -1, -1, "1234", "", 0, 20, 2, 101, 242, 44, 20, 2, 4, 40 }, /*176*/ { BARCODE_CODABLOCKF, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 20, 2, 101, 242, 44, 20, 2, 4, 40 }, /*177*/ { BARCODE_CODABLOCKF, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 20, 2, 101, 202, 44, 0, 2, 4, 40 }, - /*178*/ { BARCODE_NVE18, -1, -1, -1, -1, "1234", "", 0, 50, 1, 156, 312, 116.28, 0, 0, 4, 100 }, - /*179*/ { BARCODE_NVE18, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 156, 352, 116.28, 20, 0, 4, 100 }, + /*178*/ { BARCODE_NVE18, -1, -1, -1, -1, "1234", "", 0, 50, 1, 156, 312, 117.920624, 0, 0, 4, 100 }, + /*179*/ { BARCODE_NVE18, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 156, 352, 117.920624, 20, 0, 4, 100 }, /*180*/ { BARCODE_JAPANPOST, -1, -1, -1, -1, "1234", "", 0, 8, 3, 133, 266, 16, 0, 0, 2, 16 }, /*181*/ { BARCODE_JAPANPOST, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 8, 3, 133, 279.33334, 29.333332, 6.6666665, 6.6666665, 2, 16 }, - /*182*/ { BARCODE_KOREAPOST, -1, -1, -1, -1, "1234", "", 0, 50, 1, 167, 334, 116.28, 8, 0, 2, 100 }, - /*183*/ { BARCODE_KOREAPOST, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 167, 374, 116.28, 28, 0, 2, 100 }, + /*182*/ { BARCODE_KOREAPOST, -1, -1, -1, -1, "1234", "", 0, 50, 1, 167, 334, 117.920624, 8, 0, 2, 100 }, + /*183*/ { BARCODE_KOREAPOST, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 167, 374, 117.920624, 28, 0, 2, 100 }, /*184*/ { BARCODE_DBAR_STK, -1, -1, -1, -1, "1234", "", 0, 13, 3, 50, 100, 26, 2, 0, 2, 10 }, /*185*/ { BARCODE_DBAR_STK, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 13, 3, 50, 100, 26, 2, 0, 2, 10 }, /*186*/ { BARCODE_DBAR_STK, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 13, 3, 50, 100, 26, 2, 0, 2, 10 }, @@ -2048,13 +2048,13 @@ static void test_quiet_zones(const testCtx *const p_ctx) { /*196*/ { BARCODE_MICROPDF417, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 22, 11, 38, 80, 48, 2, 2, 4, 4 }, /*197*/ { BARCODE_USPS_IMAIL, -1, -1, -1, -1, "12345678901234567890", "", 0, 8, 3, 129, 258, 16, 0, 0, 2, 10 }, /*198*/ { BARCODE_USPS_IMAIL, BARCODE_QUIET_ZONES, -1, -1, -1, "12345678901234567890", "", 0, 8, 3, 129, 277.5, 20.056, 9.75, 2.0280001, 2, 10 }, - /*199*/ { BARCODE_PLESSEY, -1, -1, -1, -1, "1234", "", 0, 50, 1, 131, 262, 116.28, 0, 0, 6, 100 }, - /*200*/ { BARCODE_PLESSEY, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 131, 310, 116.28, 24, 0, 6, 100 }, - /*201*/ { BARCODE_TELEPEN_NUM, -1, -1, -1, -1, "1234", "", 0, 50, 1, 80, 160, 116.28, 0, 0, 2, 100 }, - /*202*/ { BARCODE_TELEPEN_NUM, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 80, 200, 116.28, 20, 0, 2, 100 }, - /*203*/ { BARCODE_ITF14, -1, -1, -1, -1, "1234", "", 0, 50, 1, 135, 330, 136.28, 30, 10, 2, 100 }, - /*204*/ { BARCODE_ITF14, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 135, 330, 136.28, 30, 10, 2, 100 }, - /*205*/ { BARCODE_ITF14, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 135, 290, 136.28, 10, 10, 2, 100 }, + /*199*/ { BARCODE_PLESSEY, -1, -1, -1, -1, "1234", "", 0, 50, 1, 131, 262, 117.920624, 0, 0, 6, 100 }, + /*200*/ { BARCODE_PLESSEY, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 131, 310, 117.920624, 24, 0, 6, 100 }, + /*201*/ { BARCODE_TELEPEN_NUM, -1, -1, -1, -1, "1234", "", 0, 50, 1, 80, 160, 117.920624, 0, 0, 2, 100 }, + /*202*/ { BARCODE_TELEPEN_NUM, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 80, 200, 117.920624, 20, 0, 2, 100 }, + /*203*/ { BARCODE_ITF14, -1, -1, -1, -1, "1234", "", 0, 50, 1, 135, 330, 137.920624, 30, 10, 2, 100 }, + /*204*/ { BARCODE_ITF14, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 135, 330, 137.920624, 30, 10, 2, 100 }, + /*205*/ { BARCODE_ITF14, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 135, 290, 137.920624, 10, 10, 2, 100 }, /*206*/ { BARCODE_KIX, -1, -1, -1, -1, "1234", "", 0, 8, 3, 31, 62, 16, 8, 0, 2, 10 }, /*207*/ { BARCODE_KIX, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 8, 3, 31, 74.283463, 28.283464, 14.141732, 6.1417322, 2, 10 }, /*208*/ { BARCODE_AZTEC, -1, -1, -1, -1, "1234", "", 0, 15, 15, 15, 30, 30, 6, 0, 6, 2 }, @@ -2063,14 +2063,14 @@ static void test_quiet_zones(const testCtx *const p_ctx) { /*211*/ { BARCODE_DAFT, -1, -1, -1, -1, "FADT", "", 0, 8, 3, 7, 14, 16, 0, 0, 2, 16 }, /*212*/ { BARCODE_DAFT, BARCODE_QUIET_ZONES, -1, -1, -1, "FADT", "", 0, 8, 3, 7, 14, 16, 0, 0, 2, 16 }, /*213*/ { BARCODE_DAFT, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "FADT", "", 0, 8, 3, 7, 14, 16, 0, 0, 2, 16 }, - /*214*/ { BARCODE_DPD, -1, -1, -1, -1, "1234567890123456789012345678", "", 0, 50, 1, 189, 378, 122.28, 0, 6, 4, 100 }, - /*215*/ { BARCODE_DPD, BARCODE_QUIET_ZONES, -1, -1, -1, "1234567890123456789012345678", "", 0, 50, 1, 189, 428, 122.28, 25, 6, 4, 100 }, + /*214*/ { BARCODE_DPD, -1, -1, -1, -1, "1234567890123456789012345678", "", 0, 50, 1, 189, 378, 123.920624, 0, 6, 4, 100 }, + /*215*/ { BARCODE_DPD, BARCODE_QUIET_ZONES, -1, -1, -1, "1234567890123456789012345678", "", 0, 50, 1, 189, 428, 123.920624, 25, 6, 4, 100 }, /*216*/ { BARCODE_MICROQR, -1, -1, -1, -1, "1234", "", 0, 11, 11, 11, 22, 22, 0, 0, 14, 2 }, /*217*/ { BARCODE_MICROQR, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 11, 11, 11, 30, 30, 4, 4, 14, 2 }, - /*218*/ { BARCODE_HIBC_128, -1, -1, -1, -1, "1234", "", 0, 50, 1, 90, 180, 116.28, 0, 0, 4, 100 }, - /*219*/ { BARCODE_HIBC_128, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 90, 220, 116.28, 20, 0, 4, 100 }, - /*220*/ { BARCODE_HIBC_39, -1, -1, -1, -1, "1234", "", 0, 50, 1, 127, 254, 116.28, 0, 0, 2, 100 }, - /*221*/ { BARCODE_HIBC_39, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 127, 294, 116.28, 20, 0, 2, 100 }, + /*218*/ { BARCODE_HIBC_128, -1, -1, -1, -1, "1234", "", 0, 50, 1, 90, 180, 117.920624, 0, 0, 4, 100 }, + /*219*/ { BARCODE_HIBC_128, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 90, 220, 117.920624, 20, 0, 4, 100 }, + /*220*/ { BARCODE_HIBC_39, -1, -1, -1, -1, "1234", "", 0, 50, 1, 127, 254, 117.920624, 0, 0, 2, 100 }, + /*221*/ { BARCODE_HIBC_39, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 127, 294, 117.920624, 20, 0, 2, 100 }, /*222*/ { BARCODE_HIBC_DM, -1, -1, -1, -1, "1234", "", 0, 12, 12, 12, 24, 24, 0, 0, 2, 2 }, /*223*/ { BARCODE_HIBC_DM, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 12, 12, 12, 28, 28, 2, 2, 2, 2 }, /*224*/ { BARCODE_HIBC_QR, -1, -1, -1, -1, "1234", "", 0, 21, 21, 21, 42, 42, 0, 0, 14, 2 }, @@ -2091,15 +2091,15 @@ static void test_quiet_zones(const testCtx *const p_ctx) { /*239*/ { BARCODE_HANXIN, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 23, 23, 23, 58, 58, 6, 6, 14, 2 }, /*240*/ { BARCODE_MAILMARK_2D, -1, -1, -1, -1, "012100123412345678AB19XY1A 0", "", 0, 24, 24, 24, 48, 48, 0, 0, 2, 2 }, /*241*/ { BARCODE_MAILMARK_2D, BARCODE_QUIET_ZONES, -1, -1, -1, "012100123412345678AB19XY1A 0", "", 0, 24, 24, 24, 64, 64, 8, 8, 2, 2 }, - /*242*/ { BARCODE_UPU_S10, -1, -1, -1, -1, "EE876543216CA", "", 0, 50, 1, 156, 312, 116.28, 0, 0, 4, 100 }, - /*243*/ { BARCODE_UPU_S10, BARCODE_QUIET_ZONES, -1, -1, -1, "EE876543216CA", "", 0, 50, 1, 156, 352, 116.28, 20, 0, 4, 100 }, + /*242*/ { BARCODE_UPU_S10, -1, -1, -1, -1, "EE876543216CA", "", 0, 50, 1, 156, 312, 117.920624, 0, 0, 4, 100 }, + /*243*/ { BARCODE_UPU_S10, BARCODE_QUIET_ZONES, -1, -1, -1, "EE876543216CA", "", 0, 50, 1, 156, 352, 117.920624, 20, 0, 4, 100 }, /*244*/ { BARCODE_MAILMARK_4S, -1, -1, -1, -1, "01000000000000000AA00AA0A", "", 0, 10, 3, 155, 310, 20, 0, 0, 2, 20 }, /*245*/ { BARCODE_MAILMARK_4S, BARCODE_QUIET_ZONES, -1, -1, -1, "01000000000000000AA00AA0A", "", 0, 10, 3, 155, 322.28348, 32.283463, 6.1417322, 6.1417322, 2, 20 }, /*246*/ { BARCODE_AZRUNE, -1, -1, -1, -1, "123", "", 0, 11, 11, 11, 22, 22, 0, 0, 8, 2 }, /*247*/ { BARCODE_AZRUNE, BARCODE_QUIET_ZONES, -1, -1, -1, "123", "", 0, 11, 11, 11, 22, 22, 0, 0, 8, 2 }, /*248*/ { BARCODE_AZRUNE, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "123", "", 0, 11, 11, 11, 22, 22, 0, 0, 8, 2 }, - /*249*/ { BARCODE_CODE32, -1, -1, -1, -1, "1234", "", 0, 50, 1, 103, 206, 116.28, 0, 0, 2, 100 }, - /*250*/ { BARCODE_CODE32, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 103, 246, 116.28, 20, 0, 2, 100 }, + /*249*/ { BARCODE_CODE32, -1, -1, -1, -1, "1234", "", 0, 50, 1, 103, 206, 117.920624, 0, 0, 2, 100 }, + /*250*/ { BARCODE_CODE32, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 103, 246, 117.920624, 20, 0, 2, 100 }, /*251*/ { BARCODE_EAN13_CC, -1, -1, -1, -1, "023456789012", "", 0, 50, 7, 99, 226, 118, 26, 24, 2, 86 }, /*252*/ { BARCODE_EANX_CC, -1, -1, -1, -1, "023456789012", "", 0, 50, 7, 99, 226, 118, 26, 24, 2, 86 }, /*253*/ { BARCODE_EAN13_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "023456789012", "", 0, 50, 7, 99, 226, 118, 26, 24, 2, 86 }, @@ -2112,26 +2112,26 @@ static void test_quiet_zones(const testCtx *const p_ctx) { /*260*/ { BARCODE_EANX_CC, BARCODE_QUIET_ZONES, -1, -1, 0, "023456789012", "", 0, 50, 7, 99, 226, 110, 26, 24, 2, 86 }, /* Hide text */ /*261*/ { BARCODE_EAN13_CC, BARCODE_NO_QUIET_ZONES, -1, -1, 0, "023456789012", "", 0, 50, 7, 99, 198, 110, 10, 24, 2, 86 }, /* Hide text */ /*262*/ { BARCODE_EANX_CC, BARCODE_NO_QUIET_ZONES, -1, -1, 0, "023456789012", "", 0, 50, 7, 99, 198, 110, 10, 24, 2, 86 }, /* Hide text */ - /*263*/ { BARCODE_GS1_128_CC, -1, -1, -1, -1, "[20]02", "", 0, 50, 5, 99, 198, 116.28, 24, 14, 4, 86 }, /* CC-A */ - /*264*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "[20]02", "", 0, 50, 5, 99, 204, 116.28, 26, 14, 4, 86 }, - /*265*/ { BARCODE_GS1_128_CC, -1, -1, -1, -1, "[91]1", "", 0, 50, 5, 100, 200, 116.28, 20, 14, 4, 86 }, /* CC-A */ - /*266*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "[91]1", "", 0, 50, 5, 100, 222, 116.28, 22, 14, 4, 86 }, - /*267*/ { BARCODE_GS1_128_CC, -1, 2, -1, -1, "[91]1", "", 0, 50, 6, 100, 200, 116.28, 20, 18, 4, 82 }, /* CC-B */ - /*268*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, 2, -1, -1, "[91]1", "", 0, 50, 6, 100, 222, 116.28, 22, 18, 4, 82 }, - /*269*/ { BARCODE_GS1_128_CC, -1, 3, -1, -1, "[20]02", "", 0, 50, 15, 86, 172, 116.28, 14, 80, 4, 20 }, /* CC-C */ - /*270*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, 3, -1, -1, "[20]02", "", 0, 50, 15, 86, 198, 116.28, 20, 80, 4, 20 }, - /*271*/ { BARCODE_DBAR_OMN_CC, -1, -1, -1, -1, "1234", "", 0, 21, 5, 100, 200, 58.279999, 10, 14, 2, 28 }, /* CC-A */ - /*272*/ { BARCODE_DBAR_OMN_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 21, 5, 100, 202, 58.279999, 12, 14, 2, 28 }, - /*273*/ { BARCODE_DBAR_OMN_CC, -1, 2, -1, -1, "1234", "", 0, 23, 6, 100, 200, 62.279999, 10, 18, 2, 28 }, /* CC-B */ - /*274*/ { BARCODE_DBAR_OMN_CC, BARCODE_QUIET_ZONES, 2, -1, -1, "1234", "", 0, 23, 6, 100, 202, 62.279999, 12, 18, 2, 28 }, - /*275*/ { BARCODE_DBAR_LTD_CC, -1, -1, -1, -1, "1234", "", 0, 19, 6, 79, 158, 54.279999, 2, 18, 2, 20 }, /* CC-A */ - /*276*/ { BARCODE_DBAR_LTD_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 19, 6, 79, 158, 54.279999, 2, 18, 2, 20 }, /* Same */ - /*277*/ { BARCODE_DBAR_LTD_CC, -1, 2, -1, -1, "1234", "", 0, 23, 8, 88, 176, 62.279999, 20, 26, 2, 20 }, /* CC-B */ - /*278*/ { BARCODE_DBAR_LTD_CC, BARCODE_QUIET_ZONES, 2, -1, -1, "1234", "", 0, 23, 8, 88, 178, 62.279999, 22, 26, 2, 20 }, - /*279*/ { BARCODE_DBAR_EXP_CC, -1, -1, -1, -1, "[20]12", "", 0, 41, 5, 102, 204, 98.279999, 2, 14, 2, 68 }, /* CC-A */ - /*280*/ { BARCODE_DBAR_EXP_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "[20]12", "", 0, 41, 5, 102, 204, 98.279999, 2, 14, 2, 68 }, /* Same */ - /*281*/ { BARCODE_DBAR_EXP_CC, -1, 2, -1, -1, "[20]12", "", 0, 43, 6, 102, 204, 102.28, 2, 18, 2, 68 }, /* CC-B */ - /*282*/ { BARCODE_DBAR_EXP_CC, BARCODE_QUIET_ZONES, 2, -1, -1, "[20]12", "", 0, 43, 6, 102, 204, 102.28, 2, 18, 2, 68 }, /* Same */ + /*263*/ { BARCODE_GS1_128_CC, -1, -1, -1, -1, "[20]02", "", 0, 50, 5, 99, 198, 117.920624, 24, 14, 4, 86 }, /* CC-A */ + /*264*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "[20]02", "", 0, 50, 5, 99, 204, 117.920624, 26, 14, 4, 86 }, + /*265*/ { BARCODE_GS1_128_CC, -1, -1, -1, -1, "[91]1", "", 0, 50, 5, 100, 200, 117.920624, 20, 14, 4, 86 }, /* CC-A */ + /*266*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "[91]1", "", 0, 50, 5, 100, 222, 117.920624, 22, 14, 4, 86 }, + /*267*/ { BARCODE_GS1_128_CC, -1, 2, -1, -1, "[91]1", "", 0, 50, 6, 100, 200, 117.920624, 20, 18, 4, 82 }, /* CC-B */ + /*268*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, 2, -1, -1, "[91]1", "", 0, 50, 6, 100, 222, 117.920624, 22, 18, 4, 82 }, + /*269*/ { BARCODE_GS1_128_CC, -1, 3, -1, -1, "[20]02", "", 0, 50, 15, 86, 172, 117.920624, 14, 80, 4, 20 }, /* CC-C */ + /*270*/ { BARCODE_GS1_128_CC, BARCODE_QUIET_ZONES, 3, -1, -1, "[20]02", "", 0, 50, 15, 86, 198, 117.920624, 20, 80, 4, 20 }, + /*271*/ { BARCODE_DBAR_OMN_CC, -1, -1, -1, -1, "1234", "", 0, 21, 5, 100, 200, 59.9206238, 10, 14, 2, 28 }, /* CC-A */ + /*272*/ { BARCODE_DBAR_OMN_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 21, 5, 100, 202, 59.9206238, 12, 14, 2, 28 }, + /*273*/ { BARCODE_DBAR_OMN_CC, -1, 2, -1, -1, "1234", "", 0, 23, 6, 100, 200, 63.9206238, 10, 18, 2, 28 }, /* CC-B */ + /*274*/ { BARCODE_DBAR_OMN_CC, BARCODE_QUIET_ZONES, 2, -1, -1, "1234", "", 0, 23, 6, 100, 202, 63.9206238, 12, 18, 2, 28 }, + /*275*/ { BARCODE_DBAR_LTD_CC, -1, -1, -1, -1, "1234", "", 0, 19, 6, 79, 158, 55.9206238, 2, 18, 2, 20 }, /* CC-A */ + /*276*/ { BARCODE_DBAR_LTD_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 19, 6, 79, 158, 55.9206238, 2, 18, 2, 20 }, /* Same */ + /*277*/ { BARCODE_DBAR_LTD_CC, -1, 2, -1, -1, "1234", "", 0, 23, 8, 88, 176, 63.9206238, 20, 26, 2, 20 }, /* CC-B */ + /*278*/ { BARCODE_DBAR_LTD_CC, BARCODE_QUIET_ZONES, 2, -1, -1, "1234", "", 0, 23, 8, 88, 178, 63.9206238, 22, 26, 2, 20 }, + /*279*/ { BARCODE_DBAR_EXP_CC, -1, -1, -1, -1, "[20]12", "", 0, 41, 5, 102, 204, 99.9206238, 2, 14, 2, 68 }, /* CC-A */ + /*280*/ { BARCODE_DBAR_EXP_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "[20]12", "", 0, 41, 5, 102, 204, 99.9206238, 2, 14, 2, 68 }, /* Same */ + /*281*/ { BARCODE_DBAR_EXP_CC, -1, 2, -1, -1, "[20]12", "", 0, 43, 6, 102, 204, 103.920624, 2, 18, 2, 68 }, /* CC-B */ + /*282*/ { BARCODE_DBAR_EXP_CC, BARCODE_QUIET_ZONES, 2, -1, -1, "[20]12", "", 0, 43, 6, 102, 204, 103.920624, 2, 18, 2, 68 }, /* Same */ /*283*/ { BARCODE_UPCA_CC, -1, -1, -1, -1, "01457137763", "", 0, 50, 7, 99, 226, 118, 18, 20, 2, 90 }, /*284*/ { BARCODE_UPCA_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "01457137763", "", 0, 50, 7, 99, 226, 118, 18, 20, 2, 90 }, /*285*/ { BARCODE_UPCA_CC, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "01457137763", "", 0, 50, 7, 99, 226, 118, 18, 20, 2, 90 }, @@ -2156,8 +2156,8 @@ static void test_quiet_zones(const testCtx *const p_ctx) { /*304*/ { BARCODE_DBAR_EXPSTK_CC, BARCODE_QUIET_ZONES, -1, -1, -1, "[20]12", "", 0, 41, 5, 102, 204, 82, 2, 14, 2, 68 }, /* Same */ /*305*/ { BARCODE_DBAR_EXPSTK_CC, -1, 2, -1, -1, "[20]12", "", 0, 43, 6, 102, 204, 86, 2, 18, 2, 68 }, /* CC-B */ /*306*/ { BARCODE_DBAR_EXPSTK_CC, BARCODE_QUIET_ZONES, 2, -1, -1, "[20]12", "", 0, 43, 6, 102, 204, 86, 2, 18, 2, 68 }, /* Same */ - /*307*/ { BARCODE_CHANNEL, -1, -1, -1, -1, "1234", "", 0, 50, 1, 27, 54, 116.28, 0, 0, 2, 100 }, - /*308*/ { BARCODE_CHANNEL, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 27, 60, 116.28, 2, 0, 2, 100 }, + /*307*/ { BARCODE_CHANNEL, -1, -1, -1, -1, "1234", "", 0, 50, 1, 27, 54, 117.920624, 0, 0, 2, 100 }, + /*308*/ { BARCODE_CHANNEL, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 50, 1, 27, 60, 117.920624, 2, 0, 2, 100 }, /*309*/ { BARCODE_CODEONE, -1, -1, -1, -1, "1234", "", 0, 16, 16, 18, 36, 32, 0, 0, 2, 2 }, /* Versions A to H - no quiet zone */ /*310*/ { BARCODE_CODEONE, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 16, 16, 18, 36, 32, 0, 0, 2, 2 }, /*311*/ { BARCODE_CODEONE, BARCODE_NO_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 16, 16, 18, 36, 32, 0, 0, 2, 2 }, @@ -2171,8 +2171,8 @@ static void test_quiet_zones(const testCtx *const p_ctx) { /*319*/ { BARCODE_ULTRA, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 13, 13, 15, 34, 30, 2, 2, 30, 2 }, /*320*/ { BARCODE_RMQR, -1, -1, -1, -1, "1234", "", 0, 11, 11, 27, 54, 22, 0, 0, 14, 2 }, /*321*/ { BARCODE_RMQR, BARCODE_QUIET_ZONES, -1, -1, -1, "1234", "", 0, 11, 11, 27, 62, 30, 4, 4, 14, 2 }, - /*322*/ { BARCODE_BC412, -1, -1, -1, -1, "1234567", "", 0, 16.666666, 1, 102, 204, 49.613335, 0, 0, 2, 33.333336 }, - /*323*/ { BARCODE_BC412, BARCODE_QUIET_ZONES, -1, -1, -1, "1234567", "", 0, 16.666666, 1, 102, 244, 49.613335, 20, 0, 2, 33.333336 }, + /*322*/ { BARCODE_BC412, -1, -1, -1, -1, "1234567", "", 0, 16.666666, 1, 102, 204, 51.2539597, 0, 0, 2, 33.333336 }, + /*323*/ { BARCODE_BC412, BARCODE_QUIET_ZONES, -1, -1, -1, "1234567", "", 0, 16.666666, 1, 102, 244, 51.2539597, 20, 0, 2, 33.333336 }, /*324*/ { BARCODE_DXFILMEDGE, -1, -1, -1, -1, "120476", "", 0, 6, 2, 23, 46, 12, 0, 0, 10, 6 }, /*325*/ { BARCODE_DXFILMEDGE, BARCODE_QUIET_ZONES, -1, -1, -1, "120476", "", 0, 6, 2, 23, 53.2000008, 12, 3.6, 0, 10, 6 }, }; @@ -2276,35 +2276,35 @@ static void test_text_gap(const testCtx *const p_ctx) { }; /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */ struct item data[] = { - /* 0*/ { BARCODE_CODE11, -1, -1, -1, 1, 0, "1234", "", 0, 50, 1, 62, 124, 116.28, 62.0, 113.3444, -1, -1 }, /* Default */ - /* 1*/ { BARCODE_CODE11, -1, -1, -1, 0, 0, "1234", "", 0, 50, 1, 62, 124, 114.28, 62.0, 111.3444, -1, -1 }, - /* 2*/ { BARCODE_CODE11, -1, -1, -1, 0.1, 0, "1234", "", 0, 50, 1, 62, 124, 114.479996, 62.0, 111.5444, -1, -1 }, - /* 3*/ { BARCODE_CODE11, -1, -1, -1, 0.2, 0, "1234", "", 0, 50, 1, 62, 124, 114.68, 62.0, 111.7444, -1, -1 }, - /* 4*/ { BARCODE_CODE11, -1, -1, -1, 0.3, 0, "1234", "", 0, 50, 1, 62, 124, 114.88, 62.0, 111.9444, -1, -1 }, - /* 5*/ { BARCODE_CODE11, -1, -1, -1, 0.4, 0, "1234", "", 0, 50, 1, 62, 124, 115.08, 62.0, 112.1444, -1, -1 }, - /* 6*/ { BARCODE_CODE11, -1, -1, -1, 0.5, 0, "1234", "", 0, 50, 1, 62, 124, 115.28, 62.0, 112.3444, -1, -1 }, - /* 7*/ { BARCODE_CODE11, -1, -1, -1, 0.6, 0, "1234", "", 0, 50, 1, 62, 124, 115.479996, 62.0, 112.5444, -1, -1 }, - /* 8*/ { BARCODE_CODE11, -1, -1, -1, 0.7, 0, "1234", "", 0, 50, 1, 62, 124, 115.68, 62.0, 112.7444, -1, -1 }, - /* 9*/ { BARCODE_CODE11, -1, -1, -1, 0.75, 0, "1234", "", 0, 50, 1, 62, 124, 115.78, 62.0, 112.8444, -1, -1 }, - /* 10*/ { BARCODE_CODE11, -1, -1, -1, 0.8, 0, "1234", "", 0, 50, 1, 62, 124, 115.88, 62.0, 112.9444, -1, -1 }, - /* 11*/ { BARCODE_CODE11, -1, -1, -1, 0.9, 0, "1234", "", 0, 50, 1, 62, 124, 116.08, 62.0, 113.1444, -1, -1 }, - /* 12*/ { BARCODE_CODE11, -1, -1, -1, 1.1, 0, "1234", "", 0, 50, 1, 62, 124, 116.479996, 62.0, 113.5444, -1, -1 }, - /* 13*/ { BARCODE_CODE11, -1, -1, -1, 1.2, 0, "1234", "", 0, 50, 1, 62, 124, 116.68, 62.0, 113.7444, -1, -1 }, - /* 14*/ { BARCODE_CODE11, -1, -1, -1, 1.3, 0, "1234", "", 0, 50, 1, 62, 124, 116.88, 62.0, 113.9444, -1, -1 }, - /* 15*/ { BARCODE_CODE11, -1, -1, -1, 1.4, 0, "1234", "", 0, 50, 1, 62, 124, 117.08, 62.0, 114.1444, -1, -1 }, - /* 16*/ { BARCODE_CODE11, -1, -1, -1, 1.5, 0, "1234", "", 0, 50, 1, 62, 124, 117.28, 62.0, 114.3444, -1, -1 }, - /* 17*/ { BARCODE_CODE11, -1, -1, -1, 2.0, 0, "1234", "", 0, 50, 1, 62, 124, 118.28, 62.0, 115.3444, -1, -1 }, - /* 18*/ { BARCODE_CODE11, -1, -1, -1, 2.1, 0, "1234", "", 0, 50, 1, 62, 124, 118.479996, 62.0, 115.5444, -1, -1 }, - /* 19*/ { BARCODE_CODE11, -1, -1, -1, 2.6, 0, "1234", "", 0, 50, 1, 62, 124, 119.479996, 62.0, 116.5444, -1, -1 }, - /* 20*/ { BARCODE_CODE11, -1, -1, -1, 3.0, 0, "1234", "", 0, 50, 1, 62, 124, 120.28, 62.0, 117.3444, -1, -1 }, - /* 21*/ { BARCODE_CODE11, -1, -1, -1, 4.0, 0, "1234", "", 0, 50, 1, 62, 124, 122.28, 62.0, 119.3444, -1, -1 }, - /* 22*/ { BARCODE_CODE11, -1, -1, -1, 5.0, 0, "1234", "", 0, 50, 1, 62, 124, 124.28, 62.0, 121.3444, -1, -1 }, - /* 23*/ { BARCODE_CODE11, -1, -1, -1, 10.0, 0, "1234", "", 0, 50, 1, 62, 124, 134.28, 62.0, 131.3444, -1, -1 }, - /* 24*/ { BARCODE_CODE11, -1, -1, -1, -1.0, 0, "1234", "", 0, 50, 1, 62, 124, 112.28, 62.0, 109.344406, -1, -1 }, - /* 25*/ { BARCODE_CODE11, -1, -1, -1, -0.5, 0, "1234", "", 0, 50, 1, 62, 124, 113.28, 62.0, 110.344406, -1, -1 }, - /* 26*/ { BARCODE_CODE11, -1, -1, -1, 1, 3.0, "1234", "", 0, 50, 1, 62, 372, 348.84, 186.0, 340.0332, -1, -1 }, /* Scale default */ - /* 27*/ { BARCODE_CODE11, -1, -1, -1, 0, 3.0, "1234", "", 0, 50, 1, 62, 372, 342.84, 186.0, 334.0332, -1, -1 }, /* Scale */ - /* 28*/ { BARCODE_CODE11, -1, -1, -1, 0.1, 3.0, "1234", "", 0, 50, 1, 62, 372, 343.44, 186.0, 334.6332, -1, -1 }, /* Scale */ + /* 0*/ { BARCODE_CODE11, -1, -1, -1, 1, 0, "1234", "", 0, 50, 1, 62, 124, 117.920624, 62.0, 113.3444, -1, -1 }, /* Default */ + /* 1*/ { BARCODE_CODE11, -1, -1, -1, 0, 0, "1234", "", 0, 50, 1, 62, 124, 115.920624, 62.0, 111.3444, -1, -1 }, + /* 2*/ { BARCODE_CODE11, -1, -1, -1, 0.1, 0, "1234", "", 0, 50, 1, 62, 124, 116.120621, 62.0, 111.5444, -1, -1 }, + /* 3*/ { BARCODE_CODE11, -1, -1, -1, 0.2, 0, "1234", "", 0, 50, 1, 62, 124, 116.320625, 62.0, 111.7444, -1, -1 }, + /* 4*/ { BARCODE_CODE11, -1, -1, -1, 0.3, 0, "1234", "", 0, 50, 1, 62, 124, 116.520622, 62.0, 111.9444, -1, -1 }, + /* 5*/ { BARCODE_CODE11, -1, -1, -1, 0.4, 0, "1234", "", 0, 50, 1, 62, 124, 116.720627, 62.0, 112.1444, -1, -1 }, + /* 6*/ { BARCODE_CODE11, -1, -1, -1, 0.5, 0, "1234", "", 0, 50, 1, 62, 124, 116.920624, 62.0, 112.3444, -1, -1 }, + /* 7*/ { BARCODE_CODE11, -1, -1, -1, 0.6, 0, "1234", "", 0, 50, 1, 62, 124, 117.120621, 62.0, 112.5444, -1, -1 }, + /* 8*/ { BARCODE_CODE11, -1, -1, -1, 0.7, 0, "1234", "", 0, 50, 1, 62, 124, 117.320625, 62.0, 112.7444, -1, -1 }, + /* 9*/ { BARCODE_CODE11, -1, -1, -1, 0.75, 0, "1234", "", 0, 50, 1, 62, 124, 117.420624, 62.0, 112.8444, -1, -1 }, + /* 10*/ { BARCODE_CODE11, -1, -1, -1, 0.8, 0, "1234", "", 0, 50, 1, 62, 124, 117.520622, 62.0, 112.9444, -1, -1 }, + /* 11*/ { BARCODE_CODE11, -1, -1, -1, 0.9, 0, "1234", "", 0, 50, 1, 62, 124, 117.720627, 62.0, 113.1444, -1, -1 }, + /* 12*/ { BARCODE_CODE11, -1, -1, -1, 1.1, 0, "1234", "", 0, 50, 1, 62, 124, 118.120621, 62.0, 113.5444, -1, -1 }, + /* 13*/ { BARCODE_CODE11, -1, -1, -1, 1.2, 0, "1234", "", 0, 50, 1, 62, 124, 118.320625, 62.0, 113.7444, -1, -1 }, + /* 14*/ { BARCODE_CODE11, -1, -1, -1, 1.3, 0, "1234", "", 0, 50, 1, 62, 124, 118.520622, 62.0, 113.9444, -1, -1 }, + /* 15*/ { BARCODE_CODE11, -1, -1, -1, 1.4, 0, "1234", "", 0, 50, 1, 62, 124, 118.720627, 62.0, 114.1444, -1, -1 }, + /* 16*/ { BARCODE_CODE11, -1, -1, -1, 1.5, 0, "1234", "", 0, 50, 1, 62, 124, 118.920624, 62.0, 114.3444, -1, -1 }, + /* 17*/ { BARCODE_CODE11, -1, -1, -1, 2.0, 0, "1234", "", 0, 50, 1, 62, 124, 119.920624, 62.0, 115.3444, -1, -1 }, + /* 18*/ { BARCODE_CODE11, -1, -1, -1, 2.1, 0, "1234", "", 0, 50, 1, 62, 124, 120.120621, 62.0, 115.5444, -1, -1 }, + /* 19*/ { BARCODE_CODE11, -1, -1, -1, 2.6, 0, "1234", "", 0, 50, 1, 62, 124, 121.120621, 62.0, 116.5444, -1, -1 }, + /* 20*/ { BARCODE_CODE11, -1, -1, -1, 3.0, 0, "1234", "", 0, 50, 1, 62, 124, 121.920624, 62.0, 117.3444, -1, -1 }, + /* 21*/ { BARCODE_CODE11, -1, -1, -1, 4.0, 0, "1234", "", 0, 50, 1, 62, 124, 123.920624, 62.0, 119.3444, -1, -1 }, + /* 22*/ { BARCODE_CODE11, -1, -1, -1, 5.0, 0, "1234", "", 0, 50, 1, 62, 124, 125.920624, 62.0, 121.3444, -1, -1 }, + /* 23*/ { BARCODE_CODE11, -1, -1, -1, 10.0, 0, "1234", "", 0, 50, 1, 62, 124, 135.920624, 62.0, 131.3444, -1, -1 }, + /* 24*/ { BARCODE_CODE11, -1, -1, -1, -1.0, 0, "1234", "", 0, 50, 1, 62, 124, 113.920624, 62.0, 109.344406, -1, -1 }, + /* 25*/ { BARCODE_CODE11, -1, -1, -1, -0.5, 0, "1234", "", 0, 50, 1, 62, 124, 114.920624, 62.0, 110.344406, -1, -1 }, + /* 26*/ { BARCODE_CODE11, -1, -1, -1, 1, 3.0, "1234", "", 0, 50, 1, 62, 372, 353.761871, 186.0, 340.0332, -1, -1 }, /* Scale default */ + /* 27*/ { BARCODE_CODE11, -1, -1, -1, 0, 3.0, "1234", "", 0, 50, 1, 62, 372, 347.761871, 186.0, 334.0332, -1, -1 }, /* Scale */ + /* 28*/ { BARCODE_CODE11, -1, -1, -1, 0.1, 3.0, "1234", "", 0, 50, 1, 62, 372, 348.361877, 186.0, 334.6332, -1, -1 }, /* Scale */ /* 29*/ { BARCODE_UPCA, -1, -1, -1, 1, 0, "01457130763", "", 0, 50, 1, 95, 226, 118, 74.0, 117.2, -1, -1 }, /* Default */ /* 30*/ { BARCODE_UPCA, -1, -1, -1, 0, 0, "01457130763", "", 0, 50, 1, 95, 226, 116, 74.0, 115.2, -1, -1 }, /* 31*/ { BARCODE_UPCA, -1, -1, -1, 0.1, 0, "01457130763", "", 0, 50, 1, 95, 226, 116.2, 74.0, 115.4, -1, -1 }, @@ -3337,12 +3337,12 @@ static void test_hrt_content_segs(const testCtx *const p_ctx) { const char *expected_errtxt; }; static const struct item data[] = { - /* 0*/ { BARCODE_CODE128, -1, -1, BARCODE_MEMORY_FILE, "12345\00067890", 11, 0, 116.279999, 268, "12345 67890", -1, "", -1, "" }, - /* 1*/ { BARCODE_CODE128, -1, -1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "12345\00067890", 11, 0, 116.279999, 268, "12345 67890", -1, "12345\00067890", 11, "" }, - /* 2*/ { BARCODE_EXCODE39, -1, -1, BARCODE_MEMORY_FILE, "12345\00067890", 11, 0, 116.279999, 362, "12345 67890", -1, "", -1, "" }, - /* 3*/ { BARCODE_EXCODE39, -1, -1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "12345\00067890", 11, 0, 116.279999, 362, "12345 67890", -1, "12345\00067890", 11, "" }, - /* 4*/ { BARCODE_TELEPEN, -1, -1, BARCODE_MEMORY_FILE, "12345\00067890", 11, 0, 116.279999, 448, "12345 67890", -1, "", -1, "" }, - /* 5*/ { BARCODE_TELEPEN, -1, -1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "12345\00067890", 11, 0, 116.279999, 448, "12345 67890", -1, "12345\00067890n", 12, "" }, + /* 0*/ { BARCODE_CODE128, -1, -1, BARCODE_MEMORY_FILE, "12345\00067890", 11, 0, 117.920624, 268, "12345 67890", -1, "", -1, "" }, + /* 1*/ { BARCODE_CODE128, -1, -1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "12345\00067890", 11, 0, 117.920624, 268, "12345 67890", -1, "12345\00067890", 11, "" }, + /* 2*/ { BARCODE_EXCODE39, -1, -1, BARCODE_MEMORY_FILE, "12345\00067890", 11, 0, 117.920624, 362, "12345 67890", -1, "", -1, "" }, + /* 3*/ { BARCODE_EXCODE39, -1, -1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "12345\00067890", 11, 0, 117.920624, 362, "12345 67890", -1, "12345\00067890", 11, "" }, + /* 4*/ { BARCODE_TELEPEN, -1, -1, BARCODE_MEMORY_FILE, "12345\00067890", 11, 0, 117.920624, 448, "12345 67890", -1, "", -1, "" }, + /* 5*/ { BARCODE_TELEPEN, -1, -1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "12345\00067890", 11, 0, 117.920624, 448, "12345 67890", -1, "12345\00067890n", 12, "" }, /* 6*/ { BARCODE_EAN13, -1, -1, BARCODE_MEMORY_FILE, "123456789012", -1, 0, 118, 226, "1234567890128", -1, "", -1, "" }, /* 7*/ { BARCODE_EANX, -1, -1, BARCODE_MEMORY_FILE, "123456789012", -1, 0, 118, 226, "1234567890128", -1, "", -1, "" }, /* 8*/ { BARCODE_EAN13, -1, -1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "123456789012", -1, 0, 118, 226, "1234567890128", -1, "1234567890128", -1, "" }, @@ -3351,10 +3351,10 @@ static void test_hrt_content_segs(const testCtx *const p_ctx) { /* 11*/ { BARCODE_EANX, -1, -1, BARCODE_MEMORY_FILE, "123456789012+12", -1, 0, 118, 276, "1234567890128+12", -1, "", -1, "" }, /* 12*/ { BARCODE_EAN13, -1, -1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "123456789012+12", -1, 0, 118, 276, "1234567890128+12", -1, "123456789012812", -1, "" }, /* 13*/ { BARCODE_EANX, -1, -1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "123456789012+12", -1, 0, 118, 276, "1234567890128+12", -1, "123456789012812", -1, "" }, - /* 14*/ { BARCODE_CODE39, -1, -1, BARCODE_MEMORY_FILE, "ABC14", -1, 0, 116.279999, 180, "*ABC14*", -1, "", -1, "" }, - /* 15*/ { BARCODE_CODE39, -1, -1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "ABC14", -1, 0, 116.279999, 180, "*ABC14*", -1, "ABC14", -1, "" }, - /* 16*/ { BARCODE_CODE39, -1, 1, BARCODE_MEMORY_FILE, "ABC14", -1, 0, 116.279999, 206, "*ABC14_*", -1, "", -1, "" }, /* Check digit space rendered as underscore */ - /* 17*/ { BARCODE_CODE39, -1, 1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "ABC14", -1, 0, 116.279999, 206, "*ABC14_*", -1, "ABC14 ", -1, "" }, + /* 14*/ { BARCODE_CODE39, -1, -1, BARCODE_MEMORY_FILE, "ABC14", -1, 0, 117.920624, 180, "*ABC14*", -1, "", -1, "" }, + /* 15*/ { BARCODE_CODE39, -1, -1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "ABC14", -1, 0, 117.920624, 180, "*ABC14*", -1, "ABC14", -1, "" }, + /* 16*/ { BARCODE_CODE39, -1, 1, BARCODE_MEMORY_FILE, "ABC14", -1, 0, 117.920624, 206, "*ABC14_*", -1, "", -1, "" }, /* Check digit space rendered as underscore */ + /* 17*/ { BARCODE_CODE39, -1, 1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "ABC14", -1, 0, 117.920624, 206, "*ABC14_*", -1, "ABC14 ", -1, "" }, /* 18*/ { BARCODE_POSTNET, -1, -1, BARCODE_MEMORY_FILE, "12345", -1, 0, 24, 126, "", -1, "", -1, "" }, /* 19*/ { BARCODE_POSTNET, -1, -1, BARCODE_MEMORY_FILE | BARCODE_CONTENT_SEGS, "12345", -1, 0, 24, 126, "", -1, "123455", -1, "" }, /* HRT not printed */ /* 20*/ { BARCODE_POSTNET, 0, -1, BARCODE_MEMORY_FILE, "12345", -1, 0, 24, 126, "", -1, "", -1, "" }, diff --git a/backend/tests/testcommon.c b/backend/tests/testcommon.c index ea54feed..f705aa54 100644 --- a/backend/tests/testcommon.c +++ b/backend/tests/testcommon.c @@ -764,6 +764,66 @@ const char *testUtilOutputOptionsName(int output_options) { return buf; } +/* Pretty name for show HRT */ +const char *testUtilShowHRTName(int show_hrt) { + static char buf[512]; + + struct item { + const char *name; + int define; + int val; + }; + static const struct item data[] = { + { "ZINT_HRT_GRAYSCALE", ZINT_HRT_GRAYSCALE, 0x0008 }, + { "ZINT_HRT_HALIGN_LEFT", ZINT_HRT_HALIGN_LEFT, 0x0010 }, + { "ZINT_HRT_HALIGN_RIGHT", ZINT_HRT_HALIGN_RIGHT, 0x0020 }, + { "ZINT_HRT_GS1_NEWLINE", ZINT_HRT_GS1_NEWLINE, 0x0040 }, + }; + const int data_size = ARRAY_SIZE(data); + int set, i; + + if (show_hrt < 0) { + return "-1"; + } + *buf = '\0'; + if ((show_hrt & 0x07) == ZINT_HRT_DEFAULT) { + strcpy(buf, "ZINT_HRT_DEFAULT"); + set = ZINT_HRT_DEFAULT; + } else if ((show_hrt & 0x07) == ZINT_HRT_LINEAR_ALL) { + strcpy(buf, "ZINT_HRT_LINEAR_ALL"); + set = ZINT_HRT_LINEAR_ALL; + } else if ((show_hrt & 0x07) == ZINT_HRT_STACKED) { + strcpy(buf, "ZINT_HRT_STACKED"); + set = ZINT_HRT_STACKED; + } else if ((show_hrt & 0x07) == ZINT_HRT_ALL) { + strcpy(buf, "ZINT_HRT_ALL"); + set = ZINT_HRT_ALL; + } else { + set = 0; + } + for (i = 0; i < data_size; i++) { + if (data[i].define != data[i].val) { /* Self-check */ + fprintf(stderr, "testUtilShowHRTName: data table out of sync (%d)\n", i); + abort(); + } + if (show_hrt & data[i].define) { + if (*buf) { + strcat(buf, " | "); + } + strcat(buf, data[i].name); + set |= data[i].define; + } + } + if (set != show_hrt) { + fprintf(stderr, "testUtilShowHRTName: unknown show hrt %d (%d)\n", show_hrt & set, show_hrt); + abort(); + } + if (set == 0 && *buf == '\0') { + strcpy(buf, "0"); + } + return buf; +} + /* Convert modules spanning 3 rows to DAFT equivalents */ int testUtilDAFTConvert(const struct zint_symbol *symbol, char *buffer, const int buffer_size) { int i; diff --git a/backend/tests/testcommon.h b/backend/tests/testcommon.h index ddae4a93..fea81214 100644 --- a/backend/tests/testcommon.h +++ b/backend/tests/testcommon.h @@ -159,6 +159,7 @@ const char *testUtilErrorName(int error_number); const char *testUtilInputModeName(int input_mode); const char *testUtilOption3Name(int symbology, int option_3); const char *testUtilOutputOptionsName(int output_options); +const char *testUtilShowHRTName(int show_hrt); int testUtilDAFTConvert(const struct zint_symbol *symbol, char *buffer, const int buffer_size); int testUtilIsValidUTF8(const unsigned char str[], const int length); diff --git a/backend/tif.c b/backend/tif.c index 82d5d976..74c150ed 100644 --- a/backend/tif.c +++ b/backend/tif.c @@ -208,9 +208,9 @@ INTERNAL int zint_tif_pixel_plot(struct zint_symbol *symbol, const unsigned char uint16_t bits_per_sample; int samples_per_pixel; int pixels_per_sample; - unsigned char map[128]; + unsigned char map[256]; tiff_color_t color_map[256] = {{0}}; - unsigned char palette[32][5]; + unsigned char palette[256][5]; int color_map_size = 0; int extra_samples = 0; size_t free_memory; @@ -236,10 +236,14 @@ INTERNAL int zint_tif_pixel_plot(struct zint_symbol *symbol, const unsigned char int ifd_size; uint32_t temp32; uint16_t temp16; + int have_alpha; + const int grayscale = zint_out_grayscale(symbol); (void) zint_out_colour_get_rgb(symbol->fgcolour, &fg[0], &fg[1], &fg[2], &fg[3]); (void) zint_out_colour_get_rgb(symbol->bgcolour, &bg[0], &bg[1], &bg[2], &bg[3]); + have_alpha = fg[3] != 0xFF || bg[3] != 0xFF; + if (symbol->symbology == BARCODE_ULTRA) { static const unsigned char ultra_chars[8] = { 'W', 'C', 'B', 'M', 'R', 'Y', 'G', 'K' }; @@ -266,13 +270,9 @@ INTERNAL int zint_tif_pixel_plot(struct zint_symbol *symbol, const unsigned char pmi = TIF_PMI_SEPARATED; bits_per_sample = 8; - if (fg[3] == 0xff && bg[3] == 0xff) { /* If no alpha */ - samples_per_pixel = 4; - } else { - samples_per_pixel = 5; - extra_samples = 1; /* Associated alpha */ - } + samples_per_pixel = 4 + have_alpha; pixels_per_sample = 1; + extra_samples = have_alpha; /* Associated alpha */ } else { static const unsigned char ultra_rgbs[8][3] = { { 0xff, 0xff, 0xff, }, /* White */ @@ -294,7 +294,7 @@ INTERNAL int zint_tif_pixel_plot(struct zint_symbol *symbol, const unsigned char map['1'] = 9; memcpy(palette[9], fg, 4); - if (fg[3] == 0xff && bg[3] == 0xff) { /* If no alpha */ + if (!have_alpha) { pmi = TIF_PMI_PALETTE_COLOR; for (i = 0; i < 10; i++) { tif_to_color_map(palette[i], &color_map[i]); @@ -311,6 +311,53 @@ INTERNAL int zint_tif_pixel_plot(struct zint_symbol *symbol, const unsigned char extra_samples = 1; /* Associated alpha */ } } + } else if (grayscale) { /* Anti-aliased */ + if (symbol->output_options & CMYK_COLOUR) { + int diff_cyan, diff_magenta, diff_yellow, diff_black, diff_alpha; + + tif_to_cmyk(symbol->bgcolour, palette[0]); + tif_to_cmyk(symbol->fgcolour, palette[0xFF]); + + diff_cyan = palette[0xFF][0] - palette[0][0]; + diff_magenta = palette[0xFF][1] - palette[0][1]; + diff_yellow = palette[0xFF][2] - palette[0][2]; + diff_black = palette[0xFF][3] - palette[0][3]; + diff_alpha = palette[0xFF][4] - palette[0][4]; + for (i = 1; i < 0xFF; i++) { + palette[i][0] = palette[0][0] + (diff_cyan * i) / 100.0f; + palette[i][1] = palette[0][1] + (diff_magenta * i) / 100.0f; + palette[i][2] = palette[0][2] + (diff_yellow * i) / 100.0f; + palette[i][3] = palette[0][3] + (diff_black * i) / 100.0f; + if (have_alpha) { + palette[i][4] = palette[0][4] + (diff_alpha * i) / 100.0f; + } + map[i] = i; + } + pmi = TIF_PMI_SEPARATED; + bits_per_sample = 8; + samples_per_pixel = 4 + have_alpha; + pixels_per_sample = 1; + extra_samples = have_alpha; /* Associated alpha */ + } else { + const int diff_red = fg[0] - bg[0]; + const int diff_green = fg[1] - bg[1]; + const int diff_blue = fg[2] - bg[2]; + const int diff_alpha = fg[3] - bg[3]; + for (i = 0; i <= 0xFF; i++) { + palette[i][0] = bg[0] + (diff_red * i) / 0xFF; + palette[i][1] = bg[1] + (diff_green * i) / 0xFF; + palette[i][2] = bg[2] + (diff_blue * i) / 0xFF; + if (have_alpha) { + palette[i][3] = bg[3] + (diff_alpha * i) / 0xFF; + } + map[i] = i; + } + pmi = TIF_PMI_RGB; + bits_per_sample = 8; + samples_per_pixel = 3 + have_alpha; + pixels_per_sample = 1; + extra_samples = have_alpha; /* Associated alpha */ + } } else { /* fg/bg only */ if (symbol->output_options & CMYK_COLOUR) { map['0'] = 0; @@ -320,13 +367,9 @@ INTERNAL int zint_tif_pixel_plot(struct zint_symbol *symbol, const unsigned char pmi = TIF_PMI_SEPARATED; bits_per_sample = 8; - if (fg[3] == 0xff && bg[3] == 0xff) { /* If no alpha */ - samples_per_pixel = 4; - } else { - samples_per_pixel = 5; - extra_samples = 1; /* Associated alpha */ - } + samples_per_pixel = 4 + have_alpha; pixels_per_sample = 1; + extra_samples = have_alpha; /* Associated alpha */ } else if (bg[0] == 0xff && bg[1] == 0xff && bg[2] == 0xff && bg[3] == 0xff && fg[0] == 0 && fg[1] == 0 && fg[2] == 0 && fg[3] == 0xff) { map['0'] = 0; @@ -355,7 +398,7 @@ INTERNAL int zint_tif_pixel_plot(struct zint_symbol *symbol, const unsigned char for (i = 0; i < 2; i++) { tif_to_color_map(palette[i], &color_map[i]); } - if (fg[3] == 0xff && bg[3] == 0xff) { /* If no alpha */ + if (!have_alpha) { bits_per_sample = 4; samples_per_pixel = 1; pixels_per_sample = 2; diff --git a/backend/vector.c b/backend/vector.c index 62388168..f338ccb8 100644 --- a/backend/vector.c +++ b/backend/vector.c @@ -35,6 +35,7 @@ #include "common.h" #include "output.h" #include "zfiletypes.h" +#include "zfont.h" #ifdef ZINT_TEST /* For testing `malloc()` failure */ @@ -460,34 +461,28 @@ INTERNAL int zint_plot_vector(struct zint_symbol *symbol, int rotate_angle, int int hide_text; int i, r; int block_width = 0; - int font_height; /* Font pixel size (so whole integers) */ + float font_height; /* Font height divided by 2 (will be multiplied by 2-pixel `symbol->scale`) */ float text_gap; /* Gap between barcode and text */ float guard_descent; float large_bar_height; + struct zfont zfnt_s; + struct zfont *const zfnt = &zfnt_s; const int upcean_guard_whitespace = !(symbol->output_options & BARCODE_NO_QUIET_ZONES) && (symbol->output_options & EANUPC_GUARD_WHITESPACE); const int is_codablockf = symbol->symbology == BARCODE_CODABLOCKF || symbol->symbology == BARCODE_HIBC_BLOCKF; const int no_extend = is_codablockf || symbol->symbology == BARCODE_DPD; int xoffset_comp; - const float descent = 1.32779717f; /* Arimo value for normal text (font height 7) */ - const float descent_small = 0.948426545f; /* Arimo value for SMALL_TEXT (font height 5) */ /* For UPC/EAN only */ float addon_min_row_height = 0.0f; float addon_row_yposn = 0.0f; /* Suppress gcc -Wmaybe-uninitialized false positive */ float addon_row_height = 0.0f; /* Ditto */ - int upcae_outside_font_height = 0; /* UPC-A/E outside digits font size */ const float gws_left_fudge = 0.5f; /* These make the guard whitespaces appear closer to the edge for SVG/qzint */ const float gws_right_fudge = 0.5f; /* (undone by EMF/EPS) */ - /* Note using "ascender" to mean height above digits as "ascent" usually measured from baseline */ - const float digit_ascender_factor = 0.22f; /* Assuming digit ascender height roughly 22% of font size */ - float digit_ascender = 0.0f; /* Avoid gcc -Wmaybe-uninitialized */ - const float antialias_fudge_factor = 0.02f; - float antialias_fudge = 0.0f; /* Avoid gcc -Wmaybe-uninitialized */ - float text_gap_antialias; int rect_count = 0, last_row_start = 0; /* For UPC/EAN guard bars */ + float text_gap_antialias; float dot_overspill = 0.0f; float dot_offset = 0.0f; float yposn; @@ -544,7 +539,11 @@ INTERNAL int zint_plot_vector(struct zint_symbol *symbol, int rotate_angle, int main_width -= comp_xoffset + comp_roffset; } - hide_text = !symbol->show_hrt || symbol->text_length == 0; + hide_text = !(symbol->show_hrt & 0x7) || symbol->text_length == 0; + + if ((error_number = zint_font_init(zfnt, symbol, upceanflag))) { + return error_number; + } zint_out_set_whitespace_offsets(symbol, hide_text, comp_xoffset, &xoffset, &yoffset, &roffset, &boffset, &qz_right, 0 /*scaler*/, NULL, NULL, NULL, NULL, NULL); @@ -557,33 +556,28 @@ INTERNAL int zint_plot_vector(struct zint_symbol *symbol, int rotate_angle, int /* Offset (1 - dot_size) / 2 + dot_radius == (1 - dot_size + dot_size) / 2 == 1 / 2 */ dot_offset = 0.5f; } else { /* Allow for exceeding 1X */ - dot_overspill = symbol->dot_size - 1.0f + 0.1f; /* Fudge for anti-aliasing */ - dot_offset = symbol->dot_size / 2.0f + 0.05f; /* Fudge for anti-aliasing */ + dot_overspill = z_stripf(symbol->dot_size - 1.0f + 0.1f); /* Fudge for anti-aliasing */ + dot_offset = z_stripf(symbol->dot_size / 2.0f + 0.05f); /* Fudge for anti-aliasing */ } } vector->width = symbol->width + dot_overspill + (xoffset + roffset); - /* Note font sizes scaled by 2 so really twice these values */ + if ((error_number = zint_font_text_height(zfnt, symbol, 0 /*si*/, vector->width * 2.0f, addon, addon_len))) { + goto errexit; + } + font_height = zfnt->font_height / 2.0f; + if (upceanflag) { - /* Note BOLD_TEXT ignored for UPCEAN by svg/emf/ps/qzint */ - font_height = symbol->output_options & SMALL_TEXT ? 7 : 10; - digit_ascender = font_height * digit_ascender_factor; - antialias_fudge = font_height * antialias_fudge_factor; - /* Although font size 7 (for normal) seems small it meets GS1 General Spec (GGS) Section 5.2.5: - "the size of the first and last digits should be reduced to a maximum width equivalent to four modules" */ - upcae_outside_font_height = symbol->output_options & SMALL_TEXT ? 6 : 7; /* Note default now 1.0 (GGS 5.2.5 "Normally the minimum is one module") but was 0.5 (absolute minimum) */ - text_gap = symbol->text_gap - digit_ascender; + text_gap = symbol->text_gap - zfnt->digit_ascender; /* Guard bar height (none for EAN-2 and EAN-5) */ - guard_descent = upceanflag >= 6 ? symbol->guard_descent : 0.0f; + guard_descent = upceanflag >= OUT_UPCEANFLAG_UPCE ? symbol->guard_descent : 0.0f; } else { - font_height = symbol->output_options & SMALL_TEXT ? 5 : 7; - antialias_fudge = font_height * antialias_fudge_factor; text_gap = symbol->text_gap; guard_descent = 0.0f; } - text_gap_antialias = z_stripf(text_gap + antialias_fudge); + text_gap_antialias = z_stripf(text_gap + zfnt->antialias_fudge); if (hide_text) { textoffset = guard_descent; @@ -591,14 +585,14 @@ INTERNAL int zint_plot_vector(struct zint_symbol *symbol, int rotate_angle, int textoffset = font_height + text_gap_antialias - large_bar_height; } } else { - textoffset = font_height + text_gap_antialias; + textoffset = z_stripf(zfnt->text_height + text_gap_antialias); if (upceanflag && textoffset < guard_descent) { textoffset = guard_descent; } } if (addon_len && large_bar_height + textoffset - (font_height + text_gap_antialias) < 1.0f) { - addon_min_row_height = 1.0f - (large_bar_height + textoffset - (font_height + text_gap_antialias)); + addon_min_row_height = z_stripf(1.0f - (large_bar_height + textoffset - (font_height + text_gap_antialias))); assert(addon_min_row_height <= 1.0f); /* Due to checks above */ } @@ -630,15 +624,15 @@ INTERNAL int zint_plot_vector(struct zint_symbol *symbol, int rotate_angle, int if (!vector_add_circle(symbol, bull_x, bull_y, hex_ydiameter + bull_d_incr * 5 - bull_width, bull_width, &last_circle)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } if (!vector_add_circle(symbol, bull_x, bull_y, hex_ydiameter + bull_d_incr * 3 - bull_width, bull_width, &last_circle)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } if (!vector_add_circle(symbol, bull_x, bull_y, hex_ydiameter + bull_d_incr - bull_width, bull_width, &last_circle)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } /* Hexagons */ @@ -650,7 +644,7 @@ INTERNAL int zint_plot_vector(struct zint_symbol *symbol, int rotate_angle, int if (z_module_is_set(symbol, r, i)) { const float hex_xposn = i * hex_diameter + xposn_offset; if (!vector_add_hexagon(symbol, hex_xposn, hex_yposn, hex_diameter, &last_hexagon)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } } } @@ -662,7 +656,7 @@ INTERNAL int zint_plot_vector(struct zint_symbol *symbol, int rotate_angle, int if (z_module_is_set(symbol, r, i)) { if (!vector_add_circle(symbol, i + dot_offset + xoffset, r + dot_offset + yoffset, symbol->dot_size, 0 /*diameter*/, &last_circle)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } } } @@ -680,7 +674,7 @@ INTERNAL int zint_plot_vector(struct zint_symbol *symbol, int rotate_angle, int if (fill) { /* a colour block */ if (!vector_add_rect(symbol, i + xoffset, yposn, block_width, row_height, &last_rect)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } last_rect->colour = z_module_colour_is_set(symbol, r, i); } @@ -688,7 +682,8 @@ INTERNAL int zint_plot_vector(struct zint_symbol *symbol, int rotate_angle, int yposn += row_height; } - } else if (upceanflag >= 6) { /* UPC-E, EAN-8, UPC-A, EAN-13 */ + /* UPC-E, EAN-8, UPC-A, EAN-13 */ + } else if (upceanflag >= OUT_UPCEANFLAG_UPCE) { yposn = yoffset; for (r = 0; r < symbol->rows; r++) { const float row_height = symbol->row_height[r] ? symbol->row_height[r] : large_bar_height; @@ -700,7 +695,7 @@ INTERNAL int zint_plot_vector(struct zint_symbol *symbol, int rotate_angle, int && z_module_is_set(symbol, r, i + block_width) == fill; block_width++); if (r == symbol->rows - 1 && i > main_width && addon_latch == 0) { - addon_text_yposn = yposn + font_height - digit_ascender; + addon_text_yposn = yposn + font_height - zfnt->digit_ascender; assert(addon_text_yposn >= 0.0f); addon_row_yposn = yposn + font_height + text_gap_antialias; addon_row_height = row_height - (addon_row_yposn - yposn); @@ -717,11 +712,11 @@ INTERNAL int zint_plot_vector(struct zint_symbol *symbol, int rotate_angle, int if (addon_latch) { if (!vector_add_rect(symbol, i + xoffset, addon_row_yposn, block_width, addon_row_height, &last_rect)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } } else { if (!vector_add_rect(symbol, i + xoffset, yposn, block_width, row_height, &last_rect)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } } rect_count++; @@ -731,6 +726,7 @@ INTERNAL int zint_plot_vector(struct zint_symbol *symbol, int rotate_angle, int } } else { + assert(!upceanflag || upceanflag == OUT_UPCEANFLAG_EAN2 || upceanflag == OUT_UPCEANFLAG_EAN5); yposn = yoffset; if (upceanflag && !hide_text) { /* EAN-2, EAN-5 (standalone add-ons) */ yposn += font_height + text_gap_antialias; @@ -745,7 +741,7 @@ INTERNAL int zint_plot_vector(struct zint_symbol *symbol, int rotate_angle, int if (fill) { /* a bar */ if (!vector_add_rect(symbol, i + xoffset, yposn, block_width, row_height, &last_rect)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } if (i == 0) { first_row_rects[r] = last_rect; @@ -756,9 +752,9 @@ INTERNAL int zint_plot_vector(struct zint_symbol *symbol, int rotate_angle, int } } - if (guard_descent && upceanflag >= 6) { /* UPC-E, EAN-8, UPC-A, EAN-13 */ - /* Guard bar extension */ - if (upceanflag == 6) { /* UPC-E */ + /* Guard bar extension UPC-E, EAN-8, UPC-A, EAN-13 */ + if (guard_descent && upceanflag >= OUT_UPCEANFLAG_UPCE) { + if (upceanflag == OUT_UPCEANFLAG_UPCE) { i = 0; for (rect = symbol->vector->rectangles; rect != NULL; rect = rect->next) { switch (i - last_row_start) { @@ -772,7 +768,7 @@ INTERNAL int zint_plot_vector(struct zint_symbol *symbol, int rotate_angle, int } i++; } - } else if (upceanflag == 8) { /* EAN-8 */ + } else if (upceanflag == OUT_UPCEANFLAG_EAN8) { i = 0; for (rect = symbol->vector->rectangles; rect != NULL; rect = rect->next) { switch (i - last_row_start) { @@ -787,7 +783,7 @@ INTERNAL int zint_plot_vector(struct zint_symbol *symbol, int rotate_angle, int } i++; } - } else if (upceanflag == 12) { /* UPC-A */ + } else if (upceanflag == OUT_UPCEANFLAG_UPCA) { i = 0; for (rect = symbol->vector->rectangles; rect != NULL; rect = rect->next) { switch (i - last_row_start) { @@ -806,7 +802,8 @@ INTERNAL int zint_plot_vector(struct zint_symbol *symbol, int rotate_angle, int } i++; } - } else { /* EAN-13 */ + } else { + assert(upceanflag == OUT_UPCEANFLAG_EAN13); i = 0; for (rect = symbol->vector->rectangles; rect != NULL; rect = rect->next) { switch (i - last_row_start) { @@ -829,86 +826,89 @@ INTERNAL int zint_plot_vector(struct zint_symbol *symbol, int rotate_angle, int if (!hide_text) { float textwidth; - if (upceanflag >= 6) { /* UPC-E, EAN-8, UPC-A, EAN-13 */ + /* UPC-E, EAN-8, UPC-A, EAN-13 */ + if (upceanflag >= OUT_UPCEANFLAG_UPCE) { - float text_yposn = yoffset + symbol->height + font_height + text_gap - antialias_fudge; /* Baseline */ + /* Baseline */ + float text_yposn = yoffset + symbol->height + font_height + text_gap - zfnt->antialias_fudge; if (symbol->border_width > 0 && (symbol->output_options & (BARCODE_BOX | BARCODE_BIND)) && !(symbol->output_options & BARCODE_BIND_TOP)) { /* Trumps BARCODE_BOX & BARCODE_BIND */ text_yposn += symbol->border_width; } - if (upceanflag == 6) { /* UPC-E */ + if (upceanflag == OUT_UPCEANFLAG_UPCE) { float text_xposn = -(5.0f - 0.35f) + xoffset_comp; textwidth = 6.2f; - if (!vector_add_string(symbol, symbol->text, 1, text_xposn, text_yposn, upcae_outside_font_height, - textwidth, 2 /*right align*/, &last_string)) { - return ZINT_ERROR_MEMORY; + if (!vector_add_string(symbol, symbol->text, 1, text_xposn, text_yposn, + zfnt->upco_font_height / 2.0f, textwidth, 2 /*right align*/, + &last_string)) { + goto errmemexit; } text_xposn = (24.0f + 0.5f) + xoffset_comp; 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; + goto errmemexit; } /* 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; + if (!vector_add_string(symbol, symbol->text + 7, 1, text_xposn, text_yposn, + zfnt->upco_font_height / 2.0f, textwidth, 1 /*left align*/, &last_string)) { + goto errmemexit; } if (addon_len) { text_xposn = (addon_len == 2 ? 61.0f : 75.0f) + xoffset_comp + addon_gap; textwidth = addon_len * 8.5f; if (!vector_add_string(symbol, addon, addon_len, text_xposn, addon_text_yposn, font_height, textwidth, 0 /*centre align*/, &last_string)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } if (upcean_guard_whitespace) { text_xposn = symbol->width + gws_right_fudge + qz_right + xoffset; textwidth = 8.5f; if (!vector_add_string(symbol, (const unsigned char *) ">", 1, text_xposn, addon_text_yposn, font_height, textwidth, 2 /*right align*/, &last_string)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } } } - } else if (upceanflag == 8) { /* EAN-8 */ + } else if (upceanflag == OUT_UPCEANFLAG_EAN8) { float text_xposn; if (upcean_guard_whitespace) { text_xposn = -7.0f - gws_left_fudge + xoffset_comp; textwidth = 8.5f; if (!vector_add_string(symbol, (const unsigned char *) "<", 1, text_xposn, text_yposn, font_height, textwidth, 1 /*left align*/, &last_string)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } } text_xposn = (17.0f + 0.5f) + xoffset_comp; textwidth = 4.0f * 8.5f; if (!vector_add_string(symbol, symbol->text, 4, text_xposn, text_yposn, font_height, textwidth, 0 /*centre align*/, &last_string)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } text_xposn = (50.0f - 0.5f) + xoffset_comp; if (!vector_add_string(symbol, symbol->text + 4, 4, text_xposn, text_yposn, font_height, textwidth, 0 /*centre align*/, &last_string)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } if (addon_len) { text_xposn = (addon_len == 2 ? 77.0f : 91.0f) + xoffset_comp + addon_gap; textwidth = addon_len * 8.5f; if (!vector_add_string(symbol, addon, addon_len, text_xposn, addon_text_yposn, font_height, textwidth, 0 /*centre align*/, &last_string)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } if (upcean_guard_whitespace) { text_xposn = symbol->width + gws_right_fudge + qz_right + xoffset; textwidth = 8.5f; if (!vector_add_string(symbol, (const unsigned char *) ">", 1, text_xposn, addon_text_yposn, font_height, textwidth, 2 /*right align*/, &last_string)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } } } else if (upcean_guard_whitespace) { @@ -916,84 +916,87 @@ INTERNAL int zint_plot_vector(struct zint_symbol *symbol, int rotate_angle, int textwidth = 8.5f; if (!vector_add_string(symbol, (const unsigned char *) ">", 1, text_xposn, text_yposn, font_height, textwidth, 2 /*right align*/, &last_string)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } } - } else if (upceanflag == 12) { /* UPC-A */ + } else if (upceanflag == OUT_UPCEANFLAG_UPCA) { float text_xposn = -(5.0f - 0.35f) + xoffset_comp; textwidth = 6.2f; - if (!vector_add_string(symbol, symbol->text, 1, text_xposn, text_yposn, upcae_outside_font_height, - textwidth, 2 /*right align*/, &last_string)) { - return ZINT_ERROR_MEMORY; + if (!vector_add_string(symbol, symbol->text, 1, text_xposn, text_yposn, + zfnt->upco_font_height / 2.0f, textwidth, 2 /*right align*/, + &last_string)) { + goto errmemexit; } text_xposn = 28.0f + xoffset_comp; textwidth = 5.0f * 8.5f; if (!vector_add_string(symbol, symbol->text + 1, 5, text_xposn, text_yposn, font_height, textwidth, 0 /*centre align*/, &last_string)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } 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; + goto errmemexit; } /* 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)) { - return ZINT_ERROR_MEMORY; + zfnt->upco_font_height / 2.0f, textwidth, 1 /*left align*/, &last_string)) { + goto errmemexit; } if (addon_len) { text_xposn = (addon_len == 2 ? 105.0f : 119.0f) + xoffset_comp + addon_gap; textwidth = addon_len * 8.5f; if (!vector_add_string(symbol, addon, addon_len, text_xposn, addon_text_yposn, font_height, textwidth, 0 /*centre align*/, &last_string)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } if (upcean_guard_whitespace) { text_xposn = symbol->width + gws_right_fudge + qz_right + xoffset; textwidth = 8.5f; if (!vector_add_string(symbol, (const unsigned char *) ">", 1, text_xposn, addon_text_yposn, font_height, textwidth, 2 /*right align*/, &last_string)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } } } - } else { /* EAN-13 */ + /* EAN-13 */ + } else { float text_xposn = -(5.0f - 0.1f) + xoffset_comp; + assert(upceanflag == OUT_UPCEANFLAG_EAN13); textwidth = 8.5f; if (!vector_add_string(symbol, symbol->text, 1, text_xposn, text_yposn, font_height, textwidth, 2 /*right align*/, &last_string)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } text_xposn = (24.0f + 0.5f) + xoffset_comp; 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; + goto errmemexit; } text_xposn = (71.0f - 0.5f) + xoffset_comp; if (!vector_add_string(symbol, symbol->text + 7, 6, text_xposn, text_yposn, font_height, textwidth, 0 /*centre align*/, &last_string)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } if (addon_len) { text_xposn = (addon_len == 2 ? 105.0f : 119.0f) + xoffset_comp + addon_gap; textwidth = addon_len * 8.5f; if (!vector_add_string(symbol, addon, addon_len, text_xposn, addon_text_yposn, font_height, textwidth, 0 /*centre align*/, &last_string)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } if (upcean_guard_whitespace) { text_xposn = symbol->width + gws_right_fudge + qz_right + xoffset; textwidth = 8.5f; if (!vector_add_string(symbol, (const unsigned char *) ">", 1, text_xposn, addon_text_yposn, font_height, textwidth, 2 /*right align*/, &last_string)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } } } else if (upcean_guard_whitespace) { @@ -1001,15 +1004,17 @@ INTERNAL int zint_plot_vector(struct zint_symbol *symbol, int rotate_angle, int textwidth = 8.5f; if (!vector_add_string(symbol, (const unsigned char *) ">", 1, text_xposn, text_yposn, font_height, textwidth, 2 /*right align*/, &last_string)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } } } - } else if (upceanflag) { /* EAN-2, EAN-5 (standalone add-ons) */ + /* EAN-2, EAN-5 (standalone add-ons) */ + } else if (upceanflag) { /* Put at top (and centered) */ float text_xposn = main_width / 2.0f + xoffset; - float text_yposn = yoffset + font_height - digit_ascender; + float text_yposn = yoffset + font_height - zfnt->digit_ascender; + assert(upceanflag == OUT_UPCEANFLAG_EAN2 || upceanflag == OUT_UPCEANFLAG_EAN5); if (symbol->border_width > 0 && (symbol->output_options & (BARCODE_BOX | BARCODE_BIND | BARCODE_BIND_TOP))) { text_yposn -= symbol->border_width; @@ -1021,33 +1026,57 @@ INTERNAL int zint_plot_vector(struct zint_symbol *symbol, int rotate_angle, int textwidth = addon_len * 8.5f; if (!vector_add_string(symbol, symbol->text, addon_len, text_xposn, text_yposn, font_height, textwidth, 0 /*centre align*/, &last_string)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } if (upcean_guard_whitespace) { text_xposn = symbol->width + gws_right_fudge + qz_right + xoffset; textwidth = 8.5f; if (!vector_add_string(symbol, (const unsigned char *) ">", 1, text_xposn, text_yposn, font_height, textwidth, 2 /*right align*/, &last_string)) { - return ZINT_ERROR_MEMORY; + goto errmemexit; } } + /* Non-EAN/UPC */ } else { /* Put normal human readable text at the bottom (and centered) */ - float text_xposn = main_width / 2.0f + xoffset_comp; + const int halign = symbol->show_hrt & ZINT_HRT_HALIGN_LEFT + ? OUT_HALIGN_LEFT : symbol->show_hrt & ZINT_HRT_HALIGN_RIGHT + ? OUT_HALIGN_RIGHT : OUT_HALIGN_CENTRE; + const float max_width = zfnt->max_line_width / 2.0f; + float text_xposn = 0.0f; float text_yposn = yoffset + symbol->height + font_height + text_gap; /* Calculated to bottom of text */ - text_yposn -= symbol->output_options & SMALL_TEXT ? descent_small : descent; + assert(!upceanflag); + if (max_width < vector->width) { + if (halign == OUT_HALIGN_LEFT) { + text_xposn = max_width > main_width + xoffset_comp ? 0.0f : xoffset_comp; + } else if (halign == OUT_HALIGN_RIGHT) { + text_xposn = max_width > main_width + roffset ? max_width : main_width + xoffset_comp; + } + } + text_yposn -= zfnt->descent_adj / 2.0f; if (symbol->border_width > 0 && (symbol->output_options & (BARCODE_BOX | BARCODE_BIND)) && !(symbol->output_options & BARCODE_BIND_TOP)) { /* Trumps BARCODE_BOX & BARCODE_BIND */ text_yposn += symbol->border_width; } - if (!vector_add_string(symbol, symbol->text, -1, text_xposn, text_yposn, font_height, symbol->width, 0, - &last_string)) { - return ZINT_ERROR_MEMORY; + for (i = 0; i < zfnt->lines; i++) { + const int idx = zfnt->line_idxs[i]; + const int len = zfnt->line_idxs[i + 1] - idx; + if (halign == OUT_HALIGN_CENTRE && max_width < vector->width) { + text_xposn = main_width > zfnt->line_widths[i] / 2.0f + ? main_width / 2.0f + xoffset_comp : vector->width / 2.0f; + } + if (!vector_add_string(symbol, symbol->text + idx, len, text_xposn, text_yposn, font_height, + symbol->width, halign, &last_string)) { + goto errmemexit; + } + text_yposn += zfnt->line_advance / 2.0f; } } } + zint_font_free(zfnt, 0 /*si*/); + /* Separator binding for stacked barcodes */ if ((symbol->output_options & BARCODE_BIND) && symbol->rows > 1 && z_is_bindable(symbol->symbology)) { float sep_xoffset = xoffset; @@ -1105,7 +1134,7 @@ INTERNAL int zint_plot_vector(struct zint_symbol *symbol, int rotate_angle, int if (horz_outside) { ybind_top = 0; ybind_bot = vector->height - symbol->border_width; - } else if (upceanflag == 2 || upceanflag == 5) { + } else if (upceanflag == OUT_UPCEANFLAG_EAN2 || upceanflag == OUT_UPCEANFLAG_EAN5) { ybind_top += textoffset; ybind_bot += textoffset; } @@ -1136,7 +1165,7 @@ INTERNAL int zint_plot_vector(struct zint_symbol *symbol, int rotate_angle, int if (horz_outside) { box_top = symbol->border_width; box_height = vector->height - symbol->border_width * 2; - } else if (upceanflag == 2 || upceanflag == 5) { + } else if (upceanflag == OUT_UPCEANFLAG_EAN2 || upceanflag == OUT_UPCEANFLAG_EAN5) { box_top += textoffset; } /* Left */ @@ -1174,6 +1203,13 @@ INTERNAL int zint_plot_vector(struct zint_symbol *symbol, int rotate_angle, int } return error_number ? error_number : warn_number; + +errmemexit: + error_number = ZINT_ERROR_MEMORY; +errexit: + zint_font_free(zfnt, 0 /*si*/); + + return error_number; } /* vim: set ts=4 sw=4 et : */ diff --git a/backend/zfont.c b/backend/zfont.c new file mode 100644 index 00000000..08bd49c4 --- /dev/null +++ b/backend/zfont.c @@ -0,0 +1,1851 @@ +/* zfont.c - handle fonts */ +/* + libzint - the open source barcode library + Copyright (C) 2026 Robin Stuart + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the project nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + */ +/* SPDX-License-Identifier: BSD-3-Clause */ + +#include +#include +#include +#include +#include + +#include "common.h" +#include "output.h" + +#define STB_TRUETYPE_IMPLEMENTATION +#include "zfont.h" +#include "fonts/normal_ttf.h" +#include "fonts/normal_bold_ttf.h" +#include "fonts/upcean_ttf.h" + +struct zfont_patch_info { + unsigned short offset; + signed char row; + unsigned char len; + signed char row2; + unsigned char len2; +}; + +static const unsigned char zfont_normal_14_info_idxs[188] = { + 188, /* ! */ 188, /* " */ 0, /* # */ 1, /* $ */ + 2, /* % */ 3, /* & */ 188, /* ' */ 188, /* ( */ + 4, /* ) */ 5, /* * */ 6, /* + */ 188, /* , */ + 188, /* - */ 188, /* . */ 188, /* / */ 7, /* 0 */ + 8, /* 1 */ 9, /* 2 */ 10, /* 3 */ 11, /* 4 */ + 12, /* 5 */ 13, /* 6 */ 14, /* 7 */ 15, /* 8 */ + 16, /* 9 */ 188, /* : */ 188, /* ; */ 17, /* < */ + 188, /* = */ 18, /* > */ 19, /* ? */ 20, /* @ */ + 21, /* A */ 22, /* B */ 23, /* C */ 24, /* D */ + 25, /* E */ 26, /* F */ 27, /* G */ 28, /* H */ + 29, /* I */ 30, /* J */ 31, /* K */ 188, /* L */ + 32, /* M */ 33, /* N */ 34, /* O */ 35, /* P */ + 36, /* Q */ 37, /* R */ 38, /* S */ 39, /* T */ + 188, /* U */ 40, /* V */ 188, /* W */ 41, /* X */ + 42, /* Y */ 188, /* Z */ 188, /* [ */ 188, /* \ */ + 188, /* ] */ 43, /* ^ */ 188, /* _ */ 44, /* ` */ + 45, /* a */ 46, /* b */ 47, /* c */ 48, /* d */ + 49, /* e */ 50, /* f */ 51, /* g */ 52, /* h */ + 188, /* i */ 188, /* j */ 53, /* k */ 188, /* l */ + 54, /* m */ 55, /* n */ 56, /* o */ 57, /* p */ + 58, /* q */ 59, /* r */ 60, /* s */ 61, /* t */ + 62, /* u */ 63, /* v */ 188, /* w */ 64, /* x */ + 188, /* y */ 65, /* z */ 66, /* { */ 188, /* | */ + 67, /* } */ 68, /* ~ */ 188, /* ¡ */ 69, /* ¢ */ + 70, /* £ */ 71, /* ¤ */ 72, /* ¥ */ 188, /* ¦ */ + 73, /* § */ 74, /* ¨ */ 75, /* © */ 76, /* ª */ + 77, /* « */ 188, /* ¬ */ 78, /* ® */ 188, /* ¯ */ + 79, /* ° */ 80, /* ± */ 81, /* ² */ 82, /* ³ */ + 83, /* ´ */ 84, /* µ */ 188, /* ¶ */ 85, /* · */ + 188, /* ¸ */ 188, /* ¹ */ 86, /* º */ 87, /* » */ + 188, /* ¼ */ 188, /* ½ */ 88, /* ¾ */ 188, /* ¿ */ + 89, /* À */ 90, /* Á */ 91, /*  */ 92, /* à */ + 93, /* Ä */ 94, /* Å */ 95, /* Æ */ 96, /* Ç */ + 97, /* È */ 98, /* É */ 99, /* Ê */ 100, /* Ë */ + 101, /* Ì */ 102, /* Í */ 103, /* Î */ 104, /* Ï */ + 105, /* Ð */ 106, /* Ñ */ 107, /* Ò */ 108, /* Ó */ + 109, /* Ô */ 110, /* Õ */ 111, /* Ö */ 112, /* × */ + 113, /* Ø */ 114, /* Ù */ 115, /* Ú */ 116, /* Û */ + 117, /* Ü */ 118, /* Ý */ 188, /* Þ */ 119, /* ß */ + 120, /* à */ 121, /* á */ 122, /* â */ 123, /* ã */ + 124, /* ä */ 125, /* å */ 126, /* æ */ 127, /* ç */ + 128, /* è */ 129, /* é */ 130, /* ê */ 131, /* ë */ + 132, /* ì */ 133, /* í */ 134, /* î */ 135, /* ï */ + 136, /* ð */ 137, /* ñ */ 138, /* ò */ 139, /* ó */ + 140, /* ô */ 141, /* õ */ 142, /* ö */ 143, /* ÷ */ + 144, /* ø */ 145, /* ù */ 146, /* ú */ 147, /* û */ + 148, /* ü */ 149, /* ý */ 188, /* þ */ 150, /* ÿ */ +}; + +static const struct zfont_patch_info zfont_normal_14_infos[] = { + { 0, 1, 24, 0, 0 }, /* # */ + { 3, 1, 80, 0, 0 }, /* $ */ + { 13, 0, 20, 5, 8 }, /* % */ + { 17, 0, 30, 5, 8 }, /* & */ + { 22, 1, 52, 0, 0 }, /* ) */ + { 29, 4, 6, 0, 0 }, /* * */ + { 30, 1, 8, 3, 16 }, /* + */ + { 33, 0, 16, 0, 0 }, /* 0 */ + { 35, 0, 14, 8, 4 }, /* 1 */ + { 38, 1, 4, 0, 0 }, /* 2 */ + { 39, 1, 48, 8, 8 }, /* 3 */ + { 46, 2, 8, 5, 24 }, /* 4 */ + { 50, 1, 4, 0, 0 }, /* 5 */ + { 51, 1, 4, 4, 4 }, /* 6 */ + { 53, 1, 8, 0, 0 }, /* 7 */ + { 54, 1, 32, 8, 8 }, /* 8 */ + { 59, 0, 64, 0, 0 }, /* 9 */ + { 67, 3, 4, 6, 8 }, /* < */ + { 69, 2, 16, 5, 8 }, /* > */ + { 72, 7, 4, 0, 0 }, /* ? */ + { 73, 4, 72, 12, 4 }, /* @ */ + { 83, 3, 30, 8, 20 }, /* A */ + { 90, 0, 16, 3, 24 }, /* B */ + { 95, 0, 20, 3, 8 }, /* C */ + { 99, 0, 16, 0, 0 }, /* D */ + { 101, 1, 2, 4, 2 }, /* E */ + { 103, 1, 2, 6, 2 }, /* F */ + { 105, 0, 34, 6, 30 }, /* G */ + { 114, 4, 8, 0, 0 }, /* H */ + { 115, 0, 20, 0, 0 }, /* I */ + { 118, 1, 6, 8, 6 }, /* J */ + { 120, 5, 14, 0, 0 }, /* K */ + { 122, 0,100, 0, 0 }, /* M */ + { 135, 2, 8, 0, 0 }, /* N */ + { 136, 0, 44, 6, 12 }, /* O */ + { 144, 1, 8, 6, 8 }, /* P */ + { 146, 0, 44, 6, 22 }, /* Q */ + { 155, 1, 36, 0, 0 }, /* R */ + { 160, 0, 24, 7, 8 }, /* S */ + { 164, 1, 8, 0, 0 }, /* T */ + { 165, 1, 60, 9, 8 }, /* V */ + { 174, 0, 40, 6, 40 }, /* X */ + { 184, 0, 40, 5, 8 }, /* Y */ + { 190, 3, 8, 0, 0 }, /* ^ */ + { 191, 1, 8, 0, 0 }, /* ` */ + { 192, 1, 40, 7, 4 }, /* a */ + { 198, 5, 8, 0, 0 }, /* b */ + { 199, 6, 8, 0, 0 }, /* c */ + { 200, 4, 22, 8, 8 }, /* d */ + { 204, 3, 8, 0, 0 }, /* e */ + { 205, 2, 16, 0, 0 }, /* f */ + { 207, 1, 34, 8, 14 }, /* g */ + { 214, 4, 14, 0, 0 }, /* h */ + { 216, 9, 16, 0, 0 }, /* k */ + { 218, 3, 14, 0, 0 }, /* m */ + { 220, 1, 8, 0, 0 }, /* n */ + { 221, 2, 8, 0, 0 }, /* o */ + { 222, 1, 16, 0, 0 }, /* p */ + { 224, 1, 24, 5, 8 }, /* q */ + { 228, 2, 8, 0, 0 }, /* r */ + { 229, 1, 8, 0, 0 }, /* s */ + { 230, 2, 4, 0, 0 }, /* t */ + { 231, 5, 8, 0, 0 }, /* u */ + { 232, 4, 4, 0, 0 }, /* v */ + { 233, 6, 14, 0, 0 }, /* x */ + { 235, 2, 6, 0, 0 }, /* z */ + { 236, 13, 4, 0, 0 }, /* { */ + { 237, 1, 64, 0, 0 }, /* } */ + { 245, 1, 16, 0, 0 }, /* ~ */ + { 247, 1, 21, 7, 14 }, /* ¢ */ + { 252, 0, 16, 7, 24 }, /* £ */ + { 257, 0, 56, 0, 0 }, /* ¤ */ + { 264, 0, 72, 0, 0 }, /* ¥ */ + { 273, 2, 42, 0, 0 }, /* § */ + { 279, 0, 8, 0, 0 }, /* ¨ */ + { 280, 0, 44, 6, 44 }, /* © */ + { 292, 0, 6, 2, 18 }, /* ª */ + { 296, 1, 40, 0, 0 }, /* « */ + { 301, 0, 8, 3, 64 }, /* ® */ + { 310, 0, 10, 0, 0 }, /* ° */ + { 312, 1, 32, 8, 8 }, /* ± */ + { 317, 5, 5, 0, 0 }, /* ² */ + { 318, 1, 15, 5, 5 }, /* ³ */ + { 321, 2, 4, 0, 0 }, /* ´ */ + { 322, 5, 24, 0, 0 }, /* µ */ + { 325, 0, 4, 0, 0 }, /* · */ + { 326, 0, 10, 5, 5 }, /* º */ + { 329, 1, 24, 0, 0 }, /* » */ + { 332, 3, 32, 0, 0 }, /* ¾ */ + { 336, 0, 16, -3, 0 }, /* À */ + { 338, 0, 16, -3, 0 }, /* Á */ + { 340, 0, 16, -3, 0 }, /*  */ + { 342, 0, 20, -3, 0 }, /* à */ + { 345, 0, 16, -2, 0 }, /* Ä */ + { 347, 0, 40, -3, 0 }, /* Å */ + { 352, 9, 4, 0, 0 }, /* Æ */ + { 353, 0, 40, 11, 20 }, /* Ç */ + { 361, 0, 16, -3, 0 }, /* È */ + { 363, 0, 16, -3, 0 }, /* É */ + { 365, 0, 16, -3, 0 }, /* Ê */ + { 367, 0, 16, -2, 0 }, /* Ë */ + { 369, 0, 39, 0, 0 }, /* Ì */ + { 374, 0, 52, 0, 0 }, /* Í */ + { 381, 0, 78, 0, 0 }, /* Î */ + { 391, 0, 48, 0, 0 }, /* Ï */ + { 397, 0, 20, 4, 10 }, /* Ð */ + { 402, 0, 16, 0, 0 }, /* Ñ */ + { 404, 0, 22, -3, 0 }, /* Ò */ + { 407, 0, 22, -3, 0 }, /* Ó */ + { 410, 0, 22, -3, 0 }, /* Ô */ + { 413, 0, 22, -3, 0 }, /* Õ */ + { 416, 0, 8, -2, 0 }, /* Ö */ + { 417, 0, 48, 0, 0 }, /* × */ + { 423, 1, 44, 7, 44 }, /* Ø */ + { 435, 0, 16, -3, 0 }, /* Ù */ + { 437, 0, 16, -3, 0 }, /* Ú */ + { 439, 0, 16, -3, 0 }, /* Û */ + { 441, 0, 16, -2, 0 }, /* Ü */ + { 443, 0, 16, -3, 0 }, /* Ý */ + { 445, 5, 8, 0, 0 }, /* ß */ + { 0, 0, 0, -3, 0 }, /* à */ + { 0, 0, 0, -3, 0 }, /* á */ + { 446, 1, 16, -3, 0 }, /* â */ + { 448, 1, 16, -3, 0 }, /* ã */ + { 450, 0, 16, -2, 0 }, /* ä */ + { 452, 1, 24, -4, 0 }, /* å */ + { 455, 1, 48, 7, 12 }, /* æ */ + { 463, 6, 7, 0, 0 }, /* ç */ + { 0, 0, 0, -3, 0 }, /* è */ + { 0, 0, 0, -3, 0 }, /* é */ + { 0, 0, 0, -3, 0 }, /* ê */ + { 464, 0, 16, -2, 0 }, /* ë */ + { 466, 1, 30, 0, 0 }, /* ì */ + { 470, 4, 28, 0, 0 }, /* í */ + { 474, 1, 12, 4, 40 }, /* î */ + { 481, 0, 40, 0, 0 }, /* ï */ + { 486, 1, 48, 9, 8 }, /* ð */ + { 493, 1, 14, -3, 0 }, /* ñ */ + { 0, 0, 0, -3, 0 }, /* ò */ + { 0, 0, 0, -3, 0 }, /* ó */ + { 0, 0, 0, -3, 0 }, /* ô */ + { 495, 1, 16, -3, 0 }, /* õ */ + { 497, 0, 16, -2, 0 }, /* ö */ + { 499, 0, 16, 3, 8 }, /* ÷ */ + { 502, 1, 63, 0, 0 }, /* ø */ + { 0, 0, 0, -3, 0 }, /* ù */ + { 0, 0, 0, -3, 0 }, /* ú */ + { 0, 0, 0, -3, 0 }, /* û */ + { 510, 0, 14, -2, 0 }, /* ü */ + { 512, 1, 14, 0, 0 }, /* ý */ + { 514, 1, 7, 0, 0 }, /* ÿ */ +}; + +static const unsigned char zfont_normal_14_patches[] = { + 0x24, 0x24, 0x7E, /* # */ + 0x10, 0x3C, 0x52, 0x50, 0x38, 0x14, 0x12, 0x12, 0x54, 0x38, /* $ */ + 0x30, 0x04, 0x80, 0x36, /* % */ + 0x18, 0x09, 0x02, 0x40, 0x39, /* & */ + 0x8C, 0x46, 0x22, 0x22, 0x26, 0x4C, 0x80, /* ) */ + 0x48, /* * */ + 0x00, 0x08, 0x3E, /* + */ + 0x3C, 0x66, /* 0 */ + 0x30, 0xA0, 0x10, /* 1 */ + 0x20, /* 2 */ + 0x24, 0x42, 0x02, 0x04, 0x18, 0x04, 0x42, /* 3 */ + 0x14, 0x24, 0x44, 0x7E, /* 4 */ + 0x40, /* 5 */ + 0x20, 0x50, /* 6 */ + 0x02, /* 7 */ + 0x66, 0x42, 0x42, 0x24, 0x42, /* 8 */ + 0x3C, 0x66, 0x42, 0x42, 0x66, 0x3A, 0x02, 0x02, /* 9 */ + 0x30, 0x0C, /* < */ + 0x30, 0x0C, 0x0C, /* > */ + 0x10, /* ? */ + 0x26, 0x92, 0x4C, 0xA4, 0x25, 0x21, 0x29, 0x1A, 0x47, 0x1F, /* @ */ + 0x22, 0x08, 0x82, 0x20, 0x80, 0xA0, 0x20, /* A */ + 0xFC, 0x86, 0x84, 0xF8, 0x84, /* B */ + 0x1F, 0x0C, 0x60, 0x40, /* C */ + 0xFC, 0x43, /* D */ + 0x80, 0x80, /* E */ + 0x81, 0x81, /* F */ + 0x1F, 0x0C, 0x66, 0x09, 0x00, 0x40, 0x58, 0x13, 0x18, /* G */ + 0x81, /* H */ + 0x55, 0x55, 0x50, /* I */ + 0x04, 0x4D, /* J */ + 0xD0, 0x44, /* K */ + 0xC0, 0xF0, 0x3E, 0x1E, 0x85, 0xA1, 0x64, 0x99, 0x26, 0x79, 0x8C, 0x63, 0x10, /* M */ + 0xA1, /* N */ + 0x1F, 0x06, 0x31, 0x83, 0x20, 0x20, 0x40, 0x4C, /* O */ + 0x86, 0x80, /* P */ + 0x1F, 0x06, 0x31, 0x83, 0x20, 0x20, 0x40, 0x4C, 0x18, /* Q */ + 0x86, 0x41, 0x20, 0x90, 0x4F, /* R */ + 0x1C, 0x11, 0x90, 0x00, /* S */ + 0x08, /* T */ + 0xC1, 0x90, 0x44, 0x11, 0x8C, 0x22, 0x08, 0x81, 0x08, /* V */ + 0x40, 0x98, 0x63, 0x30, 0x48, 0x12, 0x0C, 0xC6, 0x19, 0x02, /* X */ + 0x41, 0x10, 0x42, 0x20, 0xD8, 0x08, /* Y */ + 0x44, /* ^ */ + 0x62, /* ` */ + 0x3C, 0x46, 0x02, 0x3E, 0x42, 0x3B, /* a */ + 0x42, /* b */ + 0x44, /* c */ + 0x3E, 0x85, 0x0A, 0x42, /* d */ + 0x42, /* e */ + 0x44, 0x74, /* f */ + 0x3C, 0x85, 0x0A, 0x14, 0x24, 0x02, 0x88, /* g */ + 0x7C, 0x85, /* h */ + 0x44, 0x42, /* k */ + 0x44, 0x28, /* m */ + 0x3C, /* n */ + 0x66, /* o */ + 0x3C, 0x42, /* p */ + 0x3C, 0x8D, 0x0A, 0x42, /* q */ + 0x42, /* r */ + 0x7C, /* s */ + 0x46, /* t */ + 0x42, /* u */ + 0x28, /* v */ + 0x44, 0x88, /* x */ + 0x04, /* z */ + 0x30, /* { */ + 0xC2, 0x10, 0x84, 0x30, 0xCC, 0x42, 0x10, 0x8C, /* } */ + 0x32, 0x4C, /* ~ */ + 0x08, 0x79, 0x8A, 0x62, 0x78, /* ¢ */ + 0x18, 0x24, 0x20, 0x40, 0x7C, /* £ */ + 0x44, 0x7C, 0x6C, 0x44, 0x6C, 0x7C, 0x44, /* ¤ */ + 0x41, 0x11, 0x0D, 0x82, 0x80, 0x81, 0xF0, 0x20, 0x7C, /* ¥ */ + 0x42, 0x80, 0xE1, 0x34, 0x2C, 0x87, /* § */ + 0x52, /* ¨ */ + 0x1E, 0x04, 0x21, 0x32, 0x49, 0x29, 0x92, 0x49, 0x90, 0x84, 0x0F, 0x00, /* © */ + 0x21, 0x31, 0x47, 0x00, /* ª */ + 0x12, 0x24, 0x48, 0x24, 0x12, /* « */ + 0x1E, 0x92, 0x52, 0x4A, 0x71, 0x49, 0x25, 0x28, 0x42, /* ® */ + 0x32, 0x52, /* ° */ + 0x00, 0x10, 0x10, 0x7C, 0x7C, /* ± */ + 0x70, /* ² */ + 0x50, 0x88, 0x60, /* ³ */ + 0xC0, /* ´ */ + 0x42, 0x66, 0x7A, /* µ */ + 0xA0, /* · */ + 0x72, 0xA1, 0x70, /* º */ + 0x48, 0x24, 0x12, /* » */ + 0x21, 0x01, 0x24, 0x64, /* ¾ */ + 0x18, 0x03, /* À */ + 0x04, 0x02, /* Á */ + 0x08, 0x05, /*  */ + 0x0A, 0x05, 0x80, /* à */ + 0x14, 0x00, /* Ä */ + 0x08, 0x05, 0x00, 0x80, 0x20, /* Å */ + 0x41, /* Æ */ + 0x1F, 0x0C, 0x66, 0x09, 0x00, 0x02, 0x01, 0x80, /* Ç */ + 0x10, 0x08, /* È */ + 0x08, 0x10, /* É */ + 0x18, 0x24, /* Ê */ + 0x28, 0x00, /* Ë */ + 0x44, 0x12, 0x49, 0x24, 0x92, /* Ì */ + 0x12, 0x02, 0x22, 0x22, 0x22, 0x22, 0x20, /* Í */ + 0x10, 0xA0, 0x04, 0x10, 0x41, 0x04, 0x10, 0x41, 0x04, 0x10, /* Î */ + 0x50, 0x22, 0x22, 0x22, 0x22, 0x22, /* Ï */ + 0x7E, 0x10, 0xC6, 0x40, 0xBE, /* Ð */ + 0x14, 0x2C, /* Ñ */ + 0x08, 0x00, 0x80, /* Ò */ + 0x02, 0x00, 0x80, /* Ó */ + 0x04, 0x01, 0x40, /* Ô */ + 0x05, 0x01, 0x60, /* Õ */ + 0x0A, /* Ö */ + 0x42, 0x24, 0x18, 0x18, 0x24, 0x42, /* × */ + 0x1F, 0x46, 0x11, 0x85, 0x21, 0x23, 0x48, 0x4A, 0x18, 0x86, 0x2F, 0x80, /* Ø */ + 0x10, 0x04, /* Ù */ + 0x08, 0x08, /* Ú */ + 0x18, 0x12, /* Û */ + 0x28, 0x00, /* Ü */ + 0x04, 0x02, /* Ý */ + 0x48, /* ß */ + 0x18, 0x24, /* â */ + 0x14, 0x2C, /* ã */ + 0x00, 0x14, /* ä */ + 0x08, 0x14, 0x08, /* å */ + 0x3F, 0xC4, 0x62, 0x06, 0x23, 0xFC, 0x39, 0xC0, /* æ */ + 0x44, /* ç */ + 0x00, 0x28, /* ë */ + 0x88, 0x24, 0x92, 0x48, /* ì */ + 0x44, 0x44, 0x44, 0x40, /* í */ + 0x10, 0xA0, 0x10, 0x41, 0x04, 0x10, 0x41, /* î */ + 0x05, 0x02, 0x22, 0x22, 0x22, /* ï */ + 0x14, 0x08, 0x14, 0x02, 0x3E, 0x66, 0x66, /* ð */ + 0x14, 0x58, /* ñ */ + 0x14, 0x2C, /* õ */ + 0x00, 0x28, /* ö */ + 0x00, 0x10, 0x7C, /* ÷ */ + 0x3A, 0x22, 0x12, 0x89, 0x45, 0x21, 0x11, 0x70, /* ø */ + 0x00, 0x50, /* ü */ + 0x08, 0x20, /* ý */ + 0x28, /* ÿ */ +}; + +static const char zfont_normal_14_bases[64] = { + 'A', 'A', 'A', 'A', 'A', 'A', 0 , 0 , 'E', 'E', 'E', 'E', 0 , 0 , 0 , 0 , /*C0-CF*/ + 0 , 0 , 'O', 'O', 'O', 'O', 'O', 0 , 0 , 'U', 'U', 'U', 'U', 'Y', 0 , 0 , /*D0-DF*/ + 'a', 'a', 'a', 'a', 'a', 'a', 0 , 0 , 'e', 'e', 'e', 'e', 0 , 0 , 0 , 0 , /*E0-EF*/ + 0 , 'n', 'o', 'o', 'o', 'o', 'o', 0 , 0 , 'u', 'u', 'u', 'u', 0 , 0 , 0 , /*F0-FF*/ +}; + +static const unsigned char zfont_bold_14_info_idxs[188] = { + 0, /* ! */ 1, /* " */ 2, /* # */ 3, /* $ */ + 4, /* % */ 5, /* & */ 6, /* ' */ 7, /* ( */ + 188, /* ) */ 8, /* * */ 9, /* + */ 188, /* , */ + 10, /* - */ 188, /* . */ 188, /* / */ 11, /* 0 */ + 12, /* 1 */ 13, /* 2 */ 14, /* 3 */ 15, /* 4 */ + 16, /* 5 */ 17, /* 6 */ 188, /* 7 */ 18, /* 8 */ + 19, /* 9 */ 188, /* : */ 20, /* ; */ 21, /* < */ + 22, /* = */ 23, /* > */ 24, /* ? */ 25, /* @ */ + 26, /* A */ 27, /* B */ 28, /* C */ 29, /* D */ + 30, /* E */ 31, /* F */ 32, /* G */ 188, /* H */ + 188, /* I */ 188, /* J */ 33, /* K */ 188, /* L */ + 188, /* M */ 34, /* N */ 35, /* O */ 188, /* P */ + 36, /* Q */ 37, /* R */ 38, /* S */ 188, /* T */ + 39, /* U */ 40, /* V */ 188, /* W */ 41, /* X */ + 42, /* Y */ 43, /* Z */ 44, /* [ */ 188, /* \ */ + 188, /* ] */ 45, /* ^ */ 188, /* _ */ 188, /* ` */ + 188, /* a */ 188, /* b */ 188, /* c */ 188, /* d */ + 46, /* e */ 47, /* f */ 48, /* g */ 188, /* h */ + 188, /* i */ 188, /* j */ 188, /* k */ 188, /* l */ + 188, /* m */ 188, /* n */ 49, /* o */ 50, /* p */ + 51, /* q */ 188, /* r */ 52, /* s */ 188, /* t */ + 188, /* u */ 53, /* v */ 188, /* w */ 54, /* x */ + 188, /* y */ 188, /* z */ 55, /* { */ 188, /* | */ + 56, /* } */ 57, /* ~ */ 188, /* ¡ */ 58, /* ¢ */ + 59, /* £ */ 60, /* ¤ */ 61, /* ¥ */ 62, /* ¦ */ + 63, /* § */ 188, /* ¨ */ 64, /* © */ 65, /* ª */ + 66, /* « */ 188, /* ¬ */ 67, /* ® */ 188, /* ¯ */ + 68, /* ° */ 69, /* ± */ 70, /* ² */ 71, /* ³ */ + 72, /* ´ */ 188, /* µ */ 73, /* ¶ */ 188, /* · */ + 188, /* ¸ */ 188, /* ¹ */ 74, /* º */ 75, /* » */ + 188, /* ¼ */ 76, /* ½ */ 77, /* ¾ */ 78, /* ¿ */ + 79, /* À */ 80, /* Á */ 81, /*  */ 82, /* à */ + 83, /* Ä */ 84, /* Å */ 85, /* Æ */ 86, /* Ç */ + 87, /* È */ 88, /* É */ 89, /* Ê */ 90, /* Ë */ + 91, /* Ì */ 92, /* Í */ 93, /* Î */ 188, /* Ï */ + 94, /* Ð */ 95, /* Ñ */ 96, /* Ò */ 97, /* Ó */ + 98, /* Ô */ 99, /* Õ */ 100, /* Ö */ 188, /* × */ + 101, /* Ø */ 102, /* Ù */ 103, /* Ú */ 104, /* Û */ + 105, /* Ü */ 106, /* Ý */ 188, /* Þ */ 188, /* ß */ + 188, /* à */ 107, /* á */ 108, /* â */ 188, /* ã */ + 188, /* ä */ 109, /* å */ 110, /* æ */ 111, /* ç */ + 112, /* è */ 113, /* é */ 114, /* ê */ 115, /* ë */ + 188, /* ì */ 116, /* í */ 117, /* î */ 188, /* ï */ + 118, /* ð */ 119, /* ñ */ 120, /* ò */ 121, /* ó */ + 122, /* ô */ 123, /* õ */ 124, /* ö */ 125, /* ÷ */ + 126, /* ø */ 127, /* ù */ 188, /* ú */ 128, /* û */ + 188, /* ü */ 129, /* ý */ 188, /* þ */ 188, /* ÿ */ +}; + +static const struct zfont_patch_info zfont_bold_14_infos[] = { + { 0, 0, 3, 0, 0 }, /* ! */ + { 1, 3, 6, 0, 0 }, /* " */ + { 2, 0, 32, 7, 8 }, /* # */ + { 7, 3, 16, 7, 32 }, /* $ */ + { 13, 0, 23, 3, 91 }, /* % */ + { 28, 2, 4, 0, 0 }, /* & */ + { 29, 1, 3, 0, 0 }, /* ' */ + { 30, 2, 60, 0, 0 }, /* ( */ + { 38, 4, 6, 0, 0 }, /* * */ + { 39, 1, 8, 4, 16 }, /* + */ + { 42, 0, 10, 0, 0 }, /* - */ + { 44, 0, 16, 5, 8 }, /* 0 */ + { 47, 8, 8, 0, 0 }, /* 1 */ + { 48, 0, 8, 9, 8 }, /* 2 */ + { 50, 0, 8, 0, 0 }, /* 3 */ + { 51, 0, 80, 0, 0 }, /* 4 */ + { 61, 7, 4, 0, 0 }, /* 5 */ + { 62, 0, 12, 0, 0 }, /* 6 */ + { 64, 0, 8, 5, 8 }, /* 8 */ + { 66, 0, 8, 6, 8 }, /* 9 */ + { 68, 9, 3, 0, 0 }, /* ; */ + { 69, 5, 8, 7, 8 }, /* < */ + { 71, 2, 8, 4, 8 }, /* = */ + { 73, 1, 24, 5, 24 }, /* > */ + { 79, 0, 8, 0, 0 }, /* ? */ + { 80, 0,104, 10, 24 }, /* @ */ + { 96, 3, 8, 7, 30 }, /* A */ + { 101, 0, 8, 5, 40 }, /* B */ + { 107, 0, 8, 7, 8 }, /* C */ + { 109, 0, 8, 7, 8 }, /* D */ + { 111, 9, 9, 0, 0 }, /* E */ + { 113, 4, 8, 0, 0 }, /* F */ + { 114, 0, 8, 7, 32 }, /* G */ + { 119, 1, 40, 8, 20 }, /* K */ + { 127, 0, 10, 0, 0 }, /* N */ + { 129, 0, 8, 7, 4 }, /* O */ + { 129, 0, 8, 7, 4 }, /* Q */ + { 131, 1, 20, 6, 40 }, /* R */ + { 139, 0, 8, 0, 0 }, /* S */ + { 140, 0, 10, 9, 8 }, /* U */ + { 143, 0, 80, 0, 0 }, /* V */ + { 153, 0,100, 0, 0 }, /* X */ + { 166, 0, 40, 5, 8 }, /* Y */ + { 172, 2, 16, 9, 4 }, /* Z */ + { 175, 1, 5, 13, 5 }, /* [ */ + { 177, 1, 32, 0, 0 }, /* ^ */ + { 181, 3, 8, 0, 0 }, /* e */ + { 182, 3, 5, 0, 0 }, /* f */ + { 183, 1, 8, 8, 24 }, /* g */ + { 187, 6, 8, 0, 0 }, /* o */ + { 188, 1, 8, 5, 24 }, /* p */ + { 188, 1, 8, 0, 0 }, /* q */ + { 188, 1, 6, 0, 0 }, /* s */ + { 192, 1, 8, 4, 8 }, /* v */ + { 194, 3, 8, 7, 8 }, /* x */ + { 196, 1, 48, 12, 12 }, /* { */ + { 204, 8, 6, 12, 6 }, /* } */ + { 206, 0, 16, 0, 0 }, /* ~ */ + { 208, 0, 16, 3, 56 }, /* ¢ */ + { 217, 0, 24, 8, 8 }, /* £ */ + { 221, 1, 16, 6, 8 }, /* ¤ */ + { 224, 3, 8, 0, 0 }, /* ¥ */ + { 225, 5, 8, 0, 0 }, /* ¦ */ + { 226, 0, 48, 9, 16 }, /* § */ + { 234, 0, 44, 6, 32 }, /* © */ + { 244, 0, 8, 3, 12 }, /* ª */ + { 247, 3, 8, 0, 0 }, /* « */ + { 248, 0, 44, 5, 44 }, /* ® */ + { 260, 1, 5, 3, 5 }, /* ° */ + { 262, 0, 32, 8, 8 }, /* ± */ + { 267, 3, 8, 0, 0 }, /* ² */ + { 268, 0, 8, 0, 0 }, /* ³ */ + { 269, 1, 8, 0, 0 }, /* ´ */ + { 270, 0, 8, 4, 8 }, /* ¶ */ + { 272, 2, 15, 0, 0 }, /* º */ + { 274, 3, 16, 0, 0 }, /* » */ + { 276, 0, 12, 5, 24 }, /* ½ */ + { 281, 0, 24, 3, 12 }, /* ¾ */ + { 285, 1, 24, 7, 24 }, /* ¿ */ + { 291, 0, 30, -3, 0 }, /* À */ + { 295, 0, 30, -3, 0 }, /* Á */ + { 299, 0, 20, -3, 0 }, /*  */ + { 302, 0, 20, -3, 0 }, /* à */ + { 305, 1, 8, -2, 0 }, /* Ä */ + { 306, 0, 40, -3, 0 }, /* Å */ + { 311, 4, 14, 0, 0 }, /* Æ */ + { 313, 0, 30, 7, 60 }, /* Ç */ + { 325, 0, 27, -3, 0 }, /* È */ + { 328, 0, 27, -3, 0 }, /* É */ + { 331, 0, 27, -3, 0 }, /* Ê */ + { 335, 1, 8, -2, 0 }, /* Ë */ + { 336, 0, 15, 0, 0 }, /* Ì */ + { 338, 0, 15, 0, 0 }, /* Í */ + { 340, 1, 8, 0, 0 }, /* Î */ + { 341, 0, 8, 7, 8 }, /* Ð */ + { 343, 0, 20, -3, 0 }, /* Ñ */ + { 346, 0, 33, -3, 0 }, /* Ò */ + { 350, 0, 8, -3, 0 }, /* Ó */ + { 351, 0, 32, -3, 0 }, /* Ô */ + { 355, 0, 22, -3, 0 }, /* Õ */ + { 358, 0, 8, -2, 0 }, /* Ö */ + { 359, 1,110, 0, 0 }, /* Ø */ + { 373, 0, 30, -3, 0 }, /* Ù */ + { 377, 0, 20, -3, 0 }, /* Ú */ + { 380, 1, 8, -3, 0 }, /* Û */ + { 0, 0, 0, -2, 0 }, /* Ü */ + { 381, 0, 30, -3, 0 }, /* Ý */ + { 385, 1, 16, -3, 0 }, /* á */ + { 387, 1, 8, 0, 0 }, /* â */ + { 388, 1, 24, 0, 0 }, /* å */ + { 391, 1, 36, 6, 12 }, /* æ */ + { 398, 8, 8, 0, 0 }, /* ç */ + { 399, 1, 16, -3, 0 }, /* è */ + { 0, 0, 0, -3, 0 }, /* é */ + { 401, 1, 8, -3, 0 }, /* ê */ + { 0, 0, 0, -2, 0 }, /* ë */ + { 402, 2, 5, 0, 0 }, /* í */ + { 403, 1, 6, 0, 0 }, /* î */ + { 404, 1, 54, 9, 16 }, /* ð */ + { 413, 1, 16, 0, 0 }, /* ñ */ + { 415, 0, 0, -3, 0 }, /* ò */ + { 0, 0, 0, -3, 0 }, /* ó */ + { 416, 1, 16, -3, 0 }, /* ô */ + { 418, 1, 16, -3, 0 }, /* õ */ + { 0, 0, 0, -2, 0 }, /* ö */ + { 420, 1, 32, 6, 16 }, /* ÷ */ + { 426, 6, 12, 0, 0 }, /* ø */ + { 428, 1, 16, 0, 0 }, /* ù */ + { 430, 1, 8, 0, 0 }, /* û */ + { 431, 2, 8, 0, 0 }, /* ý */ +}; + +static const unsigned char zfont_bold_14_patches[] = { + 0xDB, /* ! */ + 0x6C, /* " */ + 0x12, 0x12, 0x24, 0x7E, 0x24, /* # */ + 0x56, 0x70, 0x16, 0xD2, 0x7E, 0x18, /* $ */ + 0x00, 0x41, 0x84, 0x49, 0x03, 0xD3, 0x0D, 0xBC, 0x09, 0x20, 0x89, 0x0C, 0x78, 0x41, 0x80, /* % */ + 0x12, /* & */ + 0x49, /* ' */ + 0x63, 0x31, 0x8C, 0x63, 0x18, 0xC3, 0x18, 0x60, /* ( */ + 0xD8, /* * */ + 0x00, 0x7E, 0x7E, /* + */ + 0x7B, 0xC0, /* - */ + 0x3C, 0x7E, 0x66, /* 0 */ + 0x7E, /* 1 */ + 0x38, 0x7E, /* 2 */ + 0x38, /* 3 */ + 0x06, 0x0E, 0x1E, 0x36, 0x26, 0x66, 0x46, 0x7F, 0x06, 0x06, /* 4 */ + 0x66, /* 5 */ + 0x38, 0x7C, /* 6 */ + 0x3C, 0x3C, /* 8 */ + 0x38, 0x06, /* 9 */ + 0xC0, /* ; */ + 0x70, 0x07, /* < */ + 0x7F, 0x7F, /* = */ + 0x70, 0x3C, 0x07, 0x07, 0x3C, 0x70, /* > */ + 0x1C, /* ? */ + 0x0F, 0xC0, 0xC3, 0x0C, 0x0C, 0xCF, 0xB4, 0xCC, 0xAC, 0x45, 0x62, 0x6B, 0x12, 0x30, 0x60, 0xFE, /* @ */ + 0x12, 0x3F, 0x18, 0x66, 0x18, /* A */ + 0x7E, 0x7E, 0x18, 0x46, 0x19, 0xFE, /* B */ + 0x1F, 0x71, /* C */ + 0x7E, 0x63, /* D */ + 0x7F, 0x00, /* E */ + 0x7F, /* F */ + 0x1F, 0x70, 0xC7, 0xF8, 0x7E, /* G */ + 0x63, 0x19, 0x86, 0xC1, 0xE0, 0x61, 0x98, 0x30, /* K */ + 0x61, 0x80, /* N */ + 0x1F, 0x71, /* O & Q */ + 0x7F, 0x18, 0xE6, 0x7E, 0x18, 0xC6, 0x19, 0x83, /* R */ + 0x1C, /* S */ + 0x61, 0x98, 0x3F, /* U */ + 0x41, 0x10, 0x46, 0x31, 0x8C, 0x77, 0x0D, 0x83, 0x60, 0xF8, /* V */ + 0x31, 0x8C, 0x61, 0xB0, 0x7C, 0x0E, 0x03, 0x81, 0xF0, 0x6C, 0x31, 0x8C, 0x60, /* X */ + 0x40, 0x98, 0x63, 0x30, 0xCC, 0x0C, /* Y */ + 0x03, 0x03, 0x7F, /* Z */ + 0x7B, 0x78, /* [ */ + 0x18, 0x24, 0x24, 0x66, /* ^ */ + 0x66, /* e */ + 0x67, /* f */ + 0x3E, 0x03, 0x66, 0x7C, /* g */ + 0x36, /* o */ + 0x3E, 0x73, 0x76, 0x6E, /* p, q & s */ + 0x42, 0x24, /* v */ + 0x18, 0x42, /* x */ + 0x1C, 0xE3, 0x0C, 0x31, 0xC6, 0x1C, 0x38, 0x70, /* { */ + 0x38, 0x73, /* } */ + 0x3A, 0x6E, /* ~ */ + 0x10, 0x10, 0x64, 0x40, 0x40, 0x64, 0x3C, 0x10, 0x10, /* ¢ */ + 0x1C, 0x36, 0x60, 0xC6, /* £ */ + 0x42, 0x3C, 0x3C, /* ¤ */ + 0x24, /* ¥ */ + 0xCF, /* ¦ */ + 0x3C, 0x66, 0x60, 0x78, 0x3E, 0x66, 0x66, 0x3C, /* § */ + 0x1E, 0x04, 0x21, 0x32, 0x29, 0x40, 0x52, 0x89, 0x90, 0x84, /* © */ + 0x70, 0x51, 0xA0, /* ª */ + 0x48, /* « */ + 0x1E, 0x04, 0x21, 0x02, 0x2F, 0x40, 0x9C, 0x4A, 0x51, 0x02, 0x10, 0x80, /* ® */ + 0x4A, 0x30, /* ° */ + 0x00, 0x18, 0x18, 0x7E, 0x00, /* ± */ + 0x43, /* ² */ + 0x70, /* ³ */ + 0x33, /* ´ */ + 0x3E, 0x34, /* ¶ */ + 0x52, 0x88, /* º */ + 0x12, 0x36, /* » */ + 0x20, 0x00, 0x06, 0xC0, 0x42, /* ½ */ + 0x70, 0x01, 0x08, 0x13, /* ¾ */ + 0x08, 0x00, 0x08, 0x42, 0x66, 0x3C, /* ¿ */ + 0x18, 0x03, 0x00, 0x00, /* À */ + 0x06, 0x03, 0x00, 0x00, /* Á */ + 0x0C, 0x04, 0x80, /*  */ + 0x0A, 0x05, 0x80, /* à */ + 0x00, /* Ä */ + 0x04, 0x02, 0x80, 0x40, 0x30, /* Å */ + 0x1B, 0xF8, /* Æ */ + 0x1F, 0x0F, 0xE7, 0x18, 0x71, 0x8F, 0xE1, 0xF0, 0x10, 0x02, 0x01, 0x80, /* Ç */ + 0x18, 0x06, 0x00, /* È */ + 0x0C, 0x0C, 0x00, /* É */ + 0x0C, 0x09, 0x00, 0x00, /* Ê */ + 0x00, /* Ë */ + 0x61, 0x80, /* Ì */ + 0x33, 0x00, /* Í */ + 0x48, /* Î */ + 0x7E, 0x63, /* Ð */ + 0x0A, 0x05, 0x80, /* Ñ */ + 0x0C, 0x00, 0xC0, 0x00, /* Ò */ + 0x03, /* Ó */ + 0x04, 0x01, 0x40, 0x00, /* Ô */ + 0x0D, 0x02, 0x60, /* Õ */ + 0x09, /* Ö */ + 0x1F, 0x47, 0xF9, 0xC6, 0x31, 0xE6, 0x6C, 0xD9, 0x9E, 0x31, 0x8E, 0x7F, 0x8B, 0xE0, /* Ø */ + 0x18, 0x03, 0x00, 0x00, /* Ù */ + 0x06, 0x03, 0x00, /* Ú */ + 0x12, /* Û */ + 0x06, 0x03, 0x00, 0x00, /* Ý */ + 0x0C, 0x18, /* á */ + 0x18, /* â */ + 0x10, 0x28, 0x10, /* å */ + 0x3F, 0xE6, 0x63, 0x07, 0x37, 0x6F, 0x77, /* æ */ + 0x10, /* ç */ + 0x30, 0x18, /* è */ + 0x18, /* ê */ + 0x60, /* í */ + 0x30, /* î */ + 0x19, 0x03, 0x02, 0xC0, 0xE3, 0xF3, 0xB9, 0x77, 0x1F, /* ð */ + 0x1A, 0x26, /* ñ */ + 0x0C, /* ò */ + 0x18, 0x12, /* ô */ + 0x1A, 0x13, /* õ */ + 0x00, 0x18, 0x00, 0x7E, 0x18, 0x00, /* ÷ */ + 0x36, 0x2E, /* ø */ + 0x30, 0x18, /* ù */ + 0x18, /* û */ + 0x18, /* ý */ +}; + +static const char zfont_bold_14_bases[64] = { + 'A', 'A', 'A', 'A', 'A', 'A', 0 , 0 , 'E', 'E', 'E', 'E', 0 , 0 , 0 , 0 , /*C0-CF*/ + 0 , 'N', 'O', 'O', 'O', 'O', 'O', 0 , 0 , 'U', 'U', 'U', 'U', 'Y', 0 , 0 , /*D0-DF*/ + 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 'e', 'e', 'e', 'e', 0 , 0 , 0 , 0 , /*E0-EF*/ + 0 , 0 , 'o', 'o', 'o', 'o', 'o', 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , /*F0-FF*/ +}; + +static const struct zfont_patch_info zfont_normal_10_infos[188] = { + { 0, 0, 0, 0, 0 }, /* ! */ + { 0, 0, 8, 0, 0 }, /* " */ + { 1, 1, 6, 3, 24 }, /* # */ + { 5, 1, 40, 0, 0 }, /* $ */ + { 10, 0, 62, 0, 0 }, /* % */ + { 18, 1, 7, 5, 14 }, /* & */ + { 21, 0, 4, 0, 0 }, /* ' */ + { 22, 4, 12, 0, 0 }, /* ( */ + { 24, 1, 3, 0, 0 }, /* ) */ + { 25, 0, 16, 0, 0 }, /* * */ + { 27, 2, 16, 0, 0 }, /* + */ + { 0, 0, 0, 0, 0 }, /* , */ + { 0, 0, 0, 0, 0 }, /* - */ + { 0, 0, 0, 0, 0 }, /* . */ + { 29, 2, 3, 5, 3 }, /* / */ + { 31, 2, 16, 0, 0 }, /* 0 */ + { 33, 2, 30, 0, 0 }, /* 1 */ + { 37, 0, 4, 0, 0 }, /* 2 */ + { 37, 0, 4, 0, 0 }, /* 3 */ + { 38, 0, 42, 0, 0 }, /* 4 */ + { 44, 3, 6, 0, 0 }, /* 5 */ + { 45, 3, 6, 0, 0 }, /* 6 */ + { 0, 0, 0, 0, 0 }, /* 7 */ + { 46, 0, 24, 6, 6 }, /* 8 */ + { 50, 0, 18, 4, 6 }, /* 9 */ + { 0, 0, 0, 0, 0 }, /* : */ + { 0, 0, 0, 0, 0 }, /* ; */ + { 54, 0, 12, 3, 12 }, /* < */ + { 58, 2, 6, 0, 0 }, /* = */ + { 59, 0, 12, 3, 12 }, /* > */ + { 63, 0, 2, 0, 0 }, /* ? */ + { 64, 1, 60, 8, 8 }, /* @ */ + { 73, 0, 21, 4, 21 }, /* A */ + { 79, 2, 7, 0, 0 }, /* B */ + { 80, 0, 14, 5, 14 }, /* C */ + { 84, 0, 7, 2, 7 }, /* D */ + { 0, 0, 0, 0, 0 }, /* E */ + { 0, 0, 0, 0, 0 }, /* F */ + { 86, 0, 8, 3, 8 }, /* G */ + { 88, 0, 8, 0, 0 }, /* H */ + { 0, 0, 0, 0, 0 }, /* I */ + { 0, 0, 0, 0, 0 }, /* J */ + { 89, 3, 7, 0, 0 }, /* K */ + { 0, 0, 0, 0, 0 }, /* L */ + { 90, 0, 8, 2, 24 }, /* M */ + { 95, 0, 42, 0, 0 }, /* N */ + { 101, 0, 16, 5, 8 }, /* O */ + { 104, 3, 7, 0, 0 }, /* P */ + { 101, 0, 16, 0, 0 }, /* Q */ + { 0, 0, 0, 0, 0 }, /* R */ + { 105, 6, 7, 0, 0 }, /* S */ + { 106, 0, 1, 0, 0 }, /* T */ + { 107, 0, 28, 0, 0 }, /* U */ + { 111, 0, 7, 3, 21 }, /* V */ + { 115, 1, 40, 6, 8 }, /* W */ + { 121, 0, 20, 5, 7 }, /* X */ + { 125, 0, 7, 3, 7 }, /* Y */ + { 127, 6, 6, 0, 0 }, /* Z */ + { 128, 1, 3, 9, 3 }, /* [ */ + { 130, 6, 3, 0, 0 }, /* \ */ + { 131, 1, 3, 9, 3 }, /* ] */ + { 133, 2, 8, 0, 0 }, /* ^ */ + { 0, 0, 0, 0, 0 }, /* _ */ + { 134, 2, 3, 0, 0 }, /* ` */ + { 135, 1, 4, 3, 16 }, /* a */ + { 135, 3, 4, 0, 0 }, /* b */ + { 138, 1, 4, 3, 4 }, /* c */ + { 140, 3, 15, 7, 5 }, /* d */ + { 143, 1, 16, 5, 6 }, /* e */ + { 146, 1, 9, 0, 0 }, /* f */ + { 148, 1, 15, 5, 5 }, /* g */ + { 151, 3, 5, 0, 0 }, /* h */ + { 152, 1, 2, 0, 0 }, /* i */ + { 153, 1, 3, 0, 0 }, /* j */ + { 0, 0, 0, 0, 0 }, /* k */ + { 0, 0, 0, 0, 0 }, /* l */ + { 154, 1, 8, 0, 0 }, /* m */ + { 155, 1, 10, 0, 0 }, /* n */ + { 157, 1, 16, 5, 6 }, /* o */ + { 160, 1, 6, 5, 6 }, /* p */ + { 162, 1, 5, 3, 15 }, /* q */ + { 0, 0, 0, 0, 0 }, /* r */ + { 165, 1, 5, 0, 0 }, /* s */ + { 166, 0, 6, 0, 0 }, /* t */ + { 167, 5, 5, 0, 0 }, /* u */ + { 168, 1, 5, 4, 5 }, /* v */ + { 170, 2, 18, 5, 8 }, /* w */ + { 174, 2, 5, 5, 5 }, /* x */ + { 176, 4, 5, 0, 0 }, /* y */ + { 177, 1, 5, 5, 5 }, /* z */ + { 179, 1, 4, 0, 0 }, /* { */ + { 0, 0, 0, 0, 0 }, /* | */ + { 180, 1, 4, 9, 4 }, /* } */ + { 182, 0, 12, 0, 0 }, /* ~ */ + { 0, 0, 0, 0, 0 }, /* ¡ */ + { 184, 1, 10, 5, 8 }, /* ¢ */ + { 0, 0, 0, 0, 0 }, /* £ */ + { 187, 0, 12, 3, 12 }, /* ¤ */ + { 191, 0, 14, 5, 7 }, /* ¥ */ + { 194, 4, 6, 0, 0 }, /* ¦ */ + { 195, 1, 5, 6, 5 }, /* § */ + { 0, 0, 0, 0, 0 }, /* ¨ */ + { 197, 1, 48, 0, 0 }, /* © */ + { 203, 0, 16, 0, 0 }, /* ª */ + { 205, 1, 18, 0, 0 }, /* « */ + { 208, 1, 6, 0, 0 }, /* ¬ */ + { 209, 1, 48, 0, 0 }, /* ® */ + { 215, 0, 7, 0, 0 }, /* ¯ */ + { 216, 0, 12, 0, 0 }, /* ° */ + { 218, 0, 18, 5, 6 }, /* ± */ + { 222, 3, 8, 0, 0 }, /* ² */ + { 223, 0, 20, 0, 0 }, /* ³ */ + { 226, 0, 6, 0, 0 }, /* ´ */ + { 227, 4, 6, 0, 0 }, /* µ */ + { 228, 1, 35, 0, 0 }, /* ¶ */ + { 0, 0, 0, 0, 0 }, /* · */ + { 233, 1, 6, 0, 0 }, /* ¸ */ + { 234, 0, 16, 0, 0 }, /* ¹ */ + { 236, 0, 16, 0, 0 }, /* º */ + { 238, 1, 16, 0, 0 }, /* » */ + { 240, 0, 56, 0, 0 }, /* ¼ */ + { 247, 0, 63, 0, 0 }, /* ½ */ + { 255, 0, 56, 0, 0 }, /* ¾ */ + { 262, 0, 16, 0, 0 }, /* ¿ */ + { 264, 0, 12, -2, 0 }, /* À */ + { 266, 0, 12, -2, 0 }, /* Á */ + { 268, 0, 12, -2, 0 }, /*  */ + { 270, 0, 12, -2, 0 }, /* à */ + { 272, 0, 6, -2, 0 }, /* Ä */ + { 273, 0, 12, -2, 0 }, /* Å */ + { 0, 0, 0, 0, 0 }, /* Æ */ + { 275, 0, 14, 9, 4 }, /* Ç */ + { 264, 0, 12, 0, 0 }, /* È */ + { 278, 0, 12, 0, 0 }, /* É */ + { 280, 0, 12, 0, 0 }, /* Ê */ + { 272, 0, 6, 0, 0 }, /* Ë */ + { 282, 0, 6, 0, 0 }, /* Ì */ + { 283, 0, 6, 0, 0 }, /* Í */ + { 283, 1, 6, 0, 0 }, /* Î */ + { 284, 0, 4, 0, 0 }, /* Ï */ + { 285, 0, 7, 2, 7 }, /* Ð */ + { 287, 0, 14, -2, 0 }, /* Ñ */ + { 289, 0, 16, -2, 0 }, /* Ò */ + { 291, 0, 16, -2, 0 }, /* Ó */ + { 293, 0, 16, -2, 0 }, /* Ô */ + { 295, 0, 16, -2, 0 }, /* Õ */ + { 297, 0, 6, -2, 0 }, /* Ö */ + { 0, 0, 0, 0, 0 }, /* × */ + { 298, 1, 32, 6, 16 }, /* Ø */ + { 304, 0, 14, -2, 0 }, /* Ù */ + { 306, 0, 14, -2, 0 }, /* Ú */ + { 308, 0, 14, -2, 0 }, /* Û */ + { 310, 0, 7, -2, 0 }, /* Ü */ + { 311, 0, 14, -2, 0 }, /* Ý */ + { 313, 1, 7, 5, 7 }, /* Þ */ + { 0, 0, 0, 0, 0 }, /* ß */ + { 315, 0, 12, -2, 0 }, /* à */ + { 317, 0, 12, -2, 0 }, /* á */ + { 319, 0, 12, -2, 0 }, /* â */ + { 321, 0, 12, -2, 0 }, /* ã */ + { 323, 0, 6, -1, 0 }, /* ä */ + { 324, 0, 16, -3, 0 }, /* å */ + { 326, 1, 8, 3, 27 }, /* æ */ + { 331, 1, 15, 7, 8 }, /* ç */ + { 334, 0, 12, -2, 0 }, /* è */ + { 336, 0, 12, -2, 0 }, /* é */ + { 338, 0, 12, -2, 0 }, /* ê */ + { 340, 0, 6, -1, 0 }, /* ë */ + { 341, 0, 5, 0, 0 }, /* ì */ + { 342, 0, 5, 0, 0 }, /* í */ + { 343, 0, 10, 0, 0 }, /* î */ + { 345, 0, 5, 0, 0 }, /* ï */ + { 346, 1, 6, 3, 16 }, /* ð */ + { 349, 0, 10, -2, 0 }, /* ñ */ + { 351, 0, 12, -2, 0 }, /* ò */ + { 353, 0, 12, -2, 0 }, /* ó */ + { 355, 0, 12, -2, 0 }, /* ô */ + { 357, 0, 12, -2, 0 }, /* õ */ + { 359, 0, 6, -1, 0 }, /* ö */ + { 360, 0, 16, 4, 6 }, /* ÷ */ + { 363, 1, 16, 0, 0 }, /* ø */ + { 365, 0, 10, -2, 0 }, /* ù */ + { 367, 0, 8, -2, 0 }, /* ú */ + { 368, 0, 10, -2, 0 }, /* û */ + { 370, 0, 5, -1, 0 }, /* ü */ + { 371, 0, 8, -2, 0 }, /* ý */ + { 372, 3, 6, 7, 6 }, /* þ */ + { 374, 0, 0, -1, 0 }, /* ÿ */ +}; + +static const unsigned char zfont_normal_10_patches[] = { + 0xAA, /* " */ + 0x29, 0x29, 0xE5, 0x14, /* # */ + 0x10, 0xE5, 0x0E, 0x19, 0x63, /* $ */ + 0x22, 0x2A, 0x09, 0x01, 0x01, 0x20, 0xA8, 0x88, /* % */ + 0x48, 0x48, 0x78, /* & */ + 0xA0, /* ' */ + 0x88, 0x84, /* ( */ + 0x89, /* ) */ + 0x4E, 0x4A, /* * */ + 0x21, 0xC2, /* + */ + 0x29, 0x52, /* / */ + 0x49, 0x24, /* 0 */ + 0x20, 0x82, 0x08, 0x70, /* 1 */ + 0x30, /* 2 and 3 */ + 0x08, 0x61, 0x8A, 0x78, 0x20, 0x80, /* 4 */ + 0x78, /* 5 */ + 0x71, /* 6 */ + 0x31, 0x24, 0x8C, 0x30, /* 8 */ + 0x31, 0x24, 0x92, 0x38, /* 9 */ + 0x10, 0x84, 0x20, 0x41, /* < */ + 0x78, /* = */ + 0x20, 0x41, 0x10, 0x82, /* > */ + 0x31, /* ? */ + 0x1F, 0x08, 0x24, 0xE9, 0x4A, 0x52, 0x97, 0x64, 0x3E, /* @ */ + 0x30, 0x61, 0x21, 0x79, 0x0A, 0x10, /* A */ + 0x44, /* B */ + 0x38, 0x89, 0x44, 0x70, /* C */ + 0x78, 0x42, /* D */ + 0x3C, 0x46, /* G */ + 0x44, /* H */ + 0x60, /* K */ + 0x41, 0x63, 0x55, 0x55, 0x49, /* M */ + 0x44, 0xC9, 0x92, 0xA4, 0xC9, 0x91, /* N */ + 0x3C, 0x66, 0x66, /* O,Q */ + 0x7C, /* P */ + 0x38, /* S */ + 0x7C, /* T */ + 0x44, 0x89, 0x12, 0x24, /* U */ + 0x44, 0x44, 0x50, 0xA0, /* V */ + 0x88, 0x92, 0x25, 0x51, 0x54, 0x22, /* W */ + 0x44, 0x88, 0xA2, 0x44, /* X */ + 0x44, 0x10, /* Y */ + 0x78, /* Z */ + 0x69, 0x60, /* [ */ + 0x24, /* \ */ + 0xC9, 0xC0, /* ] */ + 0x00, /* ^ */ + 0x20, /* ` */ + 0x70, 0x39, 0x27, /* a */ + 0x70, 0x40, /* c */ + 0x3A, 0x52, 0x38, /* d */ + 0x31, 0x27, 0x38, /* e */ + 0x29, 0x80, /* f */ + 0x3A, 0x52, 0x78, /* g */ + 0x72, /* h */ + 0x45, /* i */ + 0x20, /* j */ + 0x7E, /* m */ + 0x5B, 0x52, /* n */ + 0x31, 0x24, 0x30, /* o */ + 0x71, 0x71, /* p */ + 0x3A, 0x4A, 0x4E, /* q */ + 0x32, /* s */ + 0x4D, /* t */ + 0x30, /* u */ + 0x52, 0x21, /* v */ + 0x49, 0x2A, 0x8D, 0x12, /* w */ + 0x21, 0x50, /* x */ + 0x21, /* y */ + 0x70, 0x70, /* z */ + 0x24, /* { */ + 0x84, 0x80, /* } */ + 0x29, 0x40, /* ~ */ + 0x21, 0x90, 0x31, /* ¢ */ + 0x49, 0xE4, 0x79, 0x20, /* ¤ */ + 0x44, 0x89, 0x38, /* ¥ */ + 0x45, /* ¦ */ + 0x3A, 0x38, /* § */ + 0x3C, 0x42, 0x5A, 0x52, 0x5A, 0x3C, /* © */ + 0x35, 0x70, /* ª */ + 0x25, 0x22, 0x40, /* « */ + 0x08, /* ¬ */ + 0x3C, 0x42, 0x5A, 0x52, 0x52, 0x3C, /* ® */ + 0x7C, /* ¯ */ + 0x4A, 0x40, /* ° */ + 0x00, 0x87, 0x00, 0x70, /* ± */ + 0x60, /* ² */ + 0x62, 0x62, 0x60, /* ³ */ + 0x28, /* ´ */ + 0x59, /* µ */ + 0x6B, 0x4A, 0x52, 0x94, 0xA0, /* ¶ */ + 0x28, /* ¸ */ + 0xC4, 0x4E, /* ¹ */ + 0x4A, 0xA4, /* º */ + 0x91, 0x29, /* » */ + 0xC2, 0x44, 0x48, 0x56, 0x2A, 0x4E, 0x02, /* ¼ */ + 0xC2, 0x22, 0x12, 0x0A, 0xC2, 0x22, 0x20, 0x18, /* ½ */ + 0xC2, 0x44, 0xC8, 0x56, 0xAA, 0x4E, 0x02, /* ¾ */ + 0x20, 0x02, /* ¿ */ + 0x20, 0x20, /* À */ + 0x10, 0x40, /* Á */ + 0x30, 0x90, /*  */ + 0x28, 0xA0, /* à */ + 0x28, /* Ä */ + 0x10, 0x50, /* Å */ + 0x3C, 0x85, 0x10, /* Ç */ + 0x08, 0x20, /* É */ + 0x10, 0x50, /* Ê */ + 0x45, /* Ì */ + 0x51, /* Í */ + /* Î */ + 0xA1, /* Ï */ + 0x78, 0x43, /* Ð */ + 0x14, 0x51, /* Ñ */ + 0x20, 0x10, /* Ò */ + 0x04, 0x08, /* Ó */ + 0x08, 0x14, /* Ô */ + 0x14, 0x28, /* Õ */ + 0x14, /* Ö */ + 0x3A, 0x44, 0x4A, 0x52, 0x22, 0x5C, /* Ø */ + 0x20, 0x20, /* Ù */ + 0x08, 0x20, /* Ú */ + 0x10, 0x50, /* Û */ + 0x28, /* Ü */ + 0x08, 0x20, /* Ý */ + 0x78, 0x78, /* Þ */ + 0x40, 0x87, /* à */ + 0x10, 0x87, /* á */ + 0x31, 0x27, /* â */ + 0x29, 0x47, /* ã */ + 0x28, /* ä */ + 0x10, 0xA1, /* å */ + 0x7F, 0x3F, 0x24, 0x1D, 0xC0, /* æ */ + 0x72, 0x10, 0x11, /* ç */ + 0x20, 0x40, /* è */ + 0x10, 0x80, /* é */ + 0x31, 0x20, /* ê */ + 0x28, /* ë */ + 0x88, /* ì */ + 0x28, /* í */ + 0x22, 0x80, /* î */ + 0xA0, /* ï */ + 0x28, 0x29, 0xE4, /* ð */ + 0x2A, 0x80, /* ñ */ + 0x20, 0x40, /* ò */ + 0x20, 0x40, /* ó */ + 0x31, 0x20, /* ô */ + 0x29, 0x40, /* õ */ + 0x28, /* ö */ + 0x10, 0x03, 0x10, /* ÷ */ + 0x29, 0x56, /* ø */ + 0x20, 0x80, /* ù */ + 0x11, /* ú */ + 0x22, 0x80, /* û */ + 0x28, /* ü */ + 0x11, /* ý */ + 0x71, 0x71, /* þ */ + /* ÿ */ +}; + +static const char zfont_normal_10_bases[64] = { + 'A', 'A', 'A', 'A', 'A', 'A', 0 , 0 , 'E', 'E', 'E', 'E', 0 , 0 , 0 , 0 , /*C0-CF*/ + 0 , 'N', 'O', 'O', 'O', 'O', 'O', 0 , 0 , 'U', 'U', 'U', 'U', 'Y', 0 , 0 , /*D0-DF*/ + 'a', 'a', 'a', 'a', 'a', 'a', 0 , 0 , 'e', 'e', 'e', 'e', 0 , 0 , 0 , 0 , /*E0-EF*/ + 0 , 'n', 'o', 'o', 'o', 'o', 'o', 0 , 0 , 'u', 'u', 'u', 'u', 'y', 0 , 'y', /*F0-FF*/ +}; + +static const unsigned char zfont_normal_21_info_idxs[] = { + 188, /* ! */ 0, /* " */ 188, /* # */ 188, /* $ */ + 188, /* % */ 1, /* & */ 188, /* ' */ 188, /* ( */ + 188, /* ) */ 2, /* * */ 188, /* + */ 188, /* , */ + 188, /* - */ 188, /* . */ 188, /* / */ 3, /* 0 */ + 188, /* 1 */ 4, /* 2 */ 5, /* 3 */ 188, /* 4 */ + 6, /* 5 */ 7, /* 6 */ 188, /* 7 */ 8, /* 8 */ + 9, /* 9 */ 188, /* : */ 188, /* ; */ 188, /* < */ + 188, /* = */ 188, /* > */ 188, /* ? */ 188, /* @ */ + 10, /* A */ 11, /* B */ 12, /* C */ 188, /* D */ + 188, /* E */ 188, /* F */ 13, /* G */ 188, /* H */ + 188, /* I */ 188, /* J */ 188, /* K */ 188, /* L */ + 188, /* M */ 188, /* N */ 14, /* O */ 188, /* P */ + 15, /* Q */ 16, /* R */ 17, /* S */ 188, /* T */ + 18, /* U */ 188, /* V */ 19, /* W */ +}; + +static const struct zfont_patch_info zfont_normal_21_infos[] = { + { 0, 1, 28, 0, 0 }, /* " */ + { 4, 1, 14, 0, 0 }, /* & */ + { 6, 5, 8, 0, 0 }, /* * */ + { 7, 0, 55, 11, 44 }, /* 0 */ + { 20, 0, 30, 14, 10 }, /* 2 */ + { 26, 0, 32, 6, 88 }, /* 3 */ + { 41, 2, 64, 11, 32 }, /* 5 */ + { 53, 0, 8, 13, 8 }, /* 6 */ + { 55, 0, 32, 5,108 }, /* 8 */ + { 73, 0, 99, 13, 8 }, /* 9 */ + { 87, 1, 12, 3, 8 }, /* A */ + { 90, 6, 36, 14, 12 }, /* B */ + { 97, 0, 12, 13, 14 }, /* C */ + { 101, 0, 8, 13, 12 }, /* G */ + { 104, 0, 80, 10, 80 }, /* O */ + { 124, 0, 80, 10, 48 }, /* Q */ + { 140, 3, 42, 0, 0 }, /* R */ + { 146, 0, 8, 13, 12 }, /* S */ + { 149, 10, 64, 0, 0 }, /* U */ + { 157, 1, 32, 0, 0 }, /* W */ +}; + +static const unsigned char zfont_normal_21_patches[] = { + 0x66, 0xCD, 0x9B, 0x30, /* " */ + 0x07, 0x80, /* & */ + 0x18, /* * */ + 0x00, 0x03, 0xF0, 0xE7, 0x18, 0x67, 0x0E, 0x70, 0xE6, 0x18, 0xE7, 0x0F, 0xC0, /* 0 */ + 0x00, 0x0F, 0xC7, 0x38, 0xFF, 0x80, /* 2 */ + 0x00, 0x03, 0xF0, 0xE7, 0x03, 0x81, 0xE0, 0x0E, 0x00, 0x60, 0x06, 0xC0, 0xD8, 0x31, 0xCE, /* 3 */ + 0x60, 0x0C, 0x01, 0x80, 0x30, 0x07, 0xF8, 0xE3, 0x00, 0x6C, 0x18, 0xE7, /* 5 */ + 0x00, 0x33, /* 6 */ + 0x00, 0x03, 0xE0, 0xC6, 0x60, 0xC6, 0x30, 0x7C, 0x18, 0xC6, 0x0C, 0xC1, 0x98, 0x33, 0x06, 0x31, 0x83, 0xE0, /* 8 */ + 0x00, 0x03, 0xE0, 0xC6, 0x30, 0x66, 0x0C, 0xC1, 0x98, 0x33, 0x8E, 0x3F, 0xC0, 0x33, /* 9 */ + 0x03, 0x00, 0x04, /* A */ + 0x60, 0xC7, 0xF8, 0x60, 0xC0, 0x7F, 0xC0, /* B */ + 0x00, 0x00, 0x1C, 0xF0, /* C */ + 0x00, 0x1C, 0x78, /* G */ + 0x00, 0x00, 0x0F, 0xF0, 0x1C, 0x38, 0x30, 0x0C, 0x30, 0x0C, 0x60, 0x06, 0x30, 0x0C, 0x30, 0x0C, 0x1C, 0x38, 0x0F, 0xF0, /* O */ + 0x00, 0x00, 0x0F, 0xF0, 0x1C, 0x38, 0x30, 0x0C, 0x30, 0x0C, 0x60, 0x06, 0x30, 0x0C, 0x38, 0x1C, /* Q */ + 0x60, 0x39, 0x80, 0x66, 0x03, 0x80, /* R */ + 0x00, 0x38, 0x70, /* S */ + 0x60, 0x19, 0x81, 0x8C, 0x0C, 0x30, 0xC0, 0xFC, /* U */ + 0x40, 0x60, 0x66, 0x06, /* W */ +}; + +static const unsigned char zfont_bold_21_info_idxs[] = { + 188, /* ! */ 188, /* " */ 188, /* # */ 188, /* $ */ + 188, /* % */ 188, /* & */ 188, /* ' */ 188, /* ( */ + 188, /* ) */ 188, /* * */ 188, /* + */ 188, /* , */ + 188, /* - */ 188, /* . */ 188, /* / */ 0, /* 0 */ + 188, /* 1 */ 1, /* 2 */ 2, /* 3 */ 188, /* 4 */ + 188, /* 5 */ 3, /* 6 */ 188, /* 7 */ 4, /* 8 */ + 5, /* 9 */ +}; + +static const struct zfont_patch_info zfont_bold_21_infos[] = { + { 0, 0, 55, 11, 44 }, /* 0 */ + { 13, 0, 66, 9, 66 }, /* 2 */ + { 31, 0, 22, 8, 11 }, /* 3 */ + { 36, 0, 8, 0, 0 }, /* 6 */ + { 37, 0, 60, 6,108 }, /* 8 */ + { 59, 0, 33, 0, 0 }, /* 9 */ +}; + +static const unsigned char zfont_bold_21_patches[] = { + 0x00, 0x03, 0xF0, 0xFF, 0x1C, 0xE7, 0x0E, 0x70, 0xE7, 0x38, 0xFF, 0x0F, 0xC0, /* 0 */ + 0x00, 0x03, 0xE0, 0xFE, 0x38, 0xE6, 0x0C, 0x01, 0x80, 0x0E, 0x03, 0x80, 0xE0, 0x38, 0x07, 0xFC, 0xFF, 0x80, /* 2 */ + 0x00, 0x03, 0xF0, 0x0F, 0x80, /* 3 */ + 0x00, /* 6 */ + 0x00, 0x01, 0xF0, 0x3F, 0x87, 0x1C, 0x60, 0xC0, 0x3F, 0x81, 0xF0, 0x3F, 0x87, 0x1C, 0x60, 0xC6, 0x0C, 0x71, 0xC3, 0xF8, 0x1F, 0x00, /* 8 */ + 0x00, 0x03, 0xF0, 0xFF, 0x00, /* 9 */ +}; + +static const unsigned char zfont_normal_28_info_idxs[] = { + 188, /* ! */ 188, /* " */ 188, /* # */ 188, /* $ */ + 188, /* % */ 188, /* & */ 188, /* ' */ 188, /* ( */ + 188, /* ) */ 188, /* * */ 188, /* + */ 188, /* , */ + 188, /* - */ 188, /* . */ 188, /* / */ 0, /* 0 */ + 188, /* 1 */ 1, /* 2 */ 2, /* 3 */ 188, /* 4 */ + 188, /* 5 */ 3, /* 6 */ 188, /* 7 */ 4, /* 8 */ + 5, /* 9 */ +}; + +static const struct zfont_patch_info zfont_normal_28_infos[] = { + { 0, 1,182, 15, 28 }, /* 0 */ + { 27, 0, 8, 9, 12 }, /* 2 */ + { 30, 0, 98, 15, 12 }, /* 3 */ + { 45, 10, 28, 0, 0 }, /* 6 */ + { 49, 0,238, 19, 12 }, /* 8 */ + { 81, 0, 40, 6, 70 }, /* 9 */ +}; + +static const unsigned char zfont_normal_28_patches[] = { + 0x0F, 0xC0, 0x7F, 0x83, 0x87, 0x0C, 0x0C, 0x70, 0x39, 0x80, 0x66, 0x01, 0x98, 0x06, 0x60, 0x19, 0x80, 0x66, 0x01, 0x98, 0x06, 0x60, 0x18, 0x60, 0x19, 0xC0, 0xC0, /* 0 */ + 0x00, 0x00, 0xE0, /* 2 */ + 0x00, 0x00, 0x7F, 0x83, 0xFF, 0x1C, 0x1C, 0x60, 0x39, 0x80, 0xE0, 0x03, 0x80, 0xE0, 0x18, /* 3 */ + 0x70, 0x39, 0xC0, 0xE0, /* 6 */ + 0x00, 0x00, 0x7F, 0x83, 0xFF, 0x1C, 0x0E, 0x60, 0x19, 0x80, 0x66, 0x01, 0x9C, 0x0E, 0x38, 0x70, 0x7F, 0x81, 0xFE, 0x0E, 0x1C, 0x70, 0x39, 0x80, 0x66, 0x01, 0x98, 0x06, 0x60, 0x18, 0x1F, 0xE0, /* 8 */ + 0x00, 0x00, 0x7F, 0x03, 0xFE, 0x60, 0x39, 0x80, 0xE6, 0x03, 0x9C, 0x1E, 0x70, 0xF8, /* 9 */ +}; + +static const struct zfont_patch_info zfont_upcean_20_infos[] = { + { 0, 1, 44, 11, 55 }, /* 0 */ + { 0, 0, 0, 0, 0 }, /* 1 */ + { 13, 1, 30, 14, 20 }, /* 2 */ + { 20, 1, 22, 12, 44 }, /* 3 */ + { 29, 8, 32, 12, 8 }, /* 4 */ + { 34, 1, 4, 0, 0 }, /* 5 */ + { 35, 8, 33, 12, 4 }, /* 6 */ + { 34, 1, 4, 0, 0 }, /* 7 */ + { 41, 5, 64, 13, 8 }, /* 8 */ + { 50, 3, 55, 10, 8 }, /* 9 */ + { 0, 0, 0, 0, 0 }, /* : */ + { 0, 0, 0, 0, 0 }, /* ; */ + { 58, 1, 32, 7, 64 }, /* < */ + { 0, 0, 0, 0, 0 }, /* = */ + { 70, 0, 66, 9, 40 }, /* > */ +}; + +static const unsigned char zfont_upcean_20_patches[] = { + 0x1E, 0x07, 0xE1, 0x86, 0x30, 0xC0, 0xC0, 0xCC, 0x31, 0x86, 0x1F, 0x81, 0xE0, /* 0 */ + 0x1F, 0x0F, 0xE7, 0x1C, 0x7F, 0x8F, 0xF0, /* 2 */ + 0xFF, 0xDF, 0xF8, 0x00, 0xC0, 0x33, 0xFE, 0x3F, 0x80, /* 3 */ + 0x62, 0x0C, 0x63, 0x0C, 0xFF, /* 4 */ + 0x7F, /* 5 */ + 0x71, 0x9C, 0x1B, 0x03, 0x60, 0xC0, /* 6 */ + 0x73, 0x87, 0xE0, 0x78, 0x1F, 0x87, 0x39, 0xC3, 0xE1, /* 8 */ + 0xE1, 0xD8, 0x1B, 0x03, 0x60, 0x6E, 0x1C, 0x03, /* 9 */ + 0x03, 0xC0, 0xF0, 0x78, 0x70, 0x07, 0x80, 0x78, 0x03, 0xC0, 0x3C, 0x01, /* < */ + 0xC0, 0x1E, 0x01, 0xE0, 0x0F, 0x00, 0xF0, 0x07, 0x00, 0x1E, 0x0F, 0x03, 0xC0, 0x60, /* > */ +}; + +#define rnd1dpf(arg) z_stripf(roundf((arg) * 10.0f) / 10.0f) /* Round to 1 decimal place */ + +#define ZFONT_UPCO_FONT_FACTOR 0.75f /* What to reduce UPC-E, UPC-A font by for outside chars */ + +/* Initialize a font */ +INTERNAL int zint_font_init(struct zfont *zfnt, struct zint_symbol *symbol, const int upceanflag) { + const int bold = upceanflag ? 0 : symbol->output_options & BOLD_TEXT; + const unsigned char *const data = upceanflag ? upcean_ttf : bold ? normal_bold_ttf : normal_ttf; + + memset(zfnt, 0, sizeof(*zfnt)); + + zfnt->upceanflag = upceanflag; + + if (!stbtt_InitFont(&zfnt->info, data, 0 /*offset*/)) { + return z_errtxt(ZINT_ERROR_ENCODING_PROBLEM, symbol, 0, "Internal error: failed to initialize font"); + } + + zfnt->patch_info_idxs = NULL; + zfnt->patch_infos = NULL; + zfnt->patches = NULL; + zfnt->bases = NULL; + zfnt->upco_patch_infos = NULL; + zfnt->upco_patches = NULL; + + zfnt->first_ch = 255; + zfnt->last_ch = 0; + + if ((zfnt->space_glyph = stbtt_FindGlyphIndex(&zfnt->info, ' ')) == 0) { + zfnt->space_glyph = -1; + } + + return 0; +} + +/* Free any resources used */ +INTERNAL void zint_font_free(struct zfont *zfnt, const int si) { + assert(zfnt); + if (si) { + const int upcea = zfnt->upceanflag == OUT_UPCEANFLAG_UPCE || zfnt->upceanflag == OUT_UPCEANFLAG_UPCA; + int i; + assert(zfnt->first_ch >= 0 && zfnt->last_ch <= 255); + for (i = zfnt->first_ch; i <= zfnt->last_ch; i++) { + if (zfnt->bitmaps[i]) { + free(zfnt->bitmaps[i]); + zfnt->bitmaps[i] = NULL; + } + } + if (upcea) { + for (i = 0; i < 10; i++) { + if (zfnt->upco_bitmaps[i]) { + free(zfnt->upco_bitmaps[i]); + zfnt->upco_bitmaps[i] = NULL; + } + } + } + } +} + +static void zfont_set_patches(struct zfont *zfnt, struct zint_symbol *symbol) { + const int bold = zfnt->upceanflag ? 0 : symbol->output_options & BOLD_TEXT; + + if (!zfnt->upceanflag) { + if (zfnt->font_height == 14) { + if (bold) { + zfnt->patch_info_idxs = zfont_bold_14_info_idxs; + zfnt->patch_info_idxs_size = (int) sizeof(zfont_bold_14_info_idxs); + zfnt->patch_infos = zfont_bold_14_infos; + zfnt->patches = zfont_bold_14_patches; + zfnt->bases = zfont_bold_14_bases; + } else { + zfnt->patch_info_idxs = zfont_normal_14_info_idxs; + zfnt->patch_info_idxs_size = (int) sizeof(zfont_normal_14_info_idxs); + zfnt->patch_infos = zfont_normal_14_infos; + zfnt->patches = zfont_normal_14_patches; + zfnt->bases = zfont_normal_14_bases; + } + } else if (zfnt->font_height == 10) { + if (bold) { + } else { + zfnt->patch_infos = zfont_normal_10_infos; + zfnt->patches = zfont_normal_10_patches; + zfnt->bases = zfont_normal_10_bases; + } + } else if (zfnt->font_height == 21) { + if (bold) { + zfnt->patch_info_idxs = zfont_bold_21_info_idxs; + zfnt->patch_info_idxs_size = (int) sizeof(zfont_bold_21_info_idxs); + zfnt->patch_infos = zfont_bold_21_infos; + zfnt->patches = zfont_bold_21_patches; + } else { + zfnt->patch_info_idxs = zfont_normal_21_info_idxs; + zfnt->patch_info_idxs_size = (int) sizeof(zfont_normal_21_info_idxs); + zfnt->patch_infos = zfont_normal_21_infos; + zfnt->patches = zfont_normal_21_patches; + } + } else if (zfnt->font_height == 28) { + if (bold) { + } else { + zfnt->patch_info_idxs = zfont_normal_28_info_idxs; + zfnt->patch_info_idxs_size = (int) sizeof(zfont_normal_28_info_idxs); + zfnt->patch_infos = zfont_normal_28_infos; + zfnt->patches = zfont_normal_28_patches; + } + } + } else { + if (zfnt->font_height == 20) { + zfnt->patch_infos = zfont_upcean_20_infos; + zfnt->patches = zfont_upcean_20_patches; + } + } +} + +static float zfont_stb_hadvance(const struct zfont *zfnt, const int ch, const int next_ch, const int upco) { + float scaled_hadvance = 0.0f; + int advanceWidth, leftSideBearing; + + if (upco) { + const int upco_ch = ch - '0'; + assert(next_ch == 0); + if (zfnt->upco_glyphs[upco_ch] != -1) { + stbtt_GetGlyphHMetrics(&zfnt->info, zfnt->upco_glyphs[upco_ch], &advanceWidth, &leftSideBearing); + scaled_hadvance = z_stripf(advanceWidth * zfnt->upco_scale); + } + } else if (zfnt->glyphs[ch] != -1) { + stbtt_GetGlyphHMetrics(&zfnt->info, zfnt->glyphs[ch], &advanceWidth, &leftSideBearing); + if (next_ch && zfnt->glyphs[next_ch] != -1) { + const int kern_advance = stbtt_GetGlyphKernAdvance(&zfnt->info, zfnt->glyphs[ch], zfnt->glyphs[next_ch]); + scaled_hadvance = z_stripf((advanceWidth + kern_advance) * zfnt->scale); + } else { + scaled_hadvance = z_stripf(advanceWidth * zfnt->scale); + } + } + + return scaled_hadvance; +} + +static const struct zfont_patch_info *zfont_patch_info_get(const struct zfont *zfnt, const int ch) { + if (z_iscntrl(ch) || ch == ' ' || (!z_isascii(ch) && ch < 0xA0) || ch == 0xAD /*SHY*/) { + return NULL; + } else { + const unsigned char ch_idx = zfnt->upceanflag ? ch - '0' + : z_isascii(ch) ? ch - 0x21 : ch < 0xAD ? ch - 0x43 : ch - 0x44; + if (zfnt->patch_info_idxs) { + return ch_idx >= zfnt->patch_info_idxs_size || zfnt->patch_info_idxs[ch_idx] == 188 + ? NULL : zfnt->patch_infos + zfnt->patch_info_idxs[ch_idx]; + } + return zfnt->patch_infos + ch_idx; + } +} + +static const unsigned char *zfont_do_patch(const unsigned char *patch, const int len, unsigned char *pb, + unsigned char *const pbe) { + int i, j; + for (i = 0; i < len; i += 8) { + for (j = 0; j < 8 && j + i < len && pb < pbe; j++) { + *pb++ = '0' + ((*patch >> (7 - j)) & 1); + } + patch++; + } + return patch; +} + +static void zfont_patch(struct zfont *zfnt, const int ch, int bitmap_dims[4], unsigned char *bitmap, + unsigned char *const pbe, const int upco) { + if (upco) { + if (zfnt->upco_patch_infos) { + } + } + if (zfnt->patch_infos) { + const struct zfont_patch_info *patch_info = zfont_patch_info_get(zfnt, ch); + if (patch_info) { + if (patch_info->len && patch_info->row >= 0) { + const int out_w = bitmap_dims[0]; + unsigned char *pb = bitmap + patch_info->row * out_w; + const unsigned char *patch = zfnt->patches + patch_info->offset; + patch = zfont_do_patch(patch, patch_info->len, pb, pbe); + if (patch_info->len2 && patch_info->row2 >= 0) { + pb = bitmap + patch_info->row2 * out_w; + (void) zfont_do_patch(patch, patch_info->len2, pb, pbe); + } + } + } + if (ch >= 0xC0 && ch <= 0xFF && zfnt->bases && zfnt->bases[ch - 0xC0]) { + const int bch = zfnt->bases[ch - 0xC0]; + const struct zfont_patch_info *bpatch_info = zfont_patch_info_get(zfnt, bch); + if (bpatch_info) { + const int brow = patch_info && patch_info->row2 < 0 ? -patch_info->row2 : 0; + const int out_w = bitmap_dims[0]; + unsigned char *pb = bitmap + (bpatch_info->row + brow) * out_w; + const unsigned char *patch = zfnt->patches + bpatch_info->offset; + patch = zfont_do_patch(patch, bpatch_info->len, pb, pbe); + if (bpatch_info->len2 && bpatch_info->row2 >= 0) { + pb = bitmap + (bpatch_info->row2 + brow) * out_w; + (void) zfont_do_patch(patch, bpatch_info->len2, pb, pbe); + } + } + } + } +} + +static int zfont_set_bitmap(struct zfont *zfnt, struct zint_symbol *symbol, const int ch, const float scale, + int *p_glyph, int bitmap_dims[4], unsigned char **p_bitmap, const int upco) { + int glyph = *p_glyph; + unsigned char *bitmap = NULL; + int xMin, yMin, xMax, yMax; + int out_w, out_h; + size_t out_wh; + + stbtt_GetGlyphBitmapBoxSubpixel(&zfnt->info, glyph, scale, scale, 0.0f /*shift_x*/, 0.0f /*shift_y*/, + &xMin, &yMin, &xMax, &yMax); + bitmap_dims[0] = out_w = xMax - xMin; + bitmap_dims[1] = out_h = yMax - yMin; + bitmap_dims[2] = xMin; + bitmap_dims[3] = yMin; + out_wh = (size_t) out_h * out_w; + if (!out_wh) { + glyph = zfnt->space_glyph; + } else { + if (!(bitmap = malloc(out_wh))) { + return z_errtxt(ZINT_ERROR_MEMORY, symbol, 651, "Insufficient memory for glyph bitmap buffer"); + } + if (!stbtt_MakeGlyphBitmapSubpixel(&zfnt->info, bitmap, out_w, out_h, out_w /*out_stride*/, + scale, scale, 0.0f /*shift_x*/, 0.0f /*shift_y*/, glyph)) { + return z_errtxtf(ZINT_ERROR_ENCODING_PROBLEM, symbol, 0, + "Internal error: failed to get glyph bitmap (%d)", ch); + } + if (!zfnt->grayscale) { + unsigned char *pb = bitmap; + unsigned char *const pbe = pb + out_wh; + for (; pb < pbe; pb++) { + *pb = '0' + (*pb >= 0x80); + } + zfont_patch(zfnt, ch, bitmap_dims, bitmap, pbe, upco); + } + } + *p_glyph = glyph; + *p_bitmap = bitmap; + return 0; +} + +static int zfont_set_glyph(struct zfont *zfnt, struct zint_symbol *symbol, const int si, const int ch) { + if (!zfnt->glyphs[ch]) { + if ((zfnt->glyphs[ch] = stbtt_FindGlyphIndex(&zfnt->info, ch)) == 0) { + zfnt->glyphs[ch] = zfnt->space_glyph; + } else if (si) { + int error_number; + if ((error_number = zfont_set_bitmap(zfnt, symbol, ch, zfnt->scale, &zfnt->glyphs[ch], + zfnt->bitmap_dims[ch], &zfnt->bitmaps[ch], 0 /*upco*/))) { + return error_number; + } + if (ch < zfnt->first_ch) { + zfnt->first_ch = ch; + } + if (ch > zfnt->last_ch) { + zfnt->last_ch = ch; + } + } + } + return 0; +} + +static int zfont_upco_set_glyph(struct zfont *zfnt, struct zint_symbol *symbol, const int si, const int ch) { + const int upco_ch = ch - '0'; + if (!zfnt->upco_glyphs[upco_ch]) { + if ((zfnt->upco_glyphs[upco_ch] = stbtt_FindGlyphIndex(&zfnt->info, upco_ch)) == 0) { + zfnt->upco_glyphs[upco_ch] = -1; + } else if (si) { + int error_number; + if ((error_number = zfont_set_bitmap(zfnt, symbol, ch, zfnt->upco_scale, &zfnt->upco_glyphs[upco_ch], + zfnt->upco_bitmap_dims[upco_ch], &zfnt->upco_bitmaps[upco_ch], + 1 /*upco*/))) { + return error_number; + } + } + } + return 0; +} + +/* Calculate various font metrics, and return total height of text */ +INTERNAL int zint_font_text_height(struct zfont *zfnt, struct zint_symbol *symbol, const int si, + const float max_width, const unsigned char addon[6], const int addon_len) { + int error_number = 0; + const int small_text = symbol->output_options & SMALL_TEXT; + const int upcea = zfnt->upceanflag == OUT_UPCEANFLAG_UPCE || zfnt->upceanflag == OUT_UPCEANFLAG_UPCA; + const int ean2_5 = zfnt->upceanflag == OUT_UPCEANFLAG_EAN2 || zfnt->upceanflag == OUT_UPCEANFLAG_EAN5; + const int upcean_guard_whitespace = !(symbol->output_options & BARCODE_NO_QUIET_ZONES) + && (symbol->output_options & EANUPC_GUARD_WHITESPACE); + const int hrt_font_height = (symbol->show_hrt >> 16) & 0xFF; + const float nonzero_si = si ? si : 2.0f; + const float antialias_fudge_factor = 0.01f; + + int ascent, descent, lineGap; + float descent_factor; + float line_height; + float text_height; + int i; + + zfnt->grayscale = zint_out_grayscale(symbol); + + /* Temporarily not allowing font height for EAN/UPC */ + if (!zfnt->upceanflag && hrt_font_height >= 10 && hrt_font_height <= 200) { + zfnt->font_height = hrt_font_height; + + /* If were using for EAN/UPC set UPC-E/A outside font height */ + if (upcea) { + zfnt->upco_font_height = (int) ceilf(hrt_font_height * ZFONT_UPCO_FONT_FACTOR); + } + } else { + if (zfnt->upceanflag) { + const float digit_ascender_factor = 0.11f; /* Assuming digit ascender height roughly 11% of font size */ + zfnt->font_height = (small_text ? 7 : 10) * nonzero_si; + if (upcea) { + /* Although font size 7 (for normal) seems small it meets GS1 General Spec (GGS) Section 5.2.5: + "the size of the first and last digits should be reduced to a maximum width equivalent to four + modules" */ + zfnt->upco_font_height = (small_text ? 6 : 7) * nonzero_si; + } + zfnt->digit_ascender = z_stripf(zfnt->font_height * digit_ascender_factor); + } else { + zfnt->font_height = (small_text ? 5 : 7) * nonzero_si; + } + } + zfnt->antialias_fudge = z_stripf(zfnt->font_height * antialias_fudge_factor); + + zfont_set_patches(zfnt, symbol); + + assert(zfnt->info.data); + + zfnt->scale = stbtt_ScaleForMappingEmToPixels(&zfnt->info, zfnt->font_height); + if (upcea) { + zfnt->upco_scale = stbtt_ScaleForMappingEmToPixels(&zfnt->info, zfnt->upco_font_height); + } + + stbtt_GetFontVMetrics(&zfnt->info, &ascent, &descent, &lineGap); + zfnt->ascent = z_stripf(ascent * zfnt->scale); + descent_factor = ascent - descent ? (float) -descent / (ascent - descent) : 0.5f /*50%*/; + zfnt->descent_adj = z_stripf(zfnt->font_height * descent_factor); + zfnt->line_gap = z_stripf(lineGap * zfnt->scale); + + line_height = z_stripf((ascent - descent + lineGap) * zfnt->scale); + + /* Set glyphs & calculate text widths & lines */ + if (zfnt->upceanflag <= OUT_UPCEANFLAG_EAN5) { + /* All non-EAN/UPC barcodes + EAN-2 & EAN-5 */ + unsigned int u, state = 0; + int iso_map[ZFONT_MAX_CHARS] = {0}; + int iso_len = 0; + + float line_width = 0; + int lines = 0; + int iso_line_idx = 0; + int last_oversized = 0; + + const int length = (int) z_ustrlen(symbol->text); + + /* Convert HRT from UTF-8 to ISO/IEC 8859-1 (only printing this for now) */ + for (i = 0; i < length;) { + iso_map[iso_len] = i; + do { + z_decode_utf8(&state, &u, symbol->text[i++]); + } while (i < length && state != 0 && state != 12); + assert(state == 0); /* UTF-8 must be valid to have got here */ + zfnt->iso_text[iso_len++] = (unsigned char) (u <= 0xFF ? u : ' '); + } + iso_map[iso_len] = i; + + zfnt->iso_text[iso_len] = '\0'; + zfnt->iso_len = iso_len; + + for (i = 0; i < zfnt->iso_len; i++) { + const unsigned char ch = zfnt->iso_text[i]; + const unsigned char next_ch = i + i < zfnt->iso_len ? zfnt->iso_text[i + 1] : 0; + + if ((error_number = zfont_set_glyph(zfnt, symbol, si, ch))) { + return error_number; + } + if (next_ch && (error_number = zfont_set_glyph(zfnt, symbol, si, next_ch))) { + return error_number; + } + zfnt->hadvances[i] = zfont_stb_hadvance(zfnt, ch, next_ch, 0 /*upco*/); + + if (ch == '\n') { + if (lines + 1 == ZFONT_MAX_LINES) { + break; + } + zfnt->iso_line_idxs[lines] = iso_line_idx; + zfnt->line_idxs[lines] = iso_map[iso_line_idx]; + iso_line_idx = i; + zfnt->line_widths[lines] = line_width; + if (line_width > zfnt->max_line_width) { + zfnt->max_line_width = line_width; + } + line_width = 0; + lines++; + } else if (line_width + zfnt->hadvances[i] >= max_width) { + if (lines + 1 == ZFONT_MAX_LINES) { + break; + } + zfnt->iso_line_idxs[lines] = iso_line_idx; + zfnt->line_idxs[lines] = iso_map[iso_line_idx]; + last_oversized = i == iso_line_idx; + if (last_oversized) { + assert(line_width == 0); + assert(zfnt->hadvances[i] >= max_width); + zfnt->line_widths[lines] = max_width; + if (max_width > zfnt->max_line_width) { + zfnt->max_line_width = max_width; + } + line_width = 0; + } else { + iso_line_idx = i; + zfnt->line_widths[lines] = line_width; + if (line_width > zfnt->max_line_width) { + zfnt->max_line_width = line_width; + } + line_width = zfnt->hadvances[i]; + } + lines++; + } else { + line_width += zfnt->hadvances[i]; + } + } + if (lines + 1 != ZFONT_MAX_LINES && !last_oversized) { + zfnt->iso_line_idxs[lines] = iso_line_idx; + zfnt->line_idxs[lines] = iso_map[iso_line_idx]; + zfnt->line_widths[lines] = line_width; + if (line_width > zfnt->max_line_width) { + zfnt->max_line_width = line_width; + } + lines++; + } + + zfnt->lines = lines; + zfnt->line_advance = (int) roundf(line_height); + + if (ean2_5) { + /* Temp hack for backwards-compatibility */ + text_height = si ? 7 * si : 10 * 2; + } else { + text_height = z_stripf((ascent - descent) * zfnt->scale); + if (lines > 1) { + text_height += zfnt->line_advance * (lines - 1); + } + } + + if (ean2_5 && upcean_guard_whitespace) { + const unsigned char ch = '>'; + assert(lines > 0 && lines + 1 < ZFONT_MAX_LINES); + zfnt->iso_text[iso_len++] = ch; + zfnt->iso_line_idxs[lines] = zfnt->iso_line_idxs[lines - 1]; + zfnt->line_idxs[zfnt->lines] = zfnt->iso_line_idxs[lines]; + if ((error_number = zfont_set_glyph(zfnt, symbol, si, ch))) { + return error_number; + } + zfnt->line_widths[lines] = zfont_stb_hadvance(zfnt, ch, 0 /*next_ch*/, 0 /*upco*/); + zfnt->line_idxs[lines] = length + 1; + zfnt->iso_line_idxs[zfnt->lines] = zfnt->iso_len + 1; + } else { + zfnt->line_idxs[zfnt->lines] = length; + zfnt->iso_line_idxs[zfnt->lines] = zfnt->iso_len; + } + + } else { + /* UPC-E, EAN-8, UPC-A, EAN-13 */ + /* Following just a bug-filled sketch, not used */ + float line_width = 0; + int lines = 0; + int iso_line_idx = 0; + int length; + int addon_idx = 0; + if (zfnt->upceanflag == OUT_UPCEANFLAG_EAN8 && upcean_guard_whitespace) { + zfnt->iso_text[0] = '<'; + assert(symbol->text_length >= 8); + memcpy(zfnt->iso_text + 1, symbol->text, 8); + length = 9; + if (!addon_len) { + zfnt->iso_text[length++] = '>'; + } + } else { + memcpy(zfnt->iso_text, symbol->text, symbol->text_length); + length = symbol->text_length; + } + if (addon_len) { + addon_idx = length; + memcpy(zfnt->iso_text + length, addon, addon_len); + length += addon_len; + if (upcean_guard_whitespace) { + zfnt->iso_text[length++] = '>'; + } + } + for (i = 0; i < length; i++) { + const unsigned char ch = zfnt->iso_text[i]; + if (upcea && (i == 0 || (zfnt->upceanflag == OUT_UPCEANFLAG_UPCE && i == 7) + || (zfnt->upceanflag == OUT_UPCEANFLAG_UPCA && i == 11))) { + if ((error_number = zfont_upco_set_glyph(zfnt, symbol, si, ch))) { + return error_number; + } + zfnt->hadvances[i] = zfont_stb_hadvance(zfnt, ch, 0 /*next_ch*/, 1 /*upco*/); + zfnt->iso_line_idxs[lines] = iso_line_idx; + lines++; + } else { + const int new_line = (zfnt->upceanflag == OUT_UPCEANFLAG_UPCE && i == 6) + || (zfnt->upceanflag == OUT_UPCEANFLAG_EAN8 && (i == 3 || i == 7)) + || (zfnt->upceanflag == OUT_UPCEANFLAG_UPCA && (i == 5 || i == 10)) + || (zfnt->upceanflag == OUT_UPCEANFLAG_EAN13 && (i == 0 || i == 6 || i == 12)) + || (addon_len && (i == addon_idx + || (upcean_guard_whitespace && i + 1 == length))); + const unsigned next_ch = i + 1 < length && !new_line ? zfnt->iso_text[i + 1] : 0; + if ((error_number = zfont_set_glyph(zfnt, symbol, si, ch))) { + return error_number; + } + if (next_ch && (error_number = zfont_set_glyph(zfnt, symbol, si, next_ch))) { + return error_number; + } + zfnt->hadvances[i] = zfont_stb_hadvance(zfnt, ch, next_ch, 0 /*upco*/); + if (new_line) { + zfnt->iso_line_idxs[lines] = iso_line_idx; + zfnt->line_idxs[lines] = iso_line_idx; + iso_line_idx = i; + zfnt->line_widths[lines] = line_width; + line_width = zfnt->hadvances[i]; + lines++; + } else { + line_width += zfnt->hadvances[i]; + } + } + } + zfnt->iso_line_idxs[lines] = iso_line_idx; + zfnt->line_idxs[lines] = iso_line_idx; + zfnt->line_widths[lines] = line_width; + + /* Temp hack for backwards-compatibility */ + if (si) { + text_height = z_stripf(7 * si); + } else { + text_height = z_stripf(zfnt->font_height); + } + } + + /* Return `text_height` in 2-pixel `scale` units */ + zfnt->text_height = z_stripf(text_height / nonzero_si); + + return 0; +} + +/* Raster rendering */ +INTERNAL void zint_font_text_render(struct zfont *zfnt, struct zint_symbol *symbol, unsigned char *pixelbuf, + const int line, const int main_width, const int xoffset, const int roffset, const int yposn, + const int textflags, const int image_width, const int image_height, const int si) { + const unsigned char *const pe = pixelbuf + image_width * image_height; + const unsigned char *const text = zfnt->iso_text; + int start = zfnt->iso_line_idxs[line]; + const int end = zfnt->iso_line_idxs[line + 1]; + const int max_width = (int) roundf(zfnt->max_line_width); + const int text_width = (int) roundf(zfnt->line_widths[line]); + const int full_width = main_width + xoffset + roffset; + int xposn; + float x, y; + int yi; + int i, j, k; + + (void)symbol, (void)si; + + if (max_width >= full_width) { + xposn = 0; + } else { + if (textflags & OUT_HALIGN_LEFT) { + xposn = max_width > main_width + xoffset ? 0 : xoffset; + } else if (textflags & OUT_HALIGN_RIGHT) { + xposn = (max_width > main_width + roffset ? max_width : main_width + roffset) - text_width; + } else { + if (main_width > text_width) { + xposn = xoffset + (main_width - text_width) / 2; + } else { + xposn = (full_width - text_width) / 2; + } + } + } + if (xposn < 0) { + xposn = 0; + } + + x = xposn; + /* For compatibility with vector, steal some space from the font's inleading (accent space) + TODO: not do this or use proper `inleading_adj` calculation */ + y = z_stripf(yposn + zfnt->ascent - zfnt->descent_adj / 2.0f); + yi = (int) ceilf(y); + + if (start < end && text[start] == '\n') { + /* Ignore newline at start of line */ + start++; + } + for (i = start; i < end; i++) { + const int ch = text[i]; + const int out_w = zfnt->bitmap_dims[ch][0]; + const int out_h = zfnt->bitmap_dims[ch][1]; + + if (out_w > 0 && out_h > 0) { + const int xMin = zfnt->bitmap_dims[ch][2]; + const int yMin = zfnt->bitmap_dims[ch][3]; + const int xi = (int) roundf(x); + unsigned char *const out = zfnt->bitmaps[ch]; + for (j = 0; j < out_h; j++) { + unsigned char *pb = pixelbuf + (yi + yMin + j) * image_width + xi + xMin; + const unsigned char *const pedge = pb + (image_width - xi - xMin); + const unsigned char *const pbe = pedge < pe ? pedge : pe; + const unsigned char *const o = out + j * out_w; + for (k = 0; k < out_w && pb < pbe; k++) { + *pb++ |= o[k]; + } + } + } + + x += zfnt->hadvances[i]; + } +} + +/* vim: set ts=4 sw=4 et : */ diff --git a/backend/zfont.h b/backend/zfont.h new file mode 100644 index 00000000..01ffdee5 --- /dev/null +++ b/backend/zfont.h @@ -0,0 +1,121 @@ +/* zfont.h - handle fonts */ +/* + libzint - the open source barcode library + Copyright (C) 2026 Robin Stuart + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the project nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + */ +/* SPDX-License-Identifier: BSD-3-Clause */ + +#ifndef Z_FONT_H +#define Z_FONT_H + +#define ZFONT_MAX_CHARS ((int) sizeof(((struct zint_symbol *)0)->text)) +#define ZFONT_MAX_LINES ZFONT_MAX_CHARS + +/* NOTE: ZFONT_HALIGN_XXX be same as vector_string->halign */ +#define ZFONT_HALIGN_CENTRE 0 +#define ZFONT_HALIGN_LEFT 1 +#define ZFONT_HALIGN_RIGHT 2 +#define ZFONT_UPCEAN_TEXT 4 /* Helper flag to indicate dealing with EAN/UPC */ +#define ZFONT_UPCO_TEXT 8 + +#define STBTT_STATIC +#include "stb_truetype_zint.h" + +struct zfont_patch_info; + +struct zfont { + stbtt_fontinfo info; + + /* Raster patching */ + const unsigned char *patch_info_idxs; + const struct zfont_patch_info *patch_infos; + const unsigned char *patches; + const char *bases; + int patch_info_idxs_size; + + const struct zfont_patch_info *upco_patch_infos; + const unsigned char *upco_patches; + + int upceanflag; + int grayscale; + + float scale; /* stb scale */ + float upco_scale; /* stb scale for UPC-E/A outside digits */ + + int font_height; + int upco_font_height; /* UPC-E/A outside digits font size */ + float ascent; + float descent_adj; + float line_gap; + float text_height; + + /* Note using "ascender" to mean height above digits as "ascent" usually measured from baseline */ + float digit_ascender; + float text_gap_antialias; + float antialias_fudge; + + float hadvances[ZFONT_MAX_CHARS]; /* Horizontal advances */ + float line_widths[ZFONT_MAX_LINES]; + float max_line_width; + unsigned char line_idxs[ZFONT_MAX_LINES + 1]; /* Line indices into `symbol->text`; last extra index is length */ + unsigned char iso_line_idxs[ZFONT_MAX_LINES + 1]; /* Line indices into `iso_text`; last extra index is length */ + int lines; /* Number of lines */ + int line_advance; /* Size (height) of each line */ + + unsigned char iso_text[ZFONT_MAX_CHARS]; /* `symbol->text` converted to ISO/IEC 8859-1 */ + int iso_len; /* Length of `iso_text[]` */ + + int glyphs[256]; /* Font glyphs (confined to ISO/IEC 8859-1, i.e. <= 0xFF) */ + unsigned char *bitmaps[256]; /* Rendered bitmaps per glyph */ + int bitmap_dims[256][4]; /* { width, height, `xMin`, `yMin` } */ + int space_glyph; + int first_ch, last_ch; /* First/last bitmap character used */ + + /* UPC-E/A outside stuff */ + int upco_glyphs[10]; /* Digits only */ + unsigned char *upco_bitmaps[10]; /* Rendered bitmaps per UPC-E/A outside glyph */ + int upco_bitmap_dims[10][4]; /* { width, height, `xMin`, `yMin` } */ +}; + +/* Initialize a font */ +INTERNAL int zint_font_init(struct zfont *zfnt, struct zint_symbol *symbol, const int upceanflag); + +/* Free any resources */ +INTERNAL void zint_font_free(struct zfont *zfnt, const int si); + +/* Calculate various font metrics, and set total height of text in `zfnt->text_height` */ +INTERNAL int zint_font_text_height(struct zfont *zfnt, struct zint_symbol *symbol, const int si, + const float max_width, const unsigned char addon[6], const int addon_len); + +/* Raster rendering */ +INTERNAL void zint_font_text_render(struct zfont *zfnt, struct zint_symbol *symbol, unsigned char *pixelbuf, + const int line, const int main_width, const int xoffset, const int roffset, const int yposn, + const int textflags, const int image_width, const int image_height, const int si); + +/* vim: set ts=4 sw=4 et : */ +#endif /* Z_FONT_H */ diff --git a/backend/zint.h b/backend/zint.h index 109bef0c..f66e9d87 100644 --- a/backend/zint.h +++ b/backend/zint.h @@ -320,6 +320,18 @@ extern "C" { #define GS1SYNTAXENGINE_MODE 0x0200 /* Use the GS1 Syntax Engine (if available) to strictly validate GS1 input */ #define GS1RAW_MODE 0x0400 /* Process GS1 data literally (no AI delimiters), parsing GSs as FNC1s */ +/* HRT options (`symbol->show_hrt`) */ +#define ZINT_HRT_DEFAULT 1 /* Show for most linear barcodes excepting postal and some others (default) */ +#define ZINT_HRT_LINEAR_ALL 2 /* Show for all linear barcodes */ +#define ZINT_HRT_STACKED 3 /* Show for stacked barcodes, incl. all linear */ +#define ZINT_HRT_ALL 4 /* Show for all barcodes, incl. matrix (2D), stacked & all linear */ +/* The following may be OR-ed with above */ +#define ZINT_HRT_GRAYSCALE 0x0008 /* Use 8-bit grayscale */ +#define ZINT_HRT_GREYSCALE 0x0008 /* Synonym for above */ +#define ZINT_HRT_HALIGN_LEFT 0x0010 /* Horizontally align HRT left (default is centred) */ +#define ZINT_HRT_HALIGN_RIGHT 0x0020 /* Horizontally align HRT right */ +#define ZINT_HRT_GS1_NEWLINE 0x0040 /* Put each GS1 AI on a separate line (may wrap) */ + /* Aztec Code specific options (`symbol->option_3`) */ #define ZINT_AZTEC_FULL 128 /* Only consider Full versions on automatic symbol size selection */ diff --git a/backend_qt/qzint.cpp b/backend_qt/qzint.cpp index 0665553e..589eb630 100644 --- a/backend_qt/qzint.cpp +++ b/backend_qt/qzint.cpp @@ -180,8 +180,8 @@ namespace Zint { m_fgStr(QSL("000000")), m_bgStr(QSL("FFFFFF")), m_cmyk(false), m_borderType(0), m_borderWidth(0), m_whitespace(0), m_vwhitespace(0), - m_fontSetting(0), - m_show_hrt(true), + m_show_hrt(ZINT_HRT_ALL), + m_fontSetting(0), m_halign(0), m_font_height(0), m_grayscale(false), m_gs1_newline(false), m_gssep(false), m_quiet_zones(false), m_no_quiet_zones(false), m_compliant_height(false), @@ -259,7 +259,23 @@ namespace Zint { m_zintSymbol->option_1 = m_option_1; m_zintSymbol->option_2 = m_option_2; m_zintSymbol->option_3 = m_option_3; - m_zintSymbol->show_hrt = m_show_hrt ? 1 : 0; + + m_zintSymbol->show_hrt = m_show_hrt; + if (m_grayscale) { + m_zintSymbol->show_hrt |= ZINT_HRT_GRAYSCALE; + } + if (m_halign == ZINT_HRT_HALIGN_LEFT) { + m_zintSymbol->show_hrt |= ZINT_HRT_HALIGN_LEFT; + } else if (m_halign == ZINT_HRT_HALIGN_RIGHT) { + m_zintSymbol->show_hrt |= ZINT_HRT_HALIGN_RIGHT; + } + if (m_gs1_newline) { + m_zintSymbol->show_hrt |= ZINT_HRT_GS1_NEWLINE; + } + if (m_font_height >= 10 && m_font_height <= 200) { + m_zintSymbol->show_hrt |= m_font_height << 16; + } + m_zintSymbol->input_mode = m_input_mode; if (m_gs1parens) { m_zintSymbol->input_mode |= GS1PARENS_MODE; @@ -273,6 +289,7 @@ namespace Zint { if (m_gs1syntaxengine) { m_zintSymbol->input_mode |= GS1SYNTAXENGINE_MODE; } + m_zintSymbol->eci = m_eci; m_zintSymbol->dpmm = m_dpmm; m_zintSymbol->dot_size = m_dot_size; @@ -676,11 +693,57 @@ namespace Zint { /* Show (true) or hide (false) Human Readable Text (HRT) */ bool QZint::showText() const { - return m_show_hrt; + return !!m_show_hrt; } void QZint::setShowText(bool showText) { - m_show_hrt = showText; + m_show_hrt = showText ? ZINT_HRT_ALL : 0; + } + + /* Horizontal alignment of HRT */ + int QZint::halign() const { + return m_halign; + } + + void QZint::setHAlign(int halignIndex) { // Sets from combobox index + if (halignIndex == 1) { + m_halign = ZINT_HRT_HALIGN_LEFT; + } else if (halignIndex == 2) { + m_halign = ZINT_HRT_HALIGN_RIGHT; + } else { + m_halign = 0; + } + } + + void QZint::setHAlignValue(int halign) { // Sets literal value + m_halign = halign == ZINT_HRT_HALIGN_LEFT || halign == ZINT_HRT_HALIGN_RIGHT ? halign : 0; + } + + /* Font height */ + int QZint::fontHeight() const { + return m_font_height; + } + + void QZint::setFontHeight(int fontHeight) { + m_font_height = fontHeight >= 10 && fontHeight <= 200 ? fontHeight : 0; + } + + /* 8-bit grayscale raster font mode */ + bool QZint::grayscale() const { + return m_grayscale; + } + + void QZint::setGrayscale(bool grayscale) { + m_grayscale = grayscale; + } + + /* 8-bit grayscale raster font mode */ + bool QZint::gs1Newline() const { + return m_gs1_newline; + } + + void QZint::setGS1Newline(bool gs1Newline) { + m_gs1_newline = gs1Newline; } /* Set to true to use GS (Group Separator) instead of FNC1 as GS1 separator (Data Matrix) */ diff --git a/backend_qt/qzint.h b/backend_qt/qzint.h index f4741a83..24b0abc8 100644 --- a/backend_qt/qzint.h +++ b/backend_qt/qzint.h @@ -171,9 +171,26 @@ public: void setTextGap(float textGap); /* Show (true) or hide (false) Human Readable Text (HRT) */ - bool showText() const; // `symbol->show_hrt` + bool showText() const; // `symbol->show_hrt` as boolean void setShowText(bool showText); + /* Horizontal alignment of HRT */ + int halign() const; // ZINT_HRT_HALIGN_LEFT/RIGHT + void setHAlign(int halignIndex); // Sets from combobox index + void setHAlignValue(int halign); // Sets literal value + + /* Font height */ + int fontHeight() const; + void setFontHeight(int fontHeight); + + /* 8-bit grayscale raster font mode */ + bool grayscale() const; + void setGrayscale(bool grayscale); + + /* Put each GS1 AI on a newline in HRT */ + bool gs1Newline() const; + void setGS1Newline(bool gs1Newline); + /* Set to true to use GS (Group Separator) instead of FNC1 as GS1 separator (Data Matrix) */ bool gsSep() const; // `symbol->output_options | GS1_GS_SEPARATOR` void setGSSep(bool gsSep); @@ -264,7 +281,7 @@ public: /* Test capabilities - `ZBarcode_Cap()` */ - bool hasHRT(int symbology = 0) const; + bool hasHRT(int symbology = 0) const; /* Whether has HRT by default */ bool isStackable(int symbology = 0) const; bool isEANUPC(int symbology = 0) const; bool isExtendable(int symbology = 0) const; /* Legacy - same as `isEANUPC()` */ @@ -405,8 +422,12 @@ private: int m_borderWidth; int m_whitespace; int m_vwhitespace; + int m_show_hrt; int m_fontSetting; - bool m_show_hrt; + int m_halign; + int m_font_height; + bool m_grayscale; + bool m_gs1_newline; bool m_gssep; bool m_quiet_zones; bool m_no_quiet_zones; diff --git a/frontend/main.c b/frontend/main.c index 978fbae7..bc042cfe 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -201,10 +201,12 @@ static void usage(const int no_png, const int have_gs1syntaxengine) { " --fast Use faster encodation or other shortcuts if available\n" " --fg=COLOUR Specify a foreground colour (as RGB(A) or \"C,M,Y,K\")\n", stdout); printf(" --filetype=TYPE Set output file type BMP/EMF/EPS/GIF/PCX%s/SVG/TIF/TXT\n", no_png_type); - fputs( " --fullmultibyte Use multibyte for binary/Latin (QR/Han Xin/Grid Matrix)\n" + fputs( " --fontheight=INTEGER Set font height in pixels\n" + " --fullmultibyte Use multibyte for binary/Latin (QR/Han Xin/Grid Matrix)\n" + " --grayscale Use 8-bit antialiasing for HRT\n" " --gs1 Treat input as GS1 compatible data\n" - " --gs1nocheck Do not check validity of GS1 data\n" - " --gs1parens Process parentheses \"()\" as GS1 AI delimiters, not \"[]\"\n" + " --gs1nocheck Do not check validity of GS1 data\n", stdout); + fputs( " --gs1parens Process parentheses \"()\" as GS1 AI delimiters, not \"[]\"\n" " --gs1raw Process as raw GS1 input (no brackets), with GS for FNC1\n", stdout); if (have_gs1syntaxengine) { fputs( " --gs1strict Use GS1 Syntax Engine to strictly validate GS1 data\n", stdout); @@ -239,13 +241,17 @@ if (have_gs1syntaxengine) { " --square Force Data Matrix symbols to be square\n" " --structapp=I,C[,ID] Set Structured Append info (I index, C count)\n" " -t, --types Display table of barcode types\n", stdout); - fputs( " --textgap=NUMBER Adjust gap between barcode and HRT in multiples of X-dim\n" - " --verbose Output debug info to stdout\n" + fputs( " --text=INTEGER Configure HRT: 1 default, 2 all linear, 3 stacked, 4 all\n" + " --textgap=NUMBER Adjust gap between barcode and HRT in multiples of X-dim\n" + " --textgs1newline Print each new GS1 AI on a separate line\n" + " --textleft Align HRT left\n" + " --textright Align HRT right\n", stdout); + fputs( " --verbose Output debug info to stdout\n" " --vers=INTEGER Set symbol version (size, check digits, other options)\n" " -v, --version Display Zint version\n" - " --vwhitesp=INTEGER Set height of vertical whitespace in multiples of X-dim\n", stdout); - fputs( " -w, --whitesp=INTEGER Set width of horizontal whitespace in multiples of X-dim\n" - " --werror Convert all warnings into errors\n", stdout); + " --vwhitesp=INTEGER Set height of vertical whitespace in multiples of X-dim\n" + " -w, --whitesp=INTEGER Set width of horizontal whitespace in multiples of X-dim\n", stdout); + fputs( " --werror Convert all warnings into errors\n", stdout); } /* Display supported ECI codes */ @@ -1551,8 +1557,9 @@ enum options { OPT_BATCH, OPT_BG, OPT_BINARY, OPT_BIND, OPT_BIND_TOP, OPT_BOLD, OPT_BORDER, OPT_BOX, OPT_CMYK, OPT_COLS, OPT_COMPLIANTHEIGHT, OPT_DIRECT, OPT_DMISO144, OPT_DMRE, OPT_DMB256, OPT_DMC40, OPT_DOTSIZE, OPT_DOTTY, OPT_DUMP, - OPT_ECI, OPT_EMBEDFONT, OPT_ESC, OPT_EXTRAESC, OPT_FAST, OPT_FG, OPT_FILETYPE, OPT_FULLMULTIBYTE, - OPT_GS1, OPT_GS1NOCHECK, OPT_GS1PARENS, OPT_GS1RAW, OPT_GS1STRICT /*GS1SYNTAXENGINE_MODE*/, + OPT_ECI, OPT_EMBEDFONT, OPT_ESC, OPT_EXTRAESC, + OPT_FAST, OPT_FG, OPT_FILETYPE, OPT_FONTHEIGHT, OPT_FULLMULTIBYTE, + OPT_GRAYSCALE, OPT_GS1, OPT_GS1NOCHECK, OPT_GS1PARENS, OPT_GS1RAW, OPT_GS1STRICT /*GS1SYNTAXENGINE_MODE*/, OPT_GSSEP, OPT_GUARDDESCENT, OPT_GUARDWHITESPACE, OPT_HEIGHT, OPT_HEIGHTPERROW, OPT_INIT, OPT_MASK, OPT_MIRROR, OPT_MODE, OPT_NOBACKGROUND, OPT_NOQUIETZONES, OPT_NOTEXT, OPT_PRIMARY, OPT_QUIETZONES, @@ -1562,7 +1569,8 @@ enum options { #ifdef ZINT_TEST OPT_TEST, #endif - OPT_TEXTGAP, OPT_VERBOSE, OPT_VERS, OPT_VWHITESP, OPT_WERROR + OPT_TEXT, OPT_TEXTGAP, OPT_TEXTGS1NEWLINE, OPT_TEXTLEFT, OPT_TEXTRIGHT, + OPT_VERBOSE, OPT_VERS, OPT_VWHITESP, OPT_WERROR }; static const struct option long_options[] = { @@ -1601,6 +1609,7 @@ static const struct option long_options[] = { {"fgcolor", 1, 0, OPT_FG}, /* Synonym */ {"fgcolour", 1, 0, OPT_FG}, /* Synonym */ {"filetype", 1, NULL, OPT_FILETYPE}, + {"fontheight", 1, NULL, OPT_FONTHEIGHT}, {"fullmultibyte", 0, NULL, OPT_FULLMULTIBYTE}, {"gs1", 0, 0, OPT_GS1}, {"gs1nocheck", 0, NULL, OPT_GS1NOCHECK}, @@ -1647,7 +1656,11 @@ static const struct option long_options[] = { #ifdef ZINT_TEST {"test", 0, NULL, OPT_TEST}, #endif + {"text", 1, NULL, OPT_TEXT}, {"textgap", 1, NULL, OPT_TEXTGAP}, + {"textgs1newline", 0, NULL, OPT_TEXTGS1NEWLINE}, + {"textleft", 0, NULL, OPT_TEXTLEFT}, + {"textright", 0, NULL, OPT_TEXTRIGHT}, {"types", 0, NULL, 't'}, {"verbose", 0, NULL, OPT_VERBOSE}, {"vers", 1, NULL, OPT_VERS}, @@ -1957,9 +1970,26 @@ int main(int argc, char **argv) { warn_number = ZINT_WARN_INVALID_OPTION; } break; + case OPT_FONTHEIGHT: + if (!validate_int(optarg, -1 /*len*/, &val)) { + fprintf(stderr, "Error 138: Invalid font height (digits only)\n"); + return do_exit(ZINT_ERROR_INVALID_OPTION); + } + if (val >= 10 && val <= 200) { + my_symbol->show_hrt &= 0xFFFF; + my_symbol->show_hrt |= val << 16; + } else { + fprintf(stderr, "Warning 167: Font height '%d' out of range (10 to 200), **IGNORED**\n", val); + fflush(stderr); + warn_number = ZINT_WARN_INVALID_OPTION; + } + break; case OPT_FULLMULTIBYTE: fullmultibyte = 1; break; + case OPT_GRAYSCALE: + my_symbol->show_hrt |= ZINT_HRT_GRAYSCALE; + break; case OPT_GS1: my_symbol->input_mode = (my_symbol->input_mode & ~0x07) | GS1_MODE; break; @@ -2239,6 +2269,20 @@ int main(int argc, char **argv) { break; /* LCOV_EXCL_STOP */ #endif + case OPT_TEXT: + if (!validate_int(optarg, -1 /*len*/, &val)) { + fprintf(stderr, "Error 174: Invalid text value (digits only)\n"); + return do_exit(ZINT_ERROR_INVALID_OPTION); + } + if (val >= 1 && val <= 4) { + my_symbol->show_hrt &= ~0x7; + my_symbol->show_hrt = val; + } else { + fprintf(stderr, "Warning 127: Text value '%d' out of range (1 to 4), **IGNORED**\n", val); + fflush(stderr); + warn_number = ZINT_WARN_INVALID_OPTION; + } + break; case OPT_TEXTGAP: if (!validate_float(optarg, 1 /*allow_neg*/, &float_opt, errbuf)) { fprintf(stderr, "Error 194: Invalid text gap floating point (%s)\n", errbuf); @@ -2253,6 +2297,17 @@ int main(int argc, char **argv) { warn_number = ZINT_WARN_INVALID_OPTION; } break; + case OPT_TEXTGS1NEWLINE: + my_symbol->show_hrt |= ZINT_HRT_GS1_NEWLINE; + break; + case OPT_TEXTLEFT: + my_symbol->show_hrt &= ~ZINT_HRT_HALIGN_RIGHT; + my_symbol->show_hrt |= ZINT_HRT_HALIGN_LEFT; + break; + case OPT_TEXTRIGHT: + my_symbol->show_hrt &= ~ZINT_HRT_HALIGN_LEFT; + my_symbol->show_hrt |= ZINT_HRT_HALIGN_RIGHT; + break; case OPT_VERBOSE: my_symbol->debug = 1; break; diff --git a/frontend_qt/mainWindow.ui b/frontend_qt/mainWindow.ui index 7dee2252..203ae68d 100644 --- a/frontend_qt/mainWindow.ui +++ b/frontend_qt/mainWindow.ui @@ -1678,6 +1678,339 @@ including GS1 Digital Link URIs + + + + 678 + 16777215 + + + + Te&xt + + + + + + + + Show Human Readable Text (HRT) in image + + + Sho&w Text + + + true + + + + + + + Gap between barcode and text in X-dimensions +(ignored if disabled) + + + Text &Gap: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + spnTextGap + + + + + + + + + Gap between barcode and text in X-dimensions +(ignored if disabled) + + + + + + X + + + 2 + + + -5.000000000000000 + + + 10.000000000000000 + + + 0.100000000000000 + + + 1.000000000000000 + + + true + + + + 3 + 0 + + + + + + + + + 22 + 26 + + + + Set text gap to default 1X + + + + + + + + + + + + Set horizontal alignment of HRT +(ignored if disabled) + + + Text Alignment: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + cmbTextHAlign + + + + + + + Set horizontal alignment of HRT +(ignored if disabled) + + + + Center + + + + + Left + + + + + Right + + + + + + + + Set font characteristics +(ignored if disabled) + + + Fo&nt Setting: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + cmbFontSetting + + + + + + + Set font characteristics (bold, small) +(ignored if disabled) + + + + Normal + + + + + Bold + + + + + Small + + + + + Small Bold (vector only) + + + + + + + + Use default height for font or set height in pixels +(ignored if disabled) + + + Font &Height: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + spnFontHeight + + + false + + + + + + + Height of font in pixels +(ignored if disabled) + + + false + + + px + + + 10 + + + 200 + + + 14 + + + + + + + Use default font height + + + Defaul&t + + + true + + + false + + + + + + + Raster Font Mode + + + Whether to use 1-bit monochrome or 8-bit grayscale on raster output +(BMP/GIF/PCX/PNG/TIF) +(ignored if disabled) + + + + QLayout::SetMinimumSize + + + + + &1-bit monochrome + + + 1-bit raster output, no anti-aliasing + + + true + + + + + + + &8-bit grayscale + + + 8-bit anti-aliasing raster output + + + false + + + + + + + + + + Embed font in SVG output +(ignored if disabled) + + + Embed Font &(SVG) + + + false + + + + + + + Put each GS1 AI on a separate line +(ignored if disabled) + + + Put GS1 AIs on separate lines + + + false + + + + + + + + + Qt::Vertical + + + + 40 + 10 + + + + + + @@ -1908,128 +2241,50 @@ the barcode in X-dimensions - - + + - Show Human Readable Text in image -(ignored if disabled) + Rotate symbol by degrees - Show Te&xt + R&otate: - - true + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + cmbRotate + + + + + + + Rotate symbol by degrees + + + + + + + + + 90° + + + + + 180° + + + + + 270° + + - - - Set font characteristics -(ignored if disabled) - - - Fo&nt Setting: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - cmbFontSetting - - - - - - - Set font characteristics -(ignored if disabled) - - - - Normal - - - - - Bold - - - - - Small - - - - - Small Bold (vector only) - - - - - - - - Gap between barcode and text in X-dimensions -(ignored if disabled) - - - Text &Gap: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - spnTextGap - - - - - - - Gap between barcode and text in X-dimensions -(ignored if disabled) - - - - - - X - - - 2 - - - -5.000000000000000 - - - 10.000000000000000 - - - 0.100000000000000 - - - 1.000000000000000 - - - - - - - - 22 - 26 - - - - Set text gap to default 1X - - - - - - - Image scale when output to file @@ -2046,7 +2301,7 @@ the barcode in X-dimensions - + Image scale when output to file @@ -2072,7 +2327,7 @@ the barcode in X-dimensions - + @@ -2088,7 +2343,7 @@ the barcode in X-dimensions - + Image size (width x height) of barcode @@ -2102,7 +2357,7 @@ at given dot density - + Image size (width x height) of barcode @@ -2300,64 +2555,7 @@ e.g. "FFFFFF00" - - - - Rotate symbol by degrees - - - R&otate: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - cmbRotate - - - - - - Rotate symbol by degrees - - - - - - - - - 90° - - - - - 180° - - - - - 270° - - - - - - - - Embed font in SVG output -(ignored if disabled) - - - Embed Font &(SVG) - - - false - - - - Use dots instead of squares for matrix symbols @@ -2371,7 +2569,7 @@ e.g. "FFFFFF00" - + false @@ -2391,7 +2589,7 @@ e.g. "FFFFFF00" - + false diff --git a/frontend_qt/mainwindow.cpp b/frontend_qt/mainwindow.cpp index a97a74fc..e3fc7e35 100644 --- a/frontend_qt/mainwindow.cpp +++ b/frontend_qt/mainwindow.cpp @@ -338,10 +338,21 @@ MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags fl) connect(heightb, SIGNAL(valueChanged(double)), SLOT(update_preview())); connect(bwidth, SIGNAL(valueChanged(int)), SLOT(update_preview())); connect(btype, SIGNAL(currentIndexChanged(int)), SLOT(update_preview())); - connect(cmbFontSetting, SIGNAL(currentIndexChanged(int)), SLOT(update_preview())); + + connect(chkHRTShow, SIGNAL(toggled(bool)), SLOT(HRTShow_ui_set())); + connect(chkHRTShow, SIGNAL(toggled(bool)), SLOT(update_preview())); connect(spnTextGap, SIGNAL(valueChanged(double)), SLOT(text_gap_ui_set())); connect(spnTextGap, SIGNAL(valueChanged(double)), SLOT(update_preview())); connect(btnClearTextGap, SIGNAL(clicked(bool)), SLOT(clear_text_gap())); + connect(cmbTextHAlign, SIGNAL(currentIndexChanged(int)), SLOT(update_preview())); + connect(cmbFontSetting, SIGNAL(currentIndexChanged(int)), SLOT(update_preview())); + connect(chkFontHeightDefault, SIGNAL(toggled(bool)), SLOT(font_height_ui_set())); + connect(chkFontHeightDefault, SIGNAL(toggled(bool)), SLOT(update_preview())); + connect(spnFontHeight, SIGNAL(valueChanged(int)), SLOT(update_preview())); + connect(radTextRasterFontModeMonochrome, SIGNAL(toggled(bool)), SLOT(update_preview())); + connect(radTextRasterFontModeGrayscale, SIGNAL(toggled(bool)), SLOT(update_preview())); + connect(chkTextGS1Newline, SIGNAL(toggled(bool)), SLOT(update_preview())); + connect(txtData, SIGNAL(textChanged(QString)), SLOT(data_ui_set())); connect(txtData, SIGNAL(textChanged(QString)), SLOT(upcae_no_quiet_zones_ui_set())); connect(txtData, SIGNAL(textChanged(QString)), SLOT(update_preview())); @@ -396,8 +407,6 @@ MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags fl) connect(chkAutoHeight, SIGNAL(toggled(bool)), SLOT(update_preview())); connect(chkCompliantHeight, SIGNAL(toggled(bool)), SLOT(update_preview())); connect(btnScale, SIGNAL(clicked(bool)), SLOT(open_scale_dialog())); - connect(chkHRTShow, SIGNAL(toggled(bool)), SLOT(HRTShow_ui_set())); - connect(chkHRTShow, SIGNAL(toggled(bool)), SLOT(update_preview())); connect(chkCMYK, SIGNAL(toggled(bool)), SLOT(change_cmyk())); connect(chkQuietZones, SIGNAL(toggled(bool)), SLOT(update_preview())); connect(cmbRotate, SIGNAL(currentIndexChanged(int)), SLOT(update_preview())); @@ -490,13 +499,19 @@ MainWindow::~MainWindow() settings.setValue(QSL("studio/appearance/vwhitespace"), spnVWhitespace->value()); settings.setValue(QSL("studio/appearance/scale"), spnScale->value()); settings.setValue(QSL("studio/appearance/border_type"), btype->currentIndex()); + settings.setValue(QSL("studio/appearance/chk_hrt_show"), chkHRTShow->isChecked() ? 1 : 0); settings.setValue(QSL("studio/appearance/font_setting"), cmbFontSetting->currentIndex()); settings.setValue(QSL("studio/appearance/text_gap"), spnTextGap->value()); - settings.setValue(QSL("studio/appearance/chk_hrt_show"), chkHRTShow->isChecked() ? 1 : 0); + settings.setValue(QSL("studio/appearance/chk_embed_vector_font"), chkEmbedVectorFont->isChecked() ? 1 : 0); + settings.setValue(QSL("studio/text/halign"), cmbTextHAlign->currentIndex()); + settings.setValue(QSL("studio/text/font_height"), spnFontHeight->value()); + settings.setValue(QSL("studio/text/chk_font_height_default"), chkFontHeightDefault->isChecked() ? 1 : 0); + settings.setValue(QSL("studio/text/grayscale"), get_rad_index( + QStringList() << QSL("radTextRasterFontModeMonochrome") << QSL("radTextRasterFontModeGrayscale"))); + settings.setValue(QSL("studio/text/chk_text_gs1_newline"), chkTextGS1Newline->isChecked() ? 1 : 0); settings.setValue(QSL("studio/appearance/chk_cmyk"), chkCMYK->isChecked() ? 1 : 0); settings.setValue(QSL("studio/appearance/chk_quiet_zones"), chkQuietZones->isChecked() ? 1 : 0); settings.setValue(QSL("studio/appearance/rotate"), cmbRotate->currentIndex()); - settings.setValue(QSL("studio/appearance/chk_embed_vector_font"), chkEmbedVectorFont->isChecked() ? 1 : 0); settings.setValue(QSL("studio/appearance/chk_dotty"), chkDotty->isChecked() ? 1 : 0); settings.setValue(QSL("studio/appearance/dot_size"), spnDotSize->value()); // These are "system-wide" @@ -564,14 +579,26 @@ void MainWindow::load_settings(QSettings &settings) spnVWhitespace->setValue(settings.value(QSL("studio/appearance/vwhitespace"), 0).toInt()); spnScale->setValue(settings.value(QSL("studio/appearance/scale"), 1.0).toFloat()); btype->setCurrentIndex(settings.value(QSL("studio/appearance/border_type"), 0).toInt()); + + int symbology = bstyle_items[bstyle->currentIndex()].symbology; + int hrtDefault = symbology && m_bc.bc.hasHRT(symbology) ? 1 : 0; + chkHRTShow->setChecked(settings.value(QSL("studio/appearance/chk_hrt_show"), hrtDefault).toInt() ? true : false); cmbFontSetting->setCurrentIndex(settings.value(QSL("studio/appearance/font_setting"), 0).toInt()); spnTextGap->setValue(settings.value(QSL("studio/appearance/text_gap"), 1.0).toFloat()); - chkHRTShow->setChecked(settings.value(QSL("studio/appearance/chk_hrt_show"), 1).toInt() ? true : false); + chkEmbedVectorFont->setChecked(settings.value(QSL("studio/appearance/chk_embed_vector_font"), 0).toInt() + ? true : false); + cmbTextHAlign->setCurrentIndex(settings.value(QSL("studio/text/halign"), 0).toInt()); + spnFontHeight->setValue(settings.value(QSL("studio/text/font_height"), 0).toInt()); + chkFontHeightDefault->setChecked(settings.value(QSL("studio/text/chk_font_height_default"), 1).toInt() + ? true : false); + set_rad_from_setting(settings, QSL("studio/text/grayscale"), + QStringList() << QSL("radTextRasterFontModeMonochrome") << QSL("radTextRasterFontModeGrayscale")); + chkTextGS1Newline->setChecked(settings.value(QSL("studio/text/chk_text_gs1_newline"), 0).toInt() + ? true : false); + chkCMYK->setChecked(settings.value(QSL("studio/appearance/chk_cmyk"), 0).toInt() ? true : false); chkQuietZones->setChecked(settings.value(QSL("studio/appearance/chk_quiet_zones"), 0).toInt() ? true : false); cmbRotate->setCurrentIndex(settings.value(QSL("studio/appearance/rotate"), 0).toInt()); - chkEmbedVectorFont->setChecked(settings.value(QSL("studio/appearance/chk_embed_vector_font"), 0).toInt() - ? true : false); chkDotty->setChecked(settings.value(QSL("studio/appearance/chk_dotty"), 0).toInt() ? true : false); spnDotSize->setValue(settings.value(QSL("studio/appearance/dot_size"), 4.0 / 5.0).toFloat()); // These are "system-wide" @@ -1192,13 +1219,21 @@ void MainWindow::autoheight_ui_set() void MainWindow::HRTShow_ui_set() { + int symbology = bstyle_items[bstyle->currentIndex()].symbology; bool enabled = chkHRTShow->isEnabled() && chkHRTShow->isChecked(); + bool isEANUPC = m_bc.bc.isEANUPC(symbology); + + chkEmbedVectorFont->setEnabled(enabled); + lblTextHAlign->setEnabled(enabled && !isEANUPC); + cmbTextHAlign->setEnabled(enabled && !isEANUPC); lblFontSetting->setEnabled(enabled); cmbFontSetting->setEnabled(enabled); lblTextGap->setEnabled(enabled); spnTextGap->setEnabled(enabled); - chkEmbedVectorFont->setEnabled(enabled); text_gap_ui_set(); + font_height_ui_set(); + groupBoxTextRasterFontMode->setEnabled(enabled && !isEANUPC); + gs1_newline_ui_set(); upcean_no_quiet_zones_ui_set(); upcae_no_quiet_zones_ui_set(); eanaddon_no_quiet_zones_ui_set(); @@ -1206,8 +1241,37 @@ void MainWindow::HRTShow_ui_set() void MainWindow::text_gap_ui_set() { - bool hrtEnabled = chkHRTShow->isEnabled() && chkHRTShow->isChecked(); - btnClearTextGap->setEnabled(hrtEnabled && spnTextGap->value() != 1.0); + bool showHRT = chkHRTShow->isEnabled() && chkHRTShow->isChecked(); + btnClearTextGap->setEnabled(showHRT && spnTextGap->value() != 1.0); +} + +void MainWindow::font_height_ui_set() +{ + int symbology = bstyle_items[bstyle->currentIndex()].symbology; + bool showHRT = chkHRTShow->isEnabled() && chkHRTShow->isChecked(); + bool defaultChecked = chkFontHeightDefault->isChecked(); + bool isEANUPC = m_bc.bc.isEANUPC(symbology); + + lblFontHeight->setEnabled(showHRT && !isEANUPC); + chkFontHeightDefault->setEnabled(showHRT && !isEANUPC); + spnFontHeight->setEnabled(showHRT && !defaultChecked && !isEANUPC); +} + +void MainWindow::gs1_newline_ui_set() +{ + int symbology = bstyle_items[bstyle->currentIndex()].symbology; + bool showHRT = chkHRTShow->isEnabled() && chkHRTShow->isChecked(); + bool isEANUPC = m_bc.bc.isEANUPC(symbology); + if (showHRT && !isEANUPC) { + if (symbology == BARCODE_GS1_128 || symbology == BARCODE_DBAR_EXP || symbology == BARCODE_DBAR_EXPSTK + || (m_bc.bc.supportsGS1(symbology) && (m_bc.bc.inputMode() & 0x07))) { + chkTextGS1Newline->setEnabled(true); + } else { + chkTextGS1Newline->setEnabled(false); + } + } else { + chkTextGS1Newline->setEnabled(false); + } } void MainWindow::dotty_ui_set() @@ -1734,7 +1798,7 @@ void MainWindow::change_options() grpSpecific->hide(); if (m_optionWidget) { - if (tabMain->count() == 3) { + if (tabMain->count() == 4) { tabMain->removeTab(1); } else { vLayoutSpecific->removeWidget(m_optionWidget); @@ -1759,6 +1823,7 @@ void MainWindow::change_options() m_xdimdpVars.x_dim_units = 0; m_xdimdpVars.set = 0; + // Begin ifelse(symbology) if (symbology == BARCODE_CODE128) { QFile file(QSL(":/grpC128.ui")); if (!file.open(QIODevice::ReadOnly)) @@ -2432,6 +2497,7 @@ void MainWindow::change_options() m_optionWidget = nullptr; load_sub_settings(settings, symbology); } + // End ifelse(symbology) switch (symbology) { case BARCODE_CODE128: @@ -2473,7 +2539,7 @@ void MainWindow::change_options() // ECI, GS1Parens, GS1Raw, GS1NoCheck, GS1Strict, RInit, CompliantHeight will be checked in update_preview() as // encoding mode dependent (HIBC and/or GS1) chkAutoHeight->setEnabled(!m_bc.bc.isFixedRatio(symbology)); - chkHRTShow->setEnabled(m_bc.bc.hasHRT(symbology)); + chkHRTShow->setEnabled(!m_bc.bc.isFixedRatio(symbology) && symbology != BARCODE_DAFT); chkQuietZones->setEnabled(!m_bc.bc.hasDefaultQuietZones(symbology)); chkDotty->setEnabled(m_bc.bc.isDotty(symbology)); @@ -3507,14 +3573,32 @@ void MainWindow::update_preview() m_bc.bc.setGS1SyntaxEngine(chkGS1Strict->isEnabled() && chkGS1Strict->isChecked()); } m_bc.bc.setReaderInit(chkRInit->isEnabled() && chkRInit->isChecked()); - m_bc.bc.setShowText(chkHRTShow->isEnabled() && chkHRTShow->isChecked()); + if (chkHRTShow->isEnabled() && chkHRTShow->isChecked()) { + m_bc.bc.setShowText(true); + m_bc.bc.setTextGap(spnTextGap->value()); + m_bc.bc.setHAlign(cmbTextHAlign->isEnabled() ? cmbTextHAlign->currentIndex() : 0); + m_bc.bc.setFontSetting(cmbFontSetting->currentIndex()); + if (chkFontHeightDefault->isChecked() || !spnFontHeight->isEnabled()) { + m_bc.bc.setFontHeight(0); + } else { + m_bc.bc.setFontHeight(spnFontHeight->value()); + } + m_bc.bc.setGrayscale(radTextRasterFontModeGrayscale->isChecked()); + m_bc.bc.setGS1Newline(chkTextGS1Newline->isChecked()); + } else { + m_bc.bc.setShowText(false); + m_bc.bc.setTextGap(1.0f); + m_bc.bc.setHAlign(0); + m_bc.bc.setFontSetting(0); + m_bc.bc.setFontHeight(0); + m_bc.bc.setGrayscale(false); + m_bc.bc.setGS1Newline(false); + } m_bc.bc.setBorderType(btype->currentIndex()); m_bc.bc.setBorderWidth(bwidth->value()); m_bc.bc.setWhitespace(spnWhitespace->value()); m_bc.bc.setVWhitespace(spnVWhitespace->value()); m_bc.bc.setQuietZones(chkQuietZones->isEnabled() && chkQuietZones->isChecked()); - m_bc.bc.setFontSetting(cmbFontSetting->currentIndex()); - m_bc.bc.setTextGap(spnTextGap->value()); m_bc.bc.setRotateAngle(cmbRotate->currentIndex()); m_bc.bc.setEmbedVectorFont(chkEmbedVectorFont->isEnabled() && chkEmbedVectorFont->isChecked()); m_bc.bc.setDotty(chkDotty->isEnabled() && chkDotty->isChecked()); @@ -4255,6 +4339,18 @@ QString MainWindow::get_setting_name(int symbology) return Zint::QZint::barcodeName(symbology).mid(8).toLower(); // Strip "BARCODE_" prefix } +int MainWindow::get_rad_index(const QStringList &names) +{ + QRadioButton *radioButton; + for (int index = 0; index < names.size(); index++) { + radioButton = findChild(names[index]); + if (radioButton && radioButton->isChecked()) { + return index; + } + } + return 0; +} + /* Helper to return index of selected radio button in group, checking for NULL */ int MainWindow::get_rad_grp_index(const QStringList &names) { @@ -4273,6 +4369,22 @@ int MainWindow::get_rad_grp_index(const QStringList &names) /* Helper to set radio button in group from index in settings, checking for NULL */ void MainWindow::set_rad_from_setting(QSettings &settings, const QString &setting, const QStringList &names, int default_val) +{ + int index = settings.value(setting, default_val).toInt(); + QRadioButton *radioButton; + if (index >= 0 && index < names.size()) { + radioButton = findChild(names[index]); + } else { + radioButton = findChild(names[0]); + } + if (radioButton) { + radioButton->setChecked(true); + } +} + +/* Helper to set radio button in group from index in settings, checking for NULL */ +void MainWindow::set_rad_grp_from_setting(QSettings &settings, const QString &setting, + const QStringList &names, int default_val) { if (m_optionWidget) { int index = settings.value(setting, default_val).toInt(); @@ -4433,11 +4545,19 @@ void MainWindow::save_sub_settings(QSettings &settings, int symbology) settings.setValue(QSL("studio/bc/%1/appearance/scale").arg(name), spnScale->value()); settings.setValue(QSL("studio/bc/%1/appearance/border_type").arg(name), btype->currentIndex()); if (chkHRTShow->isEnabled()) { + settings.setValue(QSL("studio/bc/%1/appearance/chk_hrt_show").arg(name), chkHRTShow->isChecked() ? 1 : 0); settings.setValue(QSL("studio/bc/%1/appearance/font_setting").arg(name), cmbFontSetting->currentIndex()); settings.setValue(QSL("studio/bc/%1/appearance/text_gap").arg(name), spnTextGap->value()); settings.setValue(QSL("studio/bc/%1/appearance/chk_embed_vector_font").arg(name), chkEmbedVectorFont->isChecked() ? 1 : 0); - settings.setValue(QSL("studio/bc/%1/appearance/chk_hrt_show").arg(name), chkHRTShow->isChecked() ? 1 : 0); + settings.setValue(QSL("studio/bc/%1/text/halign").arg(name), cmbTextHAlign->currentIndex()); + settings.setValue(QSL("studio/bc/%1/text/font_height").arg(name), spnFontHeight->value()); + settings.setValue(QSL("studio/bc/%1/text/chk_font_height_default").arg(name), + chkFontHeightDefault->isChecked() ? 1 : 0); + settings.setValue(QSL("studio/bc/%1/text/grayscale").arg(name), get_rad_index( + QStringList() << QSL("radTextRasterFontModeMonochrome") << QSL("radTextRasterFontModeGrayscale"))); + settings.setValue(QSL("studio/bc/%1/text/chk_text_gs1_newline").arg(name), + chkTextGS1Newline->isChecked() ? 1 : 0); } settings.setValue(QSL("studio/bc/%1/appearance/chk_cmyk").arg(name), chkCMYK->isChecked() ? 1 : 0); settings.setValue( @@ -4879,13 +4999,22 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology) spnScale->setValue(settings.value(QSL("studio/bc/%1/appearance/scale").arg(name), 1.0).toFloat()); btype->setCurrentIndex(settings.value(QSL("studio/bc/%1/appearance/border_type").arg(name), 0).toInt()); if (chkHRTShow->isEnabled()) { + int hrtDefault = m_bc.bc.hasHRT(symbology) ? 1 : 0; + chkHRTShow->setChecked(settings.value( + QSL("studio/bc/%1/appearance/chk_hrt_show").arg(name), hrtDefault).toInt() ? true : false); cmbFontSetting->setCurrentIndex(settings.value( QSL("studio/bc/%1/appearance/font_setting").arg(name), 0).toInt()); spnTextGap->setValue(settings.value(QSL("studio/bc/%1/appearance/text_gap").arg(name), 1.0).toFloat()); chkEmbedVectorFont->setChecked(settings.value( QSL("studio/bc/%1/appearance/chk_embed_vector_font").arg(name), 0).toInt() ? true : false); - chkHRTShow->setChecked(settings.value( - QSL("studio/bc/%1/appearance/chk_hrt_show").arg(name), 1).toInt() ? true : false); + cmbTextHAlign->setCurrentIndex(settings.value(QSL("studio/bc/%1/text/halign").arg(name), 0).toInt()); + spnFontHeight->setValue(settings.value(QSL("studio/bc/%1/text/font_height").arg(name), 0).toInt()); + chkFontHeightDefault->setChecked(settings.value( + QSL("studio/bc/%1/text/chk_font_height_default").arg(name), 1).toInt() ? true : false); + set_rad_from_setting(settings, QSL("studio/bc/%1/text/grayscale").arg(name), + QStringList() << QSL("radTextRasterFontModeMonochrome") << QSL("radTextRasterFontModeGrayscale")); + chkTextGS1Newline->setChecked( + settings.value(QSL("studio/bc/%1/text/chk_text_gs1_newline").arg(name), 0).toInt() ? true : false); } chkCMYK->setChecked(settings.value( QSL("studio/bc/%1/appearance/chk_cmyk").arg(name), 0).toInt() ? true : false); @@ -4935,7 +5064,7 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology) case BARCODE_GS1_128: case BARCODE_GS1_128_CC: case BARCODE_HIBC_128: - set_rad_from_setting(settings, QSL("studio/bc/code128/encoding_mode"), + set_rad_grp_from_setting(settings, QSL("studio/bc/code128/encoding_mode"), QStringList() << QSL("radC128Stand") << QSL("radC128EAN") << QSL("radC128CSup") << QSL("radC128HIBC") << QSL("radC128ExtraEsc")); break; @@ -4947,7 +5076,7 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology) set_cmb_from_setting(settings, QSL("studio/bc/pdf417/rows"), QSL("cmbPDFRows")); set_dspn_from_setting(settings, QSL("studio/bc/pdf417/height_per_row"), QSL("spnPDFHeightPerRow"), 0.0f); set_cmb_from_setting(settings, QSL("studio/bc/pdf417/ecc"), QSL("cmbPDFECC")); - set_rad_from_setting(settings, QSL("studio/bc/pdf417/encoding_mode"), + set_rad_grp_from_setting(settings, QSL("studio/bc/pdf417/encoding_mode"), QStringList() << QSL("radPDFStand") << QSL("radPDFTruncated") << QSL("radPDFHIBC")); set_chk_from_setting(settings, QSL("studio/bc/pdf417/chk_fast"), QSL("chkPDFFast")); set_spn_from_setting(settings, QSL("studio/bc/pdf417/structapp_count"), QSL("spnPDFStructAppCount"), 1); @@ -4960,7 +5089,7 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology) set_cmb_from_setting(settings, QSL("studio/bc/micropdf417/cols"), QSL("cmbMPDFCols")); set_dspn_from_setting(settings, QSL("studio/bc/micropdf417/height_per_row"), QSL("spnMPDFHeightPerRow"), 0.0f); - set_rad_from_setting(settings, QSL("studio/bc/micropdf417/encoding_mode"), + set_rad_grp_from_setting(settings, QSL("studio/bc/micropdf417/encoding_mode"), QStringList() << QSL("radMPDFStand") << QSL("radMPDFHIBC")); set_chk_from_setting(settings, QSL("studio/bc/micropdf417/chk_fast"), QSL("chkMPDFFast")); set_spn_from_setting(settings, QSL("studio/bc/micropdf417/structapp_count"), @@ -4974,7 +5103,7 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology) case BARCODE_DOTCODE: set_cmb_from_setting(settings, QSL("studio/bc/dotcode/cols"), QSL("cmbDotCols")); set_cmb_from_setting(settings, QSL("studio/bc/dotcode/mask"), QSL("cmbDotMask")); - set_rad_from_setting(settings, QSL("studio/bc/dotcode/encoding_mode"), + set_rad_grp_from_setting(settings, QSL("studio/bc/dotcode/encoding_mode"), QStringList() << QSL("radDotStand") << QSL("radDotGS1")); set_cmb_from_setting(settings, QSL("studio/bc/dotcode/structapp_count"), QSL("cmbDotStructAppCount")); set_cmb_from_setting(settings, QSL("studio/bc/dotcode/structapp_index"), QSL("cmbDotStructAppIndex")); @@ -4982,7 +5111,7 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology) case BARCODE_AZTEC: case BARCODE_HIBC_AZTEC: - set_rad_from_setting(settings, QSL("studio/bc/aztec/autoresizing"), + set_rad_grp_from_setting(settings, QSL("studio/bc/aztec/autoresizing"), QStringList() << QSL("radAztecAuto") << QSL("radAztecSize") << QSL("radAztecECC")); m_aztecSizeIndex = settings.value(QSL("studio/bc/aztec/size"), -1).toInt(); if (get_rad_val(QSL("radAztecSize"))) { @@ -4993,7 +5122,7 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology) set_cmb_index(QSL("cmbAztecECC"), m_aztecECCIndex); } set_cmb_from_setting(settings, QSL("studio/bc/aztec/ecc"), QSL("cmbAztecECC")); - set_rad_from_setting(settings, QSL("studio/bc/aztec/encoding_mode"), + set_rad_grp_from_setting(settings, QSL("studio/bc/aztec/encoding_mode"), QStringList() << QSL("radAztecStand") << QSL("radAztecGS1") << QSL("radAztecHIBC") << QSL("radAztecExtraEsc")); set_chk_from_setting(settings, QSL("studio/bc/aztec/chk_full"), QSL("chkAztecFull")); @@ -5010,45 +5139,45 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology) break; case BARCODE_CODE11: - set_rad_from_setting(settings, QSL("studio/bc/code11/check_digit"), + set_rad_grp_from_setting(settings, QSL("studio/bc/code11/check_digit"), QStringList() << QSL("radC11TwoCheckDigits") << QSL("radC11OneCheckDigit") << QSL("radC11NoCheckDigits")); break; case BARCODE_C25STANDARD: - set_rad_from_setting(settings, QSL("studio/bc/c25standard/check_digit"), + set_rad_grp_from_setting(settings, QSL("studio/bc/c25standard/check_digit"), QStringList() << QSL("radC25Stand") << QSL("radC25Check") << QSL("radC25CheckHide")); break; case BARCODE_C25INTER: - set_rad_from_setting(settings, QSL("studio/bc/c25inter/check_digit"), + set_rad_grp_from_setting(settings, QSL("studio/bc/c25inter/check_digit"), QStringList() << QSL("radC25Stand") << QSL("radC25Check") << QSL("radC25CheckHide")); break; case BARCODE_C25IATA: - set_rad_from_setting(settings, QSL("studio/bc/c25iata/check_digit"), + set_rad_grp_from_setting(settings, QSL("studio/bc/c25iata/check_digit"), QStringList() << QSL("radC25Stand") << QSL("radC25Check") << QSL("radC25CheckHide")); break; case BARCODE_C25LOGIC: - set_rad_from_setting(settings, QSL("studio/bc/c25logic/check_digit"), + set_rad_grp_from_setting(settings, QSL("studio/bc/c25logic/check_digit"), QStringList() << QSL("radC25Stand") << QSL("radC25Check") << QSL("radC25CheckHide")); break; case BARCODE_C25IND: - set_rad_from_setting(settings, QSL("studio/bc/c25ind/check_digit"), + set_rad_grp_from_setting(settings, QSL("studio/bc/c25ind/check_digit"), QStringList() << QSL("radC25Stand") << QSL("radC25Check") << QSL("radC25CheckHide")); break; case BARCODE_CODE39: case BARCODE_HIBC_39: - set_rad_from_setting(settings, QSL("studio/bc/code39/check_digit"), + set_rad_grp_from_setting(settings, QSL("studio/bc/code39/check_digit"), QStringList() << QSL("radC39Stand") << QSL("radC39Check") << QSL("radC39HIBC") << QSL("radC39CheckHide")); break; case BARCODE_EXCODE39: - set_rad_from_setting(settings, QSL("studio/bc/excode39/check_digit"), + set_rad_grp_from_setting(settings, QSL("studio/bc/excode39/check_digit"), QStringList() << QSL("radC39Stand") << QSL("radC39Check") << QSL("radC39CheckHide")); break; case BARCODE_LOGMARS: - set_rad_from_setting(settings, QSL("studio/bc/logmars/check_digit"), + set_rad_grp_from_setting(settings, QSL("studio/bc/logmars/check_digit"), QStringList() << QSL("radC39Stand") << QSL("radC39Check") << QSL("radC39CheckHide")); break; @@ -5057,13 +5186,13 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology) set_dspn_from_setting(settings, QSL("studio/bc/code16k/height_per_row"), QSL("spnC16kHeightPerRow"), 0.0f); set_cmb_from_setting(settings, QSL("studio/bc/code16k/row_sep_height"), QSL("cmbC16kRowSepHeight")); - set_rad_from_setting(settings, QSL("studio/bc/code16k/encoding_mode"), + set_rad_grp_from_setting(settings, QSL("studio/bc/code16k/encoding_mode"), QStringList() << QSL("radC16kStand") << QSL("radC16kGS1")); set_chk_from_setting(settings, QSL("studio/bc/code16k/chk_no_quiet_zones"), QSL("chkC16kNoQuietZones")); break; case BARCODE_CODABAR: - set_rad_from_setting(settings, QSL("studio/bc/codabar/check_digit"), + set_rad_grp_from_setting(settings, QSL("studio/bc/codabar/check_digit"), QStringList() << QSL("radCodabarStand") << QSL("radCodabarCheckHide") << QSL("radCodabarCheck")); break; @@ -5075,7 +5204,7 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology) 0.0f); set_cmb_from_setting(settings, QSL("studio/bc/codablockf/row_sep_height"), QSL("cmbCbfRowSepHeight")); - set_rad_from_setting(settings, QSL("studio/bc/codablockf/encoding_mode"), + set_rad_grp_from_setting(settings, QSL("studio/bc/codablockf/encoding_mode"), QStringList() << QSL("radCbfStand") << QSL("radCbfHIBC")); set_chk_from_setting(settings, QSL("studio/bc/codablockf/chk_no_quiet_zones"), QSL("chkCbfNoQuietZones")); break; @@ -5091,7 +5220,7 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology) case BARCODE_DATAMATRIX: case BARCODE_HIBC_DM: set_cmb_from_setting(settings, QSL("studio/bc/datamatrix/size"), QSL("cmbDMSize")); - set_rad_from_setting(settings, QSL("studio/bc/datamatrix/encoding_mode"), + set_rad_grp_from_setting(settings, QSL("studio/bc/datamatrix/encoding_mode"), QStringList() << QSL("radDMStand") << QSL("radDMGS1") << QSL("radDMHIBC") << QSL("radDMExtraEsc")); set_chk_from_setting(settings, QSL("studio/bc/datamatrix/chk_suppress_rect"), QSL("chkDMRectangle")); set_chk_from_setting(settings, QSL("studio/bc/datamatrix/chk_allow_dmre"), QSL("chkDMRE")); @@ -5125,7 +5254,7 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology) set_cmb_from_setting(settings, QSL("studio/bc/qrcode/size"), QSL("cmbQRSize")); set_cmb_from_setting(settings, QSL("studio/bc/qrcode/ecc"), QSL("cmbQRECC")); set_cmb_from_setting(settings, QSL("studio/bc/qrcode/mask"), QSL("cmbQRMask")); - set_rad_from_setting(settings, QSL("studio/bc/qrcode/encoding_mode"), + set_rad_grp_from_setting(settings, QSL("studio/bc/qrcode/encoding_mode"), QStringList() << QSL("radQRStand") << QSL("radQRGS1") << QSL("radQRHIBC")); set_chk_from_setting(settings, QSL("studio/bc/qrcode/chk_full_multibyte"), QSL("chkQRFullMultibyte")); set_chk_from_setting(settings, QSL("studio/bc/qrcode/chk_fast_mode"), QSL("chkQRFast")); @@ -5142,7 +5271,7 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology) case BARCODE_RMQR: set_cmb_from_setting(settings, QSL("studio/bc/rmqr/size"), QSL("cmbRMQRSize")); set_cmb_from_setting(settings, QSL("studio/bc/rmqr/ecc"), QSL("cmbRMQRECC")); - set_rad_from_setting(settings, QSL("studio/bc/rmqr/encoding_mode"), + set_rad_grp_from_setting(settings, QSL("studio/bc/rmqr/encoding_mode"), QStringList() << QSL("radRMQRStand") << QSL("radRMQRGS1")); set_chk_from_setting(settings, QSL("studio/bc/rmqr/chk_full_multibyte"), QSL("chkRMQRFullMultibyte")); break; @@ -5190,7 +5319,7 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology) case BARCODE_CODEONE: set_cmb_from_setting(settings, QSL("studio/bc/codeone/size"), QSL("cmbC1Size")); - set_rad_from_setting(settings, QSL("studio/bc/codeone/encoding_mode"), + set_rad_grp_from_setting(settings, QSL("studio/bc/codeone/encoding_mode"), QStringList() << QSL("radC1Stand") << QSL("radC1GS1")); set_spn_from_setting(settings, QSL("studio/bc/codeone/structapp_count"), QSL("spnC1StructAppCount"), 1); set_spn_from_setting(settings, QSL("studio/bc/codeone/structapp_index"), QSL("spnC1StructAppIndex"), 0); @@ -5200,7 +5329,7 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology) set_cmb_from_setting(settings, QSL("studio/bc/code49/rows"), QSL("cmbC49Rows")); set_dspn_from_setting(settings, QSL("studio/bc/code49/height_per_row"), QSL("spnC49HeightPerRow"), 0.0f); set_cmb_from_setting(settings, QSL("studio/bc/code49/row_sep_height"), QSL("cmbC49RowSepHeight")); - set_rad_from_setting(settings, QSL("studio/bc/code49/encoding_mode"), + set_rad_grp_from_setting(settings, QSL("studio/bc/code49/encoding_mode"), QStringList() << QSL("radC49Stand") << QSL("radC49GS1")); set_chk_from_setting(settings, QSL("studio/bc/code49/chk_no_quiet_zones"), QSL("chkC49NoQuietZones")); break; @@ -5210,7 +5339,7 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology) break; case BARCODE_DBAR_EXPSTK: - set_rad_from_setting(settings, QSL("studio/bc/dbar_expstk/colsrows"), + set_rad_grp_from_setting(settings, QSL("studio/bc/dbar_expstk/colsrows"), QStringList() << QSL("radDBESCols") << QSL("radDBESRows")); set_cmb_from_setting(settings, QSL("studio/bc/dbar_expstk/cols"), QSL("cmbDBESCols")); set_cmb_from_setting(settings, QSL("studio/bc/dbar_expstk/rows"), QSL("cmbDBESRows")); @@ -5231,11 +5360,11 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology) break; case BARCODE_ULTRA: - set_rad_from_setting(settings, QSL("studio/bc/ultra/autoresizing"), + set_rad_grp_from_setting(settings, QSL("studio/bc/ultra/autoresizing"), QStringList() << QSL("radUltraAuto") << QSL("radUltraEcc")); set_cmb_from_setting(settings, QSL("studio/bc/ultra/ecc"), QSL("cmbUltraEcc")); set_cmb_from_setting(settings, QSL("studio/bc/ultra/revision"), QSL("cmbUltraRevision")); - set_rad_from_setting(settings, QSL("studio/bc/ultra/encoding_mode"), + set_rad_grp_from_setting(settings, QSL("studio/bc/ultra/encoding_mode"), QStringList() << QSL("radUltraStand") << QSL("radUltraGS1")); set_cmb_from_setting(settings, QSL("studio/bc/ultra/structapp_count"), QSL("cmbUltraStructAppCount")); set_cmb_from_setting(settings, QSL("studio/bc/ultra/structapp_index"), QSL("cmbUltraStructAppIndex")); diff --git a/frontend_qt/mainwindow.h b/frontend_qt/mainwindow.h index 1d708b77..7d46ad52 100644 --- a/frontend_qt/mainwindow.h +++ b/frontend_qt/mainwindow.h @@ -71,6 +71,8 @@ public slots: void autoheight_ui_set(); void HRTShow_ui_set(); void text_gap_ui_set(); + void font_height_ui_set(); + void gs1_newline_ui_set(); void dotty_ui_set(); void codeone_ui_set(); void upcean_no_quiet_zones_ui_set(); @@ -191,9 +193,12 @@ protected: static QString get_setting_name(int symbology); + int get_rad_index(const QStringList &names); int get_rad_grp_index(const QStringList &names); void set_rad_from_setting(QSettings &settings, const QString &setting, const QStringList &names, int default_val = 0); + void set_rad_grp_from_setting(QSettings &settings, const QString &setting, const QStringList &names, + int default_val = 0); bool get_rad_val(const QString &name); int get_cmb_index(const QString &name);