4 ms·
Libre Barcode Project
- Closi 6y agoThere seems to be a problem with code-128 where if you put multiple numbers in it doesn't work (e.g. 123456)
- mark-r 6y agoCode 128 has a mode where it can encode 2 digits for every code. It's probably related to that somehow.
- mark-r 6y agoI just had a closer look and yes that's definitely the problem. Fonts require a 1:1 mapping between characters and outputs, there's no way to choose an output based on 2 consecutive digits so it needs to be mapped to an arbitrary character. If you scanned the resulting barcode I'm sure you'd see that it works just fine.
- ThePadawan 6y ago> Fonts require a 1:1 mapping between characters and outputs, there's no way to choose an output based on 2 consecutive digits IIRC ligatures break this constraint - that's how coding fonts get fancy glyphs for "==", "===", "=>" and so on.
- mark-r 6y agoGood point, but that's probably too much work for a free font. Especially since you need to output a code to mode switch before you can use the 2-digit barcodes, the font won't have any way of knowing what mode you're in.
- ThePadawan 6y agoThe free Fira Code [0] has them. I don't have the knowledge to respond to your second point. [0] https://github.com/tonsky/FiraCode https://github.com/tonsky/FiraCode
- ajennings 6y agoCode128 has a mandatory checksum, so I'm surprised they try to do it with a font. Code39 is pretty common to convert into a font, since the checksum is optional.
- latchkey 6y agoI have a large project that uses qrcode stickers to identify hardware. I tried with barcodes and found that iOS doesn't scan them as quickly or easily. Why do we use barcodes?
- kaoD 6y ago> Why do we use barcodes? Barcode readers are cheaper.
- colejohnson66 6y agoAlso, QR codes don’t work too well with damaged or faded paper. Think receipts. 1D barcodes work much better there as there’s redundancy in the second direction. Basically, QR codes do have the advantage in the density department, but are more complicated (relatively) to parse and more susceptible to damage. Tradeoffs that depend on your situation.
- sdmike1 6y agoThis just isn't true. QR codes have a high degree of redundancy built into them via error correcting codes. For example there is the famous case of a bitcoin private key being recovered from a small amount of a qr code and a blurry shot of the full one[0]. [0] https://www.freecodecamp.org/news/lets-enhance-how-we-found-rogerkver-s-1000-wallet-obfuscated-private-key-8514e74a5433 https://www.freecodecamp.org/news/lets-enhance-how-we-found-...
- kube-system 6y agoI think the average QR code has what, 15-30% redundancy? a 100 pixel high 1d barcode is 10,000% redundant in one axis :)
- deleted 6y ago[deleted]
- 6y ago
- progval 6y agoI had trouble understanding the example at first. It turns out that it relies on fonts.googleapis.com, so if you block that domain, the barcode is shown as regular text.
- adamhearn 6y agoThank you. Same problem. For the most part, I notice a great speedup and functionality improvement from blocking google fonts...The designer in my does die a little however when completely wrong fonts are rendered.
- mark-r 6y agoWhen I've had to work with barcodes I found it easy enough to generate an image rather than using a font. Font mapping for things that aren't characters, like stop codes, is always a tricky business.
- mrweasel 6y agoI found the opposite to be true. Yes, generating the image isn't that complicated, but getting them to scale correctly so that your label printer will produce a printed barcode that will both fit on the label and be readable by a barcode reader is a nightmare. Having to scale a font seem to be much easier to deal with, but I might be wrong.
- colejohnson66 6y agoAssuming you’re talking about blurring due to raster images, wouldn’t vector images solve that? A font is (generally) just that: vectors, not pixels.
- mrweasel 6y agoNo, not blurring, you can only "stretch" a barcode so far, before the spacing confuses the scanner. The issue we faced was a bit stupid and a result of trying to save money. The type of barcode we used, and I forget the type, was actually a little to large for the labels we wanted to use, and the labels where very skinny. Trying to maximize the size of the barcode, so our cheap scanner would read the, meant pushing the barcode almost to the edge of the label. That involved fiddling with the size and margins on the Zebra printers, and if you don't get it right the scanner would either fail to read the barcode because the margin was to small (at least our cheap scanners require a margin of some minimal size to identify where the bars start) or the lines where to short and scanners can't read the bars if they're to short.
- mark-r 6y agoThe barcode standards themselves specify the amount of white space you need before and after the barcode proper. Even the cheapest scanners should work if you met that.
- teolemon 6y agoWe need a modern opensource barcode reader. The best thing (zxing) is in maintenance mode, and the newer barcode scanners with niceties like neural scan, 90% scan, bortched barcode scan are all closed source.
- mark-r 6y agoI tried to write my own scanner in Python, but couldn't get it reliable enough to release. Is there anything wrong with maintenance mode if it works?
- turminal 6y agoIn my experience it doesn't really work that well. I was trying to make a barcode scanner out of a raspberry pi with a camera module during a hackathon once. What an absolute nightmare.
- mark-r 6y agoMy code probably would have worked with good image quality, but I wanted something more robust that would work with a cheap webcam. I imagine the pi camera module is about the same.
- turminal 6y agoYeah, image quality was what made us abandon the idea but before that I found it really troublesome to setup and use zxing to do anything at all.
- ficklepickle 6y agoOpenCueCat?
- tomcam 6y agoWe’re too young to remember that awesome issue of Wired
- UncleEntity 6y agoWith an emoji for everything known to humankind one would think there were barcode characters in unicode but, nope. Could be useful, probably not too hard to include but they have other priorities apparently...
- mark-r 6y agoUnicode is about the characters themselves, not about the glyphs. Its fonts that provide the connection between them.
- scrollaway 6y agoThis is not possible for several reasons, one of which being that as mark-r says, Unicode defines the characters themselves; hence why a font works so well. The second reason is that there are a LOT of barcode algorithms, so you would be duplicating the entire encodable codeblock (which is sometimes larger than ascii) a bunch of times. The third issue is that barcode algorithms are not usually literal 1:1 stand ins. Barcodes usually have the equivalent of a header and footer, and often, a character will influence how the next one looks. At a guess, this font can (and probably does) handle that with font ligatures.
- aidenn0 6y agoFor the reverse, see zbar (https://github.com/mchehab/zbar https://github.com/mchehab/zbar) [edit] Updated link
- SubiculumCode 6y agoThe bar coding itself. I had always figures it wuld be a direct replacement of letters/numbers, like a glyph, but when I input two characters e.g. pp, I do not get an exact doubling of the bar code.
- ajfjrbfbf 6y agoIt does repeat. Disable remote fonts and clear your cache you'll see. There's a special pattern at the start and at the end.