Top
Best
New

Posted by luu 15 hours ago

Libre Barcode Project(graphicore.github.io)
254 points | 42 comments
dfox 8 hours ago|
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).
alex_suzuki 7 hours ago||
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.

pwdisswordfishs 5 hours ago||
Aside from obfuscating the source code to sell licenses, how does this benefit from WASM?

Barcodes have been generated for decades on low-resource embedded devices. Even what would have been a modest-to-low-end machine 25 years ago would have no problem handling the compute needed for this job.

On this end, it just looks like the user has to deal with the penalty of dealing with 1 MB of resources when hitting the main page.

alex_suzuki 4 hours ago||
The benefit of WASM in this case is that you can wrap a mature library written in C/C++ (in this case, Zint), and run it in a runtime that supports WASM, e.g. the browser. There's plenty of people who occasionally need to create barcodes, and not in some industrial, automated way, and a browser is just an easy way to accomplish that. Yes, you have 1MB loaded when you load the page, but hopefully that will be served from a cache.
nolroz 1 hour ago||
One MEGAbyte?? How could you!?
mark-r 5 hours ago||
I once worked at a company that used a Code39 font cartridge in HP Laserjets. When HP stopped putting font cartridge slots in their printers, I had the task of intercepting print jobs and detecting the font selection sequence, then taking the text and converting it to a Code128 bitmap graphic. It wasn't hard at all, kind of fun actually.
1bpp 13 hours ago||
Is anyone willing to sacrifice their sanity for the sake of implementing a QR renderer as TTF hinting code?
iguessthislldo 11 hours ago||
I love seeing nonsense like that. How that work graphically though? Just keep adding to a same QR code that keeps getting denser as more text is added? I guess it doesn't have to practical though :)
gus_massa 4 hours ago||
Someone implemented the Bad Apple animation inside a font https://blog.erk.dev/posts/anifont/ ( https://news.ycombinator.com/item?id=373170550 | 177 points | Aug 2023 | 62 comments )
Induane 13 hours ago||
[flagged]
1bpp 13 hours ago|||
[flagged]
sdfsdfsd3443f 9 hours ago|||
You all know this is the answer. In fact you will do this and then post it on Show HN proudly.
dspillett 7 hours ago||
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.
ahlCVA 8 hours ago||
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.
alex_suzuki 7 hours ago|
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.
ahlCVA 7 hours ago||
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.
alex_suzuki 7 hours ago||
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...

infogulch 3 hours ago||
Neat! Barcodes are much more complex that I knew before looking into it. I used JsBarcode [1] to create a special barcode that reprograms a cheap barcode scanner we got on Amazon to be able to scan both UPS and FedEx tracking numbers. It is published on CodePen [2].

[1]: https://github.com/lindell/JsBarcode

[2]: https://codepen.io/infogulch/pen/yyLJdrP

joewhale 4 hours ago||
fyi code 39 barcodes are outdated because of the lack of check sums and leads to false positives.
ciupicri 4 hours ago||
It's not clear to me how can I put FNC3 and the beginning of the Code 128 bar code.
muhammadusman 2 hours ago||
just curious: are barcodes better in anyway compared to a QR code?
wps 35 minutes ago|
I believe they are much faster to scan, as you don’t need to identify the corners.
utopiah 11 hours ago||
Damn, yes please.

Another cool font, but less original, I stumbled upon recently is Marelle https://marelle.forge.apps.education.fr/ for cursive.

mos_basik 3 hours ago||
Love it. Flashbacks to CE1 and CE2 (2nd and 3rd grade in the US system) in a French embassy school, simultaneously handling "immersion in real french", "using a fountain pen for the first time", "different long division" (https://en.wikipedia.org/wiki/Long_division#Eurasia) and "different cursive" (I think the method I was coming from was D'Nealian? https://en.wikipedia.org/wiki/D%27Nealian)
albert_e 10 hours ago|||
> https://marelle.forge.apps.education.fr/

This website is in French so I was unable tounderstand the text

and the website is very resistant to automatic translation by Google Translate

>https://marelle-forge-apps-education-fr.translate.goog/?_x_t...

What gives?

utopiah 9 hours ago|||
No problem translating it with Firefox :

" Marelle is a free cursive police force for teaching writing in elementary school. Introduction

This project is supported by the Digital Directorate for Education of the Ministry of National Education, and developed in the Forge of Digital Educational Commons.

The Marelle police is designed specifically for teaching cursive writing in elementary school, it was developed by a team of teachers and designers specialized in writing systems.

Teaching Cursive Writing

Structure and sequence of letters, rhythm and proportion, contextual variants: the Marelle font was thought around specific criteria to offer a quality model to teachers and students. Particular attention has been paid to the trace of numbers, capital letters and punctuation. A complete professional tool

The Marelle police offers 3 types of variants:

    uppercase sticks or cursive
    with or without lineage Seyes
    height of ascendants and descendants
These variants can be combined to best meet the needs of teachers and students." etc
jurgemaister 9 hours ago||
> cursive police force
bombcar 6 hours ago|||
I know I've often cursive'd the police.
ligne 6 hours ago|||
Homographs are tricky :-)
piltboy 9 hours ago||||
"Marelle is a free cursive font designed for teaching handwriting in [French] elementary school."

I'm not sure they owe it to anyone to make the website available in English :-)

tokai 6 hours ago|||
ooh thanks, the Bâton in capital letter is very nice.
tecleandor 8 hours ago|||
Nice! That looks pretty similar to the one in "Cuadernos Rubio", a system that was super popular from the 60s to the 90s in Spain (that still exists) for learning handwriting in primary school.
endre 11 hours ago||
this is genius
ChrisMarshallNY 23 minutes ago||
Very nice.

Now, do it with QR codes...

alex_suzuki 8 hours ago|
This would be more interesting if you wouldn’t need to calculate checksums yourself, and could just write the barcode value. Good luck doing that with something like Reed-Solomon (QR, Data Matrix, etc.) or the shenanigans they’re doing with GS1 DataBar.
More comments...