Commit graph

72 commits

Author SHA1 Message Date
Harald Oehlmann
2e350232de Extend stubs require string to an open string 2023-12-11 19:03:24 +01:00
Harald Oehlmann
03948c1d28 Comply to TCL/Tk 9 C library. See https://core.tcl-lang.org/tcl/wiki?name=Migrating+C+extensions+to+Tcl+9 2023-12-11 18:51:21 +01:00
gitlost
ca964f9098 DATAMATRIX: add DM_ISO_144 (--dmiso144) option for ISO placement
of ECC codewords instead of default "de facto"
2023-10-30 20:28:00 +00:00
gitlost
607e4ed33a EAN/UPC: add quiet zone indicators option (API output_options
`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)
2023-06-12 01:25:55 +01:00
gitlost
90293ebcda - Add text_gap option to allow adjustment of vertical gap between
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
2023-02-10 14:44:10 +00:00
gitlost
6f7cdd660c - Add special symbology-specific escape sequences (Code 128 only)
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
2023-01-15 00:22:43 +00:00
gitlost
ab7da62a3a UPU_S10/GS1: properly expose iso3166_alpha2(); add UPU_S10 to tcl 2022-12-09 15:56:13 +00:00
gitlost
25dacb2949 - Add new symbology BARCODE_MAILMARK_2D (Royal Mail 2D Mailmark),
renaming previous BARCODE_MAILMARK (Royal Mail 4-State Mailmark)
  to BARCODE_MAILMARK_4S
- backend_tcl: update TEA
2022-12-08 13:48:31 +00:00
gitlost
c8033695d9 - API: add new zint_symbol dpmm field for output resolution (BMP/
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
2022-12-02 21:39:01 +00:00
gitlost
2f8681b21a - API/CLI/Tcl/GUI: new output option BARCODE_BIND_TOP/--bindtop/
`-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
2022-11-10 22:13:41 +00:00
gitlost
b42f456b88 CEPNET: height/quiet zones, backend_tcl, test suite 2022-08-20 20:45:51 +01:00
gitlost
471aed7a69 BC412: add to backend_tcl; add skeleton test
GUI: allow for Qt not parsing #if's in slots (copy_to_clipboard_png())
2022-07-03 23:54:42 +01:00
gitlost
e30e1f9651 RMQR: update to ISO/IEC 23941:2022 - R13x77 numeric cclens change 8 -> 7
QRCODE: use stricter interpretation of ZINT_FULL_MULTIBYTE, excluding
  certain trailing bytes
libzint: fix some confusing error messages introduced by segment stuff
general: new escape chars \U, \d and \o
backend_qt: fudge rendering of border rectangles due to scaling/translation
  rounding errors TODO: better fudge
GUI: foreground/background colours -> text boxes and icon buttons, add swap
  button, independently movable picker (NULL parent), preview colour changes,
  preview Data Window changes, add clear data (del) buttons, add zap button
  and Factory Reset menu option, various other fixes
libzint: remove STATIC_UNLESS_ZINT_TEST, use wrappers
CMake: add find package QtSvg, remove QtXml
manual: split symbology and general specs and sort, move DAFT to 4-state,
  UPC/EAN -> EAN/UPC, DataBar -> GS1 DataBar always, expand MAILMARK info,
  various other fiddlings
man page: options or -> |, expand MSI Plessey check digit options
README.linux: add packages info
license: add SPDX-License-Identifier to touched files
2022-06-09 21:52:02 +01:00
gitlost
9aae557cdc CLI/Tcl: fix version check (need <= 999 for DAFT permille)
UPNQR: fix required binary mode using mode_preset
UPNQR: allow mask to be manually specified
GUI: use non-native QColorDialog on Unix also; no noEXE for CLI equivalent;
  add shortcuts for copy-to-clipboard and CLI equivalent
CLI: new --version option to print Zint version
2022-05-12 20:35:06 +01:00
gitlost
f58c80e290 Add multiple segments support for AZTEC, CODEONE, DATAMATRIX, DOTCODE,
GRIDMATRIX, HANXIN, MAXICODE, MICROPDF417, PDF417, QRCODE, RMQR, ULTRA
RMQR: fix ECI encoding (wrong bit length for indicator)
MICROQR: check versions M1 and M2 for allowed characters so as to give
  better error messages
DOTCODE: some small optimizations
common.c: add is_chr(), segs_length(), segs_cpy()
CODEONE/CODE128/DOTCODE/GRIDMATRIX/HANXIN/MAXICODE/QRCODE/ULTRA: add
  namespace prefixes to static funcs/data
includes: use Z_ prefix, unuse double underscore prefixes (guard defines)
manual.txt: compress some tables using double/treble column sets
2022-05-09 19:50:50 +01:00
gitlost
624d40021e ECI: Update ECIs to AIM ITS/04-023:2022, adding UTF-16BE (was USC-2BE),
UTF-16LE, GBK, separate GB18030, UTF-32BE, UTF-32LE
  add examples to tests for DATAMATRIX, HANXIN, QRCODE
HANXIN: Remove alternating filler in function information;
  GB 18030 now ECI 32 (previously used ECI 29);
  fix gate-posts on codeword limits
  use new ZXing-C++ HanXin detector (diagnostics2 branch) for tests
  check against ISO/IEC 20830:2021 (no substantive changes)
backend_tcl: update ECIs; NOTE: changed names "unicode" -> "utf-16be",
  "euc-cn" -> "gb2312"
GRIDMATRIX/HANXIN/QRCODE/RMQR: warn if auto-conversion (i.e. no ECI given)
  occurs to resp. specialized char sets (GB 2312/GB 18030/Shift JIS)
2022-04-10 11:12:18 +01:00
gitlost
b36fba8ba6 DATAMATRIX: new algorithm for (near-)minimal encoding, props Alex Geller
Add FAST_MODE input_mode flag and --fast CLI/Tcl option that selects older
  faster ISO algorithm (may be used by other symbologies in the future)
  and "Fast Encoding" checkbox to Data Matrix GUI
GUI: adds Zint version numbers to DATAMATRIX sizes.
2021-12-18 16:22:02 +00:00
gitlost
e14d9e99d5 Add HEIGHTPERROW_MODE_input mode flag (#204)
backend_qt: add encodedWidth, encodedRows
DBAR_EXPSTK: add max rows option (option_3)
CODE16K/CODE49: add min rows option (option_1)
GUI: HIBC xxx -> HIBC
2021-11-20 11:32:30 +00:00
gitlost
4e72a541f7 PDF417: fix cols/rows calculation to require multiple <= 928 codewords;
add specify rows option (option_3) (#204);
  warn if cols increased from specified (back-incompatible);
  move table definitions from "pdf417.h" to new "pdf417_tabs.h" and
  make INTERNAL_DATA and share with composite.c (saves ~10K);
  prefix routines and tables with "pdf_";
  some small performance improvements through if/elses, pdf_textprocess()
  & pdf_numbprocess() loop simplifications
MICROQR: fix debug access crash on printing non-NUL-terminating binary
DATAMATRIX: fix missing ++ from "[tp]" at C40/TEXT EOD processing of GS1
  (though probably never reached); use "[tp++]" throughout
Add const to static tables missing it and also to some variables
Change "debug" -> "debug_print" throughout
2021-10-30 22:00:31 +01:00
gitlost
e8b59aa696 height max 500 -> 2000 to allow for 44 row CODABLOCKF at 45X each 2021-10-18 14:05:51 +01:00
gitlost
72eac41c34 Add compliant height, using ZINT_COMPLIANT_HEIGHT flag for back-compatibility
Rename barcode funcs to same as BARCODE_XXX name
library: barcode funcs array for dispatch, used for ZBarcode_ValidID() also
general: change is_sane() comparison to nonzero from ZINT_ERROR_INVALID_OPTION
MAILMARK: fuller error messages
CODABAR: add option to show check character in HRT
zint.h: use 0xNNNN for OR-able defines
GUI: add guard descent height reset button, add Zint version to window title,
  static get_zint_version() method, use QStringLiteral (QSL shorthand),
  use SIGNAL(toggled()), add errtxt "popup" and status bar, add icons,
  add saveAs shortcut, add main menu, context menus and actions, add help,
  reset_view() -> reset_colours(), add copy to clipboard as EMF/GIF/PNG/TIF,
  lessen triggering of update_preview(), shorten names of getters/setters,
  simplify/shorten some update_preview() logic in switch,
  CODEONE disable structapp for Version S
qzint.cpp: add on_errored signal, add missing getters, add test
2021-10-09 00:13:39 +01:00
gitlost
c0791ad85e Add Structured Append support for AZTEC, CODEONE, DATAMATRIX, DOTCODE,
GRIDMATRIX, MAXICODE, MICROPDF417, PDF417, QRCODE, ULTRA
DOTCODE: use pre-calculated generator poly coeffs in Reed-Solomon for
  performance improvement
PDF417/MICROPDF417: use common routine pdf417_initial()
GUI: code lines <= 118, shorthand widget_obj(),
  shorten calling upcean_addon_gap(), upcean_guard_descent()
various backend: var name debug -> debug_print
2021-09-28 21:42:44 +01:00
gitlost
4284f3c578 Add output_options BARCODE_QUIET_ZONES and BARCODE_NO_QUIET_ZONES 2021-09-24 13:21:24 +01:00
gitlost
4009c86c5f UPC/EAN: Add guard_bar descent (guard_descent)
zint.h: Adjust field order to improve alignments; encoded_data 143 -> 144
2021-09-22 00:04:15 +01:00
gitlost
2e84fd5157 Replace WARN_ZPL_COMPAT with GS1NOCHECK_MODE 2021-07-13 17:39:03 +01:00
gitlost
c693482aa1 Change height and row_height array to floats; DAFT tracker ratio 2021-06-19 13:11:23 +01:00
gitlost
9b63e2ae22 DOTCODE: allow for max 200 cols in CLI, GUI, Tcl; more detailed size error messages 2021-05-28 15:05:06 +01:00
gitlost
ba273b40dd Add whitespace_height - remove DEBUG from tcl; manual.txt input_mode 2021-05-26 13:10:34 +01:00
gitlost
00e8cb0904 Add whitespace_height to zint_symbol (vertical whitespace) 2021-05-25 20:42:26 +01:00
gitlost
79d3c1dc7a Add GS1PARENS_MODE (input_mode) to allow inputting GS1 AIs in parentheses 2021-05-15 12:23:46 +01:00
gitlost
7f74414666 eci.c: fix bad bug in Korean, return EUC-KR instead of raw KS X 1001 2021-03-20 14:36:21 +00:00
gitlost
f6bed3acb2 DOTCODE: Fix best_mask -> high_score prime test; manual mask 2021-01-22 18:07:59 +00:00
Harald Oehlmann
2f48b69138 2021-01-14 HaO TCL Backend: Added detection of presence of the Tk package and late initialization. This is a preparation to add a TCL only mode to the DLL. 2021-01-14 11:03:13 +01:00
Harald Oehlmann
5cc4674a99 Added changelog in TCL file, that character encoding is now treated by zint and TCL encodings are not used any more. 2021-01-14 10:07:25 +01:00
gitlost
e1e0aa7ac4 eci: All ECIs: update CLI main.c and tcl zint.c 2021-01-12 14:11:53 +00:00
Harald Oehlmann
04bf0ec99c 2021-01-05 2.9.1 HaO TCL backend update
+- Added options -reverse, -werror, -wzpl
+- Use version number from zint.h (first 3 digits). Do not use an own one.
2021-01-05 14:13:11 +01:00
gitlost
2b85585e69 MAXICODE: scmvv option #212; postcode needn't be space-filled 2020-12-19 17:13:35 +00:00
gitlost
cd214addba HANXIN: 0xFFE terminator; reedsol/AZTEC: stack-based; AZTEC/HANXIN/QR/GRIDMATRIX speedups; #209 2020-11-27 12:54:44 +00:00
gitlost
e37a82a8f1 Tabs/typo in zint.h; PostNet -> POSTNET; ui: shortcuts, tooltips; tests inkscape -> libreoffice 2020-10-03 22:51:08 +01:00
gitlost
36c19053d7 vector.c: string halign; POSTNET/PLANET: 1 module space; ZBarcode_Cap(); GUI settings 2020-09-30 12:19:12 +01:00
gitlost
ac7b5dd282 #206 build: version to 2.9.1.9; ZINT_VERSION_BUILD (9 dev); tools/update_version.php 2020-09-04 16:38:11 +01:00
Harald Oehlmann
b78fa8cf2f - Compile-able with MS-VC6
- Compile-able with MS-VC2015+QT5.18
- transbarency in TCL backend
- correct TCL demo
- README changes
2020-08-04 15:49:25 +02:00
Robin Stuart
e9652df70c Change PDF417TRUNC -> PDF417COMP and version 2.8 -> 2.9 2020-07-29 22:35:31 +01:00
Robin Stuart
0004cfb35a Change symbol names e.g. RSS > GS-1 DataBar
Preserves old names in zint.h to retain backwards compatability.
2020-07-29 20:43:08 +01:00
Harald Oehlmann
b0c30489ec README updated with the changes of the last 3 weeks
TCL backend changes:
- Version now 2.9.0
- option -addongap added
- renamed the following symbology names:
  - Matrix2of5 -> Standard2of5
  - PDF417Trunc -> PDF417Compact
  - RSS14Stacked -> GS1DataBarStacked
  - RSS14Stacked -> GS1DataBarStacked
  - RSS14StackedOmni -> GS1DataBarSstackedOmni
  - RSS14ExpandedStacked -> GS1DataBarExpandedStacked
  - OneCode -> USPSIntelligentMail
  - EAN128-CC -> GS1-128-CC
  - RSS14-CC -> GS1DataBarOmni-CC
  - RSSLimited-CC -> GS1DataBarLimited-CC
  - RSSExpandedStacked-CC -> GS1DataBarExpanded-CC
  - RSSEXPanded-CC -> GS1DataBarExpanded-CC
  - RSS14Stacked-CC -> GS1DataBarStacked-CC
  - RSS14Omni-CC -> GS1DataBarStackedOmni-CC
  - RSSExpandedStacked-CC -> GS1DataBarExpandedStacked-CC
  *** Potential incompatibility ***
2020-07-27 18:44:51 +02:00
Harald Oehlmann
5875305cef Added changes list of last great commit by GITLose 2020-06-10 12:02:53 +02:00
Harald Oehlmann
9f56a1c35e - Added changes in README
- Migrated changes in main.c to tcl backend
- TCL Demo did not honor the specified options
- Added "static" to function "is_stackable" in frontend/main.c. This is an interrim solution, see E-Mail.
2020-05-19 12:02:18 +02:00
Harald Oehlmann
17474b10d8 Add UltraCode symbology to the tcl backend. 2020-04-07 18:11:33 +02:00
Harald Oehlmann
2f99f0c4fd Add -fullmultibyte to tcl frontend 2020-04-06 18:37:39 +02:00
Harald Oehlmann
0c5dc4d030 Set version to 2.7.1 2020-02-01 19:36:50 +01:00