graphicore / librebarcode

Libre Barcode: barcode fonts for various barcode standards.
https://graphicore.github.io/librebarcode
SIL Open Font License 1.1
425 stars 25 forks source link

`--force` option in code39.js (and maybe others) is broken #20

Closed graphicore closed 5 years ago

graphicore commented 5 years ago

In #19 I suggested to play with the wideToNarrowRatio beyond the limits of 2 and 3 to make a font that works with a specific printer. The validator rightfully rejects these changes. But there's a --force option, that should allow non-validating parameters to pass with a warning. In that case, and maybe in others as well, however, the wide parameter is not set and the code can't create the font even though --force was used.

With --force, the code should emit a warning AND set wide and go on to try to build the font. So, maybe the decision to raise or not should happen in the validator directly (it always raises now), or be postponed.