mirror of
https://git.code.sf.net/p/zint/code
synced 2026-08-08 14:28:52 +00:00
font_wip branch: new WIP font stuff using "stb_truetype.h",
not implemented for EAN/UPC, not fully tested
This commit is contained in:
@@ -165,6 +165,10 @@ INTERNAL int zint_postnet(struct zint_symbol *symbol, unsigned char source[], in
|
||||
symbol->rows = 2;
|
||||
symbol->width = writer - 1;
|
||||
|
||||
if ((symbol->show_hrt & 0x7) >= ZINT_HRT_LINEAR_ALL) {
|
||||
z_hrt_cpy_cat_nochk(symbol, source, length, (char) z_itoc(check_digit), NULL /*cat*/, 0);
|
||||
}
|
||||
|
||||
if (content_segs && z_ct_cpy_cat(symbol, source, length, (char) z_itoc(check_digit), NULL /*cat*/, 0)) {
|
||||
return ZINT_ERROR_MEMORY; /* `z_ct_cpy_cat()` only fails with OOM */
|
||||
}
|
||||
@@ -279,6 +283,10 @@ INTERNAL int zint_fim(struct zint_symbol *symbol, unsigned char source[], int le
|
||||
(void) z_set_height(symbol, 0.0f, 50.0f, 0.0f, 1 /*no_errtxt*/);
|
||||
}
|
||||
|
||||
if ((symbol->show_hrt & 0x7) >= ZINT_HRT_LINEAR_ALL) {
|
||||
z_hrt_cpy_nochk(symbol, source, length);
|
||||
}
|
||||
|
||||
if (content_segs && z_ct_cpy(symbol, source, length)) {
|
||||
return ZINT_ERROR_MEMORY; /* `z_ct_cpy()` only fails with OOM */
|
||||
}
|
||||
@@ -457,6 +465,10 @@ INTERNAL int zint_rm4scc(struct zint_symbol *symbol, unsigned char source[], int
|
||||
(void) zint_daft_set_height(symbol, 0.0f, 0.0f);
|
||||
}
|
||||
|
||||
if ((symbol->show_hrt & 0x7) >= ZINT_HRT_LINEAR_ALL) {
|
||||
z_hrt_cpy_cat_nochk(symbol, source, length, check_digit, NULL /*cat*/, 0);
|
||||
}
|
||||
|
||||
if (content_segs && z_ct_cpy_cat(symbol, source, length, check_digit, NULL /*cat*/, 0)) {
|
||||
return ZINT_ERROR_MEMORY; /* `z_ct_cpy_cat()` only fails with OOM */
|
||||
}
|
||||
@@ -547,6 +559,10 @@ INTERNAL int zint_flat(struct zint_symbol *symbol, unsigned char source[], int l
|
||||
|
||||
/* TODO: Find documentation on BARCODE_FLAT dimensions/height */
|
||||
|
||||
if ((symbol->show_hrt & 0x7) >= ZINT_HRT_LINEAR_ALL) {
|
||||
z_hrt_cpy_nochk(symbol, source, length);
|
||||
}
|
||||
|
||||
if (content_segs && z_ct_cpy(symbol, source, length)) {
|
||||
return ZINT_ERROR_MEMORY; /* `z_ct_cpy()` only fails with OOM */
|
||||
}
|
||||
@@ -659,6 +675,10 @@ INTERNAL int zint_japanpost(struct zint_symbol *symbol, unsigned char source[],
|
||||
(void) zint_daft_set_height(symbol, 0.0f, 0.0f);
|
||||
}
|
||||
|
||||
if ((symbol->show_hrt & 0x7) >= ZINT_HRT_LINEAR_ALL) {
|
||||
z_hrt_cpy_nochk(symbol, source, length);
|
||||
}
|
||||
|
||||
/* Note: check char is in KASUTSET and not truly representable in raw text's SHKASUTSET_F */
|
||||
if (content_segs && z_ct_cpy(symbol, source, length)) {
|
||||
return ZINT_ERROR_MEMORY; /* `z_ct_cpy()` only fails with OOM */
|
||||
|
||||
Reference in New Issue
Block a user