librebarcode icon indicating copy to clipboard operation
librebarcode copied to clipboard

Code 39, undocumented space character, Â = " "

Open sbeach92 opened this issue 1 year ago • 3 comments

It seems that with font for code 39, space generates just white space. To have barcode that encodes space character you have to type Â.

So to get proper "HELLO WORLD" you must type "HELLOÂWORLD".

sbeach92 avatar May 04 '23 12:05 sbeach92

@sbeach92 Thanks for reporting. Space works in general, looking at https://graphicore.github.io/librebarcode/documentation/code39

But, depending on the software you are using (something Microsoft Office I expect), it may not use OpenType-Features contextual alternates, which is used to insert the glyph for space.

What software are you using?

I agree that the docs should be updated, one thing would be to add a guide for Office users. Also, for Code 36, a hint about the special encoding would be helpful.

Here's the info for Office users in an issue comment: https://github.com/graphicore/librebarcode/issues/28#issuecomment-745736391

graphicore avatar May 04 '23 12:05 graphicore

It behaves this way in every program I tried in windows 10. (Main problem was in Office and Solidworks)

Even fonts.google.com test field seems that you should have something around space to get space character in barcode. "a " would show just a, but "a a" shows three barcode characters. Is this the behavior of OpenType-Features contextual alternates?

sbeach92 avatar May 04 '23 13:05 sbeach92

Yes, so for this Code 39 font to scan appropriately, you should enclose your code always with two * asterisks symbols (the start and end marking barcode symbol), e.g.: *a * or *a a* in both cases the contextual alternates feature should be triggered, when your software behaves as the OpenType-Spec suggests (or you turned calt on yourself). This works as well in font.google.com, however, their examples are not tailored to show scannable barcodes.

graphicore avatar May 04 '23 13:05 graphicore