Optional 29th glyph to use as start and end mark in sample text, making it
conform to official specifications and recognisable by barcode scanners
(verified with ZXing Barcode Scanner on Android).
+ for (var col = 0; col < cols.length; col++) {
+ cols[col] = cols[col].innerHTML.trimRight();
+ }
// copy letters into sample
var output = '';
// copy letters into sample
var output = '';
}
if (col < cols.length) {
}
if (col < cols.length) {
- output += '<span>' + (cols[col].innerHTML.trimRight() || ' ') + '</span>';
+ output += '<span>' + (cols[col] || ' ') + '</span>';
}
else {
output += ' ';
}
}
}
else {
output += ' ';
}
}
+ if (cols[29] && !cols[28]) {
+ // circumfix sign if no repetition
+ output = cols[29] + output + cols[29];
+ }
samplecol.innerHTML = output;
}
};
samplecol.innerHTML = output;
}
};
],
'Code 39' => [
# ISO/IEC 16388
],
'Code 39' => [
# ISO/IEC 16388
- map { tr/012/ ❘❙/r } qw(
+ map { !!$_ && tr/012/ ❘❙/r }
+ # bar widths (1-2) followed by space of width 1 (implied) or 2 (0)
+ qw(
211012 121012 221011 112012 212011 122011 111022 211021 121021 112021
211102 121102 221101 112102 212101 122101 111202 211201 121201 112201
211012 121012 221011 112012 212011 122011 111022 211021 121021 112021
211102 121102 221101 112102 212101 122101 111202 211201 121201 112201
- 201112 102112 202111 101212 201211 102211 102121
+ 201112 102112 202111 101212 201211 102211 102121 0 101221