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
This commit is contained in:
gitlost 2022-05-19 10:17:51 +01:00
parent 9aae557cdc
commit 719613d4c3
160 changed files with 18144 additions and 2674 deletions

View file

@ -351,6 +351,7 @@ INTERNAL int get_best_eci(const unsigned char source[], int length) {
/* Return 0 on failure, first ECI set on success */
INTERNAL int get_best_eci_segs(struct zint_symbol *symbol, struct zint_seg segs[], const int seg_count) {
const int default_eci = symbol->symbology == BARCODE_GRIDMATRIX ? 29 : symbol->symbology == BARCODE_UPNQR ? 4 : 3;
int first_eci_set = 0;
int i;
@ -360,8 +361,8 @@ INTERNAL int get_best_eci_segs(struct zint_symbol *symbol, struct zint_seg segs[
if (eci == 0) {
return 0;
}
if (eci == 3) {
if (i != 0 && segs[i - 1].eci > 3) {
if (eci == default_eci) {
if (i != 0 && segs[i - 1].eci != 0 && segs[i - 1].eci != default_eci) {
segs[i].eci = eci;
if (first_eci_set == 0) {
first_eci_set = eci;