Holger-Will / code-128-encoder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problems that code number can not be generated properly

kanryu opened this issue · comments

Hi,

I found your Code 128 font and encoder.
I generated a barcode with Code C for a code composed only of numerical values, but it did not work properly.
The cause is ascii [0] when multiple ascii are allocated in Code 128 Generator.codes
It is necessary to encode with ascii [1] with error.

In your library, you can change the getASCIIFromCode () method with options.mapping, but this does not work properly. If only one ascii is allocated, undefined is returned. You understand?

getASCIIFromCodeC () is fixedly called in optimize (), and ascii [0] is permanently specified in it. This does not call ascii [1], is it?

Therefore, the font you defined is useful, but the library of this project could not be used.

thsnak for reporting. i totally understand, and i'm aware of the problem. i might get around looking into it this weekend.

I just submitted pull request #9 that should fix this.