- CODABLOCKF: fix misencodation of extended ASCII 0xB0-0xB9 when

followed by digit (ignore 2nd byte of FNC4 when categorizing
  Code C characters)
- New `ZBarcode_Cap()` flag `ZINT_CAP_BINDABLE`, differentiated
  from `ZINT_CAP_STACKABLE`, and new Qt Backend method
  `isBindable()`
- CLI: fix `separator` check to use new `ZINT_CAP_BINDABLE` instead
  of `ZINT_CAP_STACKABLE`
- ZBarcode_Cap: add missing symbologies to `ZINT_CAP_BINDABLE` (was
  `ZINT_CAP_STACKABLE`)
- DOTCODE: pad rows if given number of columns instead of failing
  if rows below min (5)
- DBAR/composites: ensure stacked symbologies and composites are
  not stacked (set `symbol->rows` to 0)
- test suite: move `test_perf` routines into single test
  "test_perf";
  new "test_random" (based on "test_bwipp") to test various
  symbologies with random binary - discovered CODABLOCKF bug;
  expand "test_bwipp"
manual: Feeback: mention AZTEC -1 meaning min & MICROPDF417:
  doc new `ZINT_CAP_BINDABLE`
general: various code fiddlings and re-formattings
This commit is contained in:
gitlost 2025-04-03 16:08:15 +01:00
parent 2370fbfbb7
commit a74871a7de
60 changed files with 3509 additions and 3267 deletions

View file

@ -173,45 +173,57 @@ static int pdf_textprocess_switch(const int curtable, const int newtable, unsign
switch (curtable) {
case T_ALPHA:
switch (newtable) {
case T_LOWER: chainet[wnet++] = 27; /* LL */
case T_LOWER:
chainet[wnet++] = 27; /* LL */
break;
case T_MIXED: chainet[wnet++] = 28; /* ML */
case T_MIXED:
chainet[wnet++] = 28; /* ML */
break;
case T_PUNCT: chainet[wnet++] = 28; /* ML+PL */
case T_PUNCT:
chainet[wnet++] = 28; /* ML+PL */
chainet[wnet++] = 25;
break;
}
break;
case T_LOWER:
switch (newtable) {
case T_ALPHA: chainet[wnet++] = 28; /* ML+AL */
case T_ALPHA:
chainet[wnet++] = 28; /* ML+AL */
chainet[wnet++] = 28;
break;
case T_MIXED: chainet[wnet++] = 28; /* ML */
case T_MIXED:
chainet[wnet++] = 28; /* ML */
break;
case T_PUNCT: chainet[wnet++] = 28; /* ML+PL */
case T_PUNCT:
chainet[wnet++] = 28; /* ML+PL */
chainet[wnet++] = 25;
break;
}
break;
case T_MIXED:
switch (newtable) {
case T_ALPHA: chainet[wnet++] = 28; /* AL */
case T_ALPHA:
chainet[wnet++] = 28; /* AL */
break;
case T_LOWER: chainet[wnet++] = 27; /* LL */
case T_LOWER:
chainet[wnet++] = 27; /* LL */
break;
case T_PUNCT: chainet[wnet++] = 25; /* PL */
case T_PUNCT:
chainet[wnet++] = 25; /* PL */
break;
}
break;
case T_PUNCT:
switch (newtable) {
case T_ALPHA: chainet[wnet++] = 29; /* AL */
case T_ALPHA:
chainet[wnet++] = 29; /* AL */
break;
case T_LOWER: chainet[wnet++] = 29; /* AL+LL */
case T_LOWER:
chainet[wnet++] = 29; /* AL+LL */
chainet[wnet++] = 27;
break;
case T_MIXED: chainet[wnet++] = 29; /* AL+ML */
case T_MIXED:
chainet[wnet++] = 29; /* AL+ML */
chainet[wnet++] = 28;
break;
}
@ -1345,24 +1357,15 @@ static int pdf_enc(struct zint_symbol *symbol, struct zint_seg segs[], const int
/* 796 - we now take care of the Reed Solomon codes */
switch (ecc) {
case 1: offset = 2;
break;
case 2: offset = 6;
break;
case 3: offset = 14;
break;
case 4: offset = 30;
break;
case 5: offset = 62;
break;
case 6: offset = 126;
break;
case 7: offset = 254;
break;
case 8: offset = 510;
break;
default: offset = 0;
break;
case 1: offset = 2; break;
case 2: offset = 6; break;
case 3: offset = 14; break;
case 4: offset = 30; break;
case 5: offset = 62; break;
case 6: offset = 126; break;
case 7: offset = 254; break;
case 8: offset = 510; break;
default: offset = 0; break;
}
for (i = 0; i < mclength; i++) {
@ -1744,6 +1747,7 @@ INTERNAL int micropdf417(struct zint_symbol *symbol, struct zint_seg segs[], con
/* Cluster can be 0, 1 or 2 for Cluster(0), Cluster(3) and Cluster(6) */
if (debug_print) fputs("\nInternal row representation:\n", stdout);
for (i = 0; i < symbol->rows; i++) {
if (debug_print) printf("row %d: ", i);
bp = 0;