Commit graph

192 commits

Author SHA1 Message Date
gitlost
a324fe90f6 vector: reduce SMALL_TEXT font height 6 -> 5 to be more like raster;
reduce antialiasing allowance for `textoffset`;
  adjust text to baseline using values for Arimo rather than
  percentage
GUI: fix not enabling font combo "Small Bold (vector only)" by
  default
raster/vector: rename `text_height` -> `font_height`
2023-06-22 17:48:54 +01:00
gitlost
acd52ac489 Actually change SVG font to "Arimo, Arial, sans-serif" ([607e4ed])
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
2023-06-13 18:12:20 +01: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
Sanych.by
2919a20384 help question mark in dialogs disabled by default in Qt6 2023-03-30 11:51:31 +03: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
ab2abccdb6 - zint_symbol->fgcolour & bgcolour buffer lengths extended 10
-> 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
2023-01-29 19:51:11 +00:00
gitlost
48eaa0cc4e GUI: fg/bgcolor text edit: fix right-click context menu not working
properly by checking for it on FocusOut
2023-01-19 00:11:29 +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
268fdd7fc2 - BMP/EMF/EPS/GIF/PCX/PNG/SVG/TIF/TXT: check for errors on writing
to output file; ZBarcode_Encode_File: check `fseek()` for errors
  (ticket #275)
- man page: fix Code 11 check digit info
- manual/man page: document octal escape; Code 128 subset/mode ->
  Code Set
2022-12-19 16:28:15 +00:00
gitlost
a437f80d01 Bump version to 2.12.0.9 (dev) 2022-12-12 21:45:16 +00:00
gitlost
9cfc2a85b0 Version 2.12.0 2022-12-12 21:06:08 +00:00
gitlost
53769c6ed1 - Add new symbology BARCODE_UPU_S10
- PZN: allow check digit to be given; add space after hyphen in
  HRT; PZN7 option
- backend_qt: add `encodedHeight()` read-only
2022-12-09 14:51:26 +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
ad1b091ed1 QROCDE/UPNQR: add FAST_MODE (try 4 not 8 masks automatically) 2022-12-05 10:11:36 +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
6393813cff - cmake: remove zintconfig.h.in for now as incompatible with MSVC
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()`
2022-11-24 14:18:31 +00:00
Todor Prokopov
66431d8ec1 Add ZINT_SHARED CMake option
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.
2022-11-21 15:35:06 +02: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
e515f63fab - PDF417/MICROPDF417: use latch not ps shift for padding when
spanning Text segments to avoid affecting 1st char of 2nd segment
- PDF417/MICROPDF417: add optimized encoding, FAST_MODE for
  previous scheme; formatting changes
- common.c/h: add `cnt_digits()`, comments in include and make more
  consistent, minor code fiddling
- DOTCODE: replace `dc_n_digits()` with new `cnt_digits()`
- test_qr: fix `test_qr_perf()`
- composite: minor code fiddling
- library: debug dump HIBC-processed input
- BWIPP: update to latest
2022-11-06 22:25:19 +00:00
gitlost
ada19fc079 CODE128: allow for extended latching (double FNC4) spanning
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
2022-10-13 13:33:59 +01:00
gitlost
92a4a25ed2 - DOTCODE, QRCODE, RMQR: return warning if ECI or Structured Append used in
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
2022-09-28 21:58:57 +01:00
gitlost
ac421144c9 Bump version to 2.11.1.9 (dev) 2022-08-25 17:58:13 +01:00
gitlost
8310a4b938 Release 2.11.1 2022-08-22 16:28:22 +01:00
gitlost
25c9582ae2 Update bwipp_dump; README: mention doc; some other tweaks 2022-08-21 15:15:27 +01:00
Robin Stuart
35c207edd4 Add Brizilian CEPNet (almost identical to POSTNET) using Symbol #54 2022-08-16 16:17:39 +01:00
gitlost
c0ec67f99e - vector: ensure separators don't overlap with other rectangles so that
they render correctly when have RGBA alpha channel
- GUI: update_preview() after Data Dialog return to ensure preview in sync
- GUI: add automatic info feedback to "Automatic" combo item of size/row/height
  comboboxes
- backend_qt: always call getMaxRectsRightBottom() for render fudge; use
  ZBarcode_Clear() instead of ZBarcode_Delete() after 1st call
- update BWIPP to latest & add some MICROQR tests to exercise optimize change
2022-08-07 22:43:49 +01:00
gitlost
516e4ddd49 manual/GUI: correct MaxiCode space padding description/tooltip (mode 3 only) 2022-07-28 22:18:16 +01:00
gitlost
65eb2f075c update_version.php: fix README.linux replacement regex
various .rc: http -> https, 2021 -> 2022
GUI: Sourceforge -> SourceForge
2022-07-21 23:10:39 +01:00
gitlost
2a55f15135 BC412: height calc, table typo fix, tests, manual 2022-07-21 12:29:53 +01:00
gitlost
930f458979 backend: define z_alloca() and use for both Unix and Windows;
replace double-slash comments with old-skool slash asterisk ones;
  define uint16_t etc for Windows ourselves and remove ms_stdint.h &
  stdint_msvc.h as no longer used;
  (backend (excepting test suite) now C89 compatible)
LICENSE: move from backend to root and move COPYING to frontend, with
  copies in frontend_qt & backend_qt, so in where it applies;
  add LICENSE section from manual to root README
2022-07-14 16:01:30 +01:00
gitlost
9870fc6a61 GUI: undo Windows * -> + change as formatting data, not filenames, doh 2022-07-05 01:35:24 +01:00
gitlost
8525597b81 frontend: batch: for @ use + instead of * on Windows as * not allowed
in filenames
GUI: sequence: similarly for * use + instead of * on Windows
2022-07-04 21:55:06 +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
Robin Stuart
7c4afa49c9 Add symbology BC412 2022-07-03 15:47:56 +01:00
gitlost
0b3fe8db93 GUI: remove sizeConstraint so squashable again (sigh)
- make Sequence Format textbox bigger (on own line)
  - suppress question mark in Windows dialogs
AUSPOST: more standard error messages
backend: add & use z_isdigit/upper/lower() macros
docs: 20-bit Unicode -> 21-bit Unicode
2022-06-24 14:38:48 +01:00
gitlost
07772094d5 GUI: restore tabMain minimizeSize (preview wasn't updating correctly)
- manually adjust Windows min/max sizes; use grpC39 for LOGMARS
2022-06-18 23:41:27 +01:00
gitlost
18ede09761 GUI: primaryScreen -> primaryScreen() 2022-06-16 17:27:19 +01:00
gitlost
15b8024712 - library: check symbol->primary for escape sequences also
- GUI: error message GS1_MODE -> GS1 mode
- GUI: sequence window: fix initial clear button status
- GUI: make acceptable for macOS; add iconset for macOS, install
- manual: update macOS Homebrew install info; add README.macos
- GUI: export window: add no. of sequences to results label
2022-06-16 16:47:34 +01:00
gitlost
a232dec4ff composite: less confusing error message for no linear data
GUI: restore mainWindow min width to allow squashability
GUI/manual: use EAN and UPC initials first rather than long names
  (easier to spot)
2022-06-11 12:28:48 +01:00
gitlost
270f1d136c - GUI: remove unnecessary tabMain min size (better layout rendering on
Windows/Fedora); groupbox Composite -> GS1 Composite
2022-06-10 16:43:10 +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
ab3cf4f395 eci.c: replace libiconv-adapted code with own implementations so
as to fully comply with BSD license (for why Library GPL 2+ not
  compatible see https://opensource.stackexchange.com/a/6701),
  ~3% slower (maybe), +~6K extra in data
  (gb18030.c, gb2313.c & sjis.c removed, mapping .TXT files moved
  to backend/tools/data & extra ones added, 2 new PHP generators)
GUI: CODE39/EXCODE39: show/hide HIBC check digit option in addition
  to enable/disable (less confusing)
CLI: batch: pedantic check for EOF using intChar in newline fgetc()
  loop
test_args.c: don't use WIFEXITED(), WEXITSTATUS() on Windows
manual: lessen some copy/paste verbiage by referring back, other
  small tweaks/typos
2022-06-02 20:32:25 +01:00
gitlost
d9f2e85246 GUI: export dialog: add postfix field for filename (#252)
man page: expand --scale spiel, mention MaxiCode exceptionalism
manual: make MaxiCode scale exceptionalism a bit clearer
2022-05-25 13:44:45 +01:00
gitlost
71e72d7ecb Bump version to 2.11.0.9 (dev) 2022-05-24 21:52:02 +01:00
gitlost
6ac8c85dbb Update zint version to 2.11.0 2022-05-24 21:08:51 +01:00
gitlost
9ae4e347d7 CLI: return ZINT_ERROR_INVALID_OPTION instead of 1 on bad option and
ZINT_WARN_INVALID_OPTION instead of 0 on ignored option;
  more barcode synonyms
manual: append man page zint.1.pmd instead of CLI help;
  various tweaks and fiddlings;
  rMQR add ISO 23941 (released the other day but haven't got yet)
man page: expand and tweak
doc/Makefile: add HTML demo
2022-05-22 21:33:45 +01:00
gitlost
719613d4c3 GRIDMATRIX: default char set is GB 2312 only, not Latin-1 with GB 2312 alt
HANXIN/QRCODE: use Hanzi/Kanji modes when compatible ECIs given
manual: one true source now manual.pmd from which manual.txt is generated
CLI: man page moved from frontend/zint.1.gz to docs/zint.1.gz, now
  generated from docs/zint.1.pmd
add README.linux to root dir
2022-05-19 10:17:51 +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
b'Git Lost
3b9d989894 Merge /u/gitlost/zint/ branch eci_part3_2022 into master
https://sourceforge.net/p/zint/code/merge-requests/149/
2022-04-12 13:23:23 +00:00