Live data from Hacker News

Libre Barcode Project

graphicore.github.io

21–30 of 71 posts

Re: Libre Barcode Project

#21
post #16
post #13

Earlier quoted context omitted.

More or less, AFAICT the underlying barcode standards don't support Unicode, if that's what you mean. It looks like Code 128 could potentially handle some ISO-8859-1 accented latin characters, but I'm not sure how to test it.

Code 128 supports some ISO-8859-1 indeed, but it requires switching between encodings (there are 3 of them), and couldn't work with 128B (I guess the one used by the font, as it supports ASCII). See the table on Wikipedia: https://en.wikipedia.org/wiki/Code_128

actually it seems they support 128A 128B and 128C with the correct encoder.

  To use these fonts you have to use an encoder like the one below. It is an optimizing encoder, that means, it produces the shortest barcode that can encode the input. For this the encoder, if necessary or shorter, switches between the three available Code Sets (list from Wikipedia):
https://graphicore.github.io/librebarcode/documentation/code...

Re: Libre Barcode Project

#22
post #5

This is a perversion of the most sickening nature. Nicely done!

I'm surprised at this reaction, this has been standard practice for many years in various companies where I worked.

The fact that this is standard practice does not mean that it is not perverse. It kind of works sanely for plain Code39 (and even then you will see effects of doing that in weird places, like VAG stamping human readable VIN on a chassis, including the Code39 start/stop symbols), once you start using barcode fonts for Code128-derived symbologies (ie. UPC/EAN) the whole thing becomes a pointless exercise.

Re: Libre Barcode Project

#24
Do not do this unless you do not have any other choice. Preferrably use whatever native barcode support of the printer involved, if it does not have that, just generate the barcode as vector image or bitmap with a resolution that is a integer fraction of the printers resolution. Generating correct Code128 as a SVG is about the same amount of work as generating the correct input for some sort of barcode font (the hard part is determining the switches between character sets, not generating bars from bytes).

Re: Libre Barcode Project

#25
post #3

Earlier quoted context omitted.

[flagged]

You all know this is the answer. In fact you will do this and then post it on Show HN proudly.

The downvotes aren't saying the comment is wrong (though it might be), they are saying “if it is that easy, you ask Claude”. The parent comment seemed to be specifically asking if a person would work on it, not specifying what tools might be used in that work.

Re: Libre Barcode Project

#26
post #23

Barcode fonts have been around for ages. But what's cute about this one is that it can calculate the EAN13 checksum on its own.

It can’t, at least for Code 128? There’s a text field that you enter the text into, and then the start/stop/checksum characters are computed.

Re: Libre Barcode Project

#27
post #13

ASCII only?

More or less, AFAICT the underlying barcode standards don't support Unicode, if that's what you mean. It looks like Code 128 could potentially handle some ISO-8859-1 accented latin characters, but I'm not sure how to test it.

Even with plain ASCII we sometime struggle with the various scanners, as they emulate keyboards. So for instance using : in the barcode as a separator of values becomes wonky if the OS has a different input language than expected.

Re: Libre Barcode Project

#28
post #24

Do not do this unless you do not have any other choice. Preferrably use whatever native barcode support of the printer involved, if it does not have that, just generate the barcode as vector image or bitmap with a resolution that is a integer fraction of the printers resolution. Generating correct Code128 as a SVG is about the same amount of work as generating the correct input for some sort of barcode font (the hard…

Shameless plug for my web-based Zint frontend: https://barcode.new (in-browser WASM)

I wrote it specifically because most online barcode generators don’t support vector output or suck in some other way: ads, signup necessary, code payload exposed to server-side processing etc.

Re: Libre Barcode Project

#29
post #23

Barcode fonts have been around for ages. But what's cute about this one is that it can calculate the EAN13 checksum on its own.

It can’t, at least for Code 128? There’s a text field that you enter the text into, and then the start/stop/checksum characters are computed.

It seems like it doesn't do this for Code 128 (possibly because it is variable-width?). It definitely works with EAN13 though - I tried it locally using only the TTF file.

Re: Libre Barcode Project

#30
post #29

Earlier quoted context omitted.

It can’t, at least for Code 128? There’s a text field that you enter the text into, and then the start/stop/checksum characters are computed.

It seems like it doesn't do this for Code 128 (possibly because it is variable-width?). It definitely works with EAN13 though - I tried it locally using only the TTF file.

Oh, interesting! I tried it in Word on macOS but didn't get it to work. But it works in the browser (question mark = calculates check digit).

It uses this, which i have no idea what it is :-) https://learn.microsoft.com/en-us/typography/opentype/spec/f...

Post reply on HN