Page 1 of 1
Bug? Drawing invalid characters with Barcode font
Posted: 2009-08-04T11:19:30-07:00
by Shazzner
Hi there, I'm using a barcode font and it draws standard characters fine however it gives me an invalid characters at the ends for this string: "šB-00015zœ"
I'm using this command: convert -font=Code128bWin.ttf -encoding=Unicode -draw=text 100,100 'šB-00015zœ' input.bmp output.bmp
Produces box-characters at the ends but barcode in the middle. I've tried other truetype fonts with the same results.
Any help on this? I'm using ImageMagickObject on Windows.
Re: Bug? Drawing invalid characters with Barcode font
Posted: 2009-08-04T19:55:41-07:00
by anthony
This would be a issue with the font not with IM, which is only using the font.
Barcodes I believe are simply numbers with a special start/end sequence.
That is all. so using š (s with two dots about it) is probably invalid and thus
the fonts 'invalid character' (a box) is displayed.
Re: Bug? Drawing invalid characters with Barcode font
Posted: 2009-08-05T09:10:51-07:00
by Shazzner
anthony wrote:This would be a issue with the font not with IM, which is only using the font.
Barcodes I believe are simply numbers with a special start/end sequence.
That is all. so using š (s with two dots about it) is probably invalid and thus
the fonts 'invalid character' (a box) is displayed.
Hmmm I'm not so sure about that.
Barcodes have a start and end character, along with a checksum and the numbers. Sometimes the checksum becomes an invalid character when calculated.
Also as a test I c/p the text into Gimp with the barcode font and it showed up fine.
Edit: as another test I switched the font to a standard unicode font and I'm still getting the invalid characters. I suspect some kind of conversion is going on.
Re: Bug? Drawing invalid characters with Barcode font
Posted: 2009-08-05T15:56:21-07:00
by fmw42
what version of IM and what version of GS are you using? Are they the latest?
Re: Bug? Drawing invalid characters with Barcode font
Posted: 2009-08-06T08:56:41-07:00
by Shazzner
I'm using IM 6.5.4-Q16 and GS 8.64.
Should be the latest.
Re: Bug? Drawing invalid characters with Barcode font
Posted: 2009-08-06T09:07:50-07:00
by Shazzner
Is there anyway to pass it in as hex?
Re: Bug? Drawing invalid characters with Barcode font
Posted: 2009-08-06T09:19:27-07:00
by Bonzo
I have just tried a couple of online barcode generator and I get:
http://www.barcoding.com/upc/
Error creating barcode.
A common problem is that the specified value can't be encoded with the selected format.
This one worked Ok;
http://www.idautomation.com/java/linearservlet.html
http://www.tec-it.com/online-demos/tbar ... px?LANG=en
Bar code generator error
Input contains unsuported characters
Some info:
http://www.idautomation.com/code128faq.html
So Imagemagick is not the ony software that has problems.
Re: Bug? Drawing invalid characters with Barcode font
Posted: 2009-08-06T12:59:43-07:00
by Shazzner
Hrm. I think I might just manually edit the font file...
E: Thanks for your help Bonzo and everyone.