encodation in certain cases (and no pessimizations found so far),
props lyngklip (BWIPP);
fix extended char latching when exactly 3 extended chars at end;
count code set C (not digits) in loop deciding when to
shift/latch to extended for better estimate
AZTEC: return warning if ECC < 5% (due to bit-stuffing when version
given); return error if > 22 layers (Zint 26) for Reader
Initialisation symbol requested for better error message
AZTEC/HANXIN/QRCODE: consolidate different ECC data size tables
into one indexed by ECC
DBAR_EXP: check for reduced length <= 77 up front for better error
message
HANXIN: use `malloc()` rather than `z_alloca()` for large binary
array
QRCODE: `ecc_level` now 0-based (not 1-based)
MICROQR: consolidate different version end routines into one
`microqr_end()` and use new `microqr_data` table to simplify code
MICROPDF417: use table for max codewords per column
library: centralize all error messages using new `errtxt()`,
`errtxtf()`, `errtxt_adj()` funcs that protect `symbol->errtxt`
from overflow, & try to make error messages more consistent
thru-out, adding more feedback info to many, & use positional
args "%n$" in prep for l10n (maybe);
`is_sane/is_sane_lookup()` -> `not_sane/not_sane_lookup()`,
returning 1-based position (zero on failure) instead of bool;
`long` ints -> plain `int` (except those dealing with `ftell()`,
`fread()` etc) as depend on int being 32-bits already
GUI: in "grpDATF.ui" use "PlainText" rather than "RichText" for
tracker ratio examples as height of text messing up sometimes
manual: clarify Codablock-F length maximum & add examples
docs: README: pandoc 3.5, Ubuntu 24.04
CMake: use "-Wpedantic" for Clang only as GNU complains about
`errtxtf()` positional args "%n$"
from ZXing (props Alex Geller) - about 25-60% slower depending on
data & stack heavy but does improve some outcomes when FNC1s
present (GS1_MODE or manual) although not much else it appears
(the previous algorithm was very good), but has a logical clarity
the other lacked - funcs `c128_dxsmooth()` etc shared with
CODE16K now moved there and renamed as `c16k_`;
also fix extended char latching when exactly 4 extended chars
at end
also manual code set switching now honoured exactly even if
immediate shift required;
manual: make explicit that AI "(00)" and "(01)" prefixes added by
Zint are HRT-only
general: add `extern "C"` wrappers to a few header files
`iso3166list` linter and adjusting all others to allow for
multiple optional linters (by checking `data_len` vs `offset`)
library: change invalid `input_mode` reset to return warning;
split func table into 2 - func declarations without prototype
will be error in C23;
make invalid symbology check a separate function using a table
and call near beginning of `ZBarcode_Encode_Segs()`;
in `ZBarcode_BarcodeName()` save some bytes by simplifying
name table and removing "BARCODE_" prefix from entries
output: fix pack logic to use pragma by default (actually more
portable than `__attribute__`)
common.h: remove C99 detection which was artifice of specifying
"-std=", and rejig layout to be more logical
BWIPP: update to latest version
general: change `ZINT_VERSION_BUILD` tests to `#if`s
general: further fiddling with some tables to save a few bytes
CLI: change function arg `optarg` -> `arg` so doesn't shadow
global
general: library now compilable with Comp Cert C (though as it
doesn't support `alloca()` will have multiple memory leaks)
"SetPaths.cmake" (removed) - resolves absolute paths in
"zint-targets.cmake", ticket #318, props John Alexander;
also remove "FindZint.cmake" install as not best practice
(Daniel Pfeifer “Effective CMake"), but retain in tree for now;
also remove APPLE stuff re UNIVERSAL build, obsolete, and
setting of CMAKE_OSX_SYSROOT, seems unnecessary
[f3a982c1dd])
AZTEC/CODE16K/CODEONE/DATAMATRIX/DBAR_EXP/GRIDMATRIX/HANXIN
/MAILMARK_4S/PDF417/MSI_PLESSEY/QRCODE/RMQR/TIF/ULTRA/USPS_IMAIL:
lessen storage of some tables by using least integral size
required (saves ~3K); reformat some tables, comments
AUSPOST/AZTEC: remove unnecessary int casts on array indexing
CODE11/CODE39: move start/stop chars into one entry in tables to
save a few bytes; some reformatting, comments
CODEONE: add `c1_` prefixes
common: more precise compiler/version checks
composite: add `cc_` prefixes; UINT -> unsigned short; use
`sizeof()` instead of `strlen()` for `in_linear_comp` static;
some reformatting, comments
EMF: use table instead of string for `ultra_chars[]`
GIF: remove unnecessary cast
library: use `sizeof()` instead of `strlen()` for static;
add `consts` to `escape_char_process()` & use unsigned for `ch`
DBAR: use `dbar_`, `dbar_ltd_`, `dbar_exp_` prefixes
docs: update pandoc version
inner top/right/bottom/left loops of `az_populate_map()` by
jiggling them around a bit, ticket #317, props Andre Maute
frontend/tests: clean up any directories created in `test_input()`,
ticket #316, props Andre Maute
(ticket #181, props Stf Ortm)
CODE128: suppress gcc -Wmaybe-uninitialized false positive (Release
only)
CLI: add "isbn" synonym; save a few bytes using `char[]` rather
than `char *`
allow for old "libpng" (`png_set_scale_16()` not available)
general: Solaris compat
library: use proper function ptr instead of `void *` for function
table; warning suppression "-Wpedantic" -> "-Wstrict-prototypes"
GRIDMATRIX/HANXIN/QRCODE: `xx_define_mode()`: multi-dim `char_modes`
test `ferror()` also in `fm_err()` if `err` zero and file
NetBSD: add instructions and some workarounds (`getopt_long_only()`
in particular)
qzint: check `__GNUC__` version for "-Wstringop-truncation"
suppression
outputting to in-memory buffer `symbol->memfile` instead of to
file `symbol->outfile`, ticket #301
Add "README.clang-tidy" and ".clang-tidy" options file
Suppress some warnings
rename `ZINT_CAP_EXTENDABLE` -> `ZINT_CAP_EANUPC`
(`ZINT_CAP_EXTENDABLE` marked as legacy)
CODE128: increase no. symbol chars max 60 -> 99
EAN-2/EAN-5: fix `BARCODE_BIND_TOP/BIND/BOX` output
GS1_128: warn if data > 48 (GS1 General Specifications max)
common: `is_extendable()` -> `is_ucpean()`
raster: add `ZFONT_HALIGN_CENTRE/LEFT/RIGHT` flags and process
in `draw_string()` (for drawing EAN/UPC outside digits), and
for `ZFONT_HALIGN_CENTRE` round when calculating centre
(shifts some texts 1 pixel left)
raster/vector: use offsets into `symbol->text` for EAN/UPC
instead of `out_upcean_split_text()` (removed)
BMP/EMF/GIF/PCX/PNG/PS/SVG/TIF: use new `out_colour_get_rgb()`
routine (replaces `colour_to_XXX()`)
general: simplify/fix some `error_number` handling/returning
frontend: truncate overlong `--primary` instead of ignoring;
negative floating pt option (for `--textgap`)
man page: list size detail for matrix symbols (`--vers`)
manual: further fiddling with scaling text; some typos
manual: expand size/alpha details in Section "5.4 Buffering Symbols
in Memory (raster)" (cf ticket #291);
add BSD info (TODO: NetBSD);
variable -> member (struct zint_symbol)
frontend: fix missing static on `validate_structapp()`
test suite: update to latest BWIPP (PDF417 needed adjusting)
Changelog: trim some more uninteresting changes
Allow `--embedfont` for non-EAN/UPC SVG also (& update GUI)
SVG: add "fonts/normal_woff2.h"; use array syntax for it &
"fonts/upcean_woff2.h" to avoid large strings
GUI: embed Arimo (via "fonts/normal_ttf.h"), same as OCRB
Change textgap max 5X -> 10X
README: make list of barcodes 2-col table for readability
win32/README: note Visual Studio 2022 re CMake
`EANUPC_GUARD_WHITESPACE`, CLI `--guardwhitespace`) (ticket #287)
EAN-2/EAN-5: HRT now at top instead of at bottom for standalones,
following BWIPP
CLI: batch mode: don't close input if stdin
EAN/UPC: fix excess 1X to right of add-ons
Composites: fix excess whitespace; fix quiet zone calcs to allow
for linear shifting
CLI: use own (Wine) version of `CommandLineToArgvW()` to avoid
loading "shell32.dll"
Move "font.h" -> "raster_font.h"
EPS/SVG: use new `out_putsf()` func to output floats, avoiding
trailing zeroes & locale dependency
EPS: simplify "TR" formula
SVG: change font from "Helvetica, sans serif" to "OCR-B, monospace";
use single "<path>" instead of multiple "<rect>"s to draw boxes
(reduces file size)
Add `EMBED_VECTOR_FONT` to `output_options` (CLI `--embedfont`) to
enable embedding of font in vector output - currently only for
SVG output of EAN/UPC
GUI: use "OCR-B" font for EAN/UPC and "Arimo" for all others (was
"Helvetica" for both); paint background of screen preview light
grey so as contrasts with whitespace and quiet zones
EMF: prefix funcs with `emf_`; simplify string `halign` handling
large: rename `large_int` -> `large_uint`
CODE128/common: move `c128_hrt_cpy_iso8859_1()` to
`hrt_cpy_iso8859_1()` and add `ZINT_WARN_HRT_TRUNCATED` warning
(for future use)
Various symbologies: replace `printf()` with `fputs()`
(symbol->debug)
QRCODE: better assert(), removing a NOLINT (2 left)
CLI: add some more barcode synonyms for DBAR
common: various fiddlings
CMake: don't include png.c unless ZINT_USE_PNG (avoids clang
warning)
barcode and text
- EMF/EPS/SVG/GUI: ignore BOLD_TEXT for EAN/UPC
- DAFT: up max to 250 chars
- EMF/EPS/SVG: fix addon bars placement/length when text hidden
- Qt backend: use `QFontMetrics::horizontalAdvance()` rather than
`boundingRect()` to calc text width (seems to be more accurate)
- library: make printf/sprintf() format arg always literal string
- output: fix errtxt nos clash;
use array for `out_upcean_split_text()` text parts
- raster/vector: smallify addon text printing logic
- frontend: warn if output file and direct options both given;
add TODO note about `CommandLineToArgvW()` loading shell32.dll
- manual: put HRT options in own section
-> 16 to allow for "C,M,Y,K" comma-separated decimal percentage
strings
- API/CLI/GUI: allow foreground/background colours to be specified
as comma-separated decimal "C,M,Y,K" strings where "C", "M" etc.
are percentages (0-100) (ticket #281, 3rd point)
- output.c: new funcs `out_colour_get_rgb()` & `out_colour_get_cmyk()`
and use in bmp/emf/gif etc.
- PCX: add alpha support
- GUI: fix fg/gbcolor icon background not being reset on zap
- GUI: Rearrange some Appearance tab inputs (Border Type <-> Width,
Show Text <-> Font, Text/Font <-> Printing Scale/Size) to flow
more naturally (hopefully)
- GUI: save button "Save As..." -> "Save..." and add icon
- CLI: add --bgcolor/colour & --fgcolor/colour synonyms
for manual Code Set switching via `input_mode` flag
`EXTRA_ESCAPE_MODE` (CLI `--extraesc`) (ticket #204)
- GUI: disable "Reset" colour if default; add "Unset" to Printing
Scale dialog (allows unsetting of X-dim/resolution settings
without having to zap)
- library: guard against out-of-bounds rows (negative)
- test suite: fix some clang-tidy warnings; slight coverage
improvements
EMF/PCX/PNG/TIF only, i.e. excluding EPS, GIF & SVG)
- Add support for specifying scale by X-dimension and resolution
with new option `--scalexdimdp` for CLI/Tcl & new API function
`ZBarcode_Scale_From_XdimDp()` (+ `ZBarcode_XdimDp_From_Scale()`
& `ZBarcode_Default_Xdim()`) and new GUI popup; manual: document
- BMP/EMF/PCX/PNG/TIF: use new `dpmm` resolution field (for EMF
following Inkscape)
- backend_qt: add `dpmm()`, `vectorWidth()`, `vectorHeight()`,
`noPng()`, `getVersion()`, `takesGS1AIData()`, & `XdimDp` stuff
incl. new `QZintXdimDp` struct for passing around scale vars &
use in `getAsCLI()`; add comments
- Raise `scale` limit to 200 (from 100) to allow for large dpmm
- output: create directories & subdirectories as necessary for
output path using new function `out_fopen()` and use in BMP/EMF/
EPS/GIF/PCX/PNG/SVG/TIF
- DPLEIT/DPIDENT: format HRT according to (incomplete)
documentation, and set default height to 72X (from 50X)
- CODE128B renamed to CODE128AB as can use subsets A and/or B
- CODABAR: fix minimum height calc
- EMF: fix indexing of handles (zero-based not 1-based)
- GUI: fix symbology zap (previous technique of clearing and
re-loading settings without doing a sync no longer works);
fix UPCEAN guard descent enable
- MAILMARK: better error message if input < 14 characters
- GUI: add "Default" button for DAFT tracker ratio & enable/disable
various default buttons; use new `takesGS1AIData()` to
enable/disable GS1-specific checkboxes
- CLI: use new `validate_float()` to parse float options (7
significant digits allowed only, no scientific notation)
- DATAMATRIX/GRIDMATRIX/PDF417/QR/ULTRA: micro-optimize structapp
ID parse
- library/CLI: fiddle with static asserts (make CHAR_BIT sensitive,
supposedly)
- win32/README: update building libpng (assembly removed)
- README.linux: document incompatibility of Qt6 >= 6.3
- manual: expand Barcode Studio waffle
- test suite: change range separator to hyphen and allow multiple
excludes
project builds (will add back in future if go fully CMake)
- NO_PNG -> ZINT_NO_PNG and new API function `Zint_NoPng()` to
determine if no PNG support in libzint; replace use in GUI with
backend_qt method `noPng()`
Either shared or static (or both) libraries can be built now.
Executables (zint and zint-qt) are linked with the static library if the shared
library it not built.
`-bindtop`/"Bind Top"
- DPD: add top boundary (width 3X) by default, using new
BARCODE_BIND_TOP; "relabel" option; some compliance checks
- GUI: only skip encoded/errored signal processing if active modal
ExportDialog (wasn't clearing/setting error text bar correctly
for DataDialog)
- CODE128: debug print checksum
- CODE49/DATAMATRIX/QR/ULTRA: fix uniqueness of errtxt nos
- manual: fuller DPD doc; some spelling typos, formatting
intermediate CodeC sequence by setting `f_state` only if in
CodeA/B & checking before adding extended mode switch (cf
OkapiBarcode commit [9ce6dcc], props Daniel Gredler)
DATAMATRIX: in FAST_MODE re-process any buffered X12 characters
when mode changes from X12 (cf OkapiBarcode commit [fb7981e],
props Daniel Gredler)
CODABLOCKF: allow for FNC4 when estimating no. of rows required
CODE16K: make sure row calculation accurate by dispensing with
glyph estimate & using actual codeword count
CODE16K: ensure initial mode selection allows for extended
characters
vector.c: add `z_alloca()` cast for `first_row_rects` (ticket
#272)
MSVC project files: remove incorrect "CompileACpp" setting from
libzint project files (ticket #272)
bwipp_dump.ps: fix 2/4-track processing; update to latest BWIPP
manual/man page/GUI: Code 16k -> Code 16K
GS1 mode, ticket #271
- CLI: improve `getopt_long_only()` processing, printing own message if bad
arg and returning error if so rather than continuing to process
- manual: MSE typo -> MSI, a few other changes; adjust SVG scaling for PDF
manual; pandoc 2.19.2