JsBarcode icon indicating copy to clipboard operation
JsBarcode copied to clipboard

Documentation: Missing information on font integration

Open vresetnikov opened this issue 1 year ago • 1 comments

Trying to use JsBarcode on the backend and the documentation's font section is proving to be inadequate. There is very little written about fonts, especially on how to use them in the backend and what little there is is ambiguous:

Define the font used for the text in the generated barcode. This can be any default font or a font defined by a [@font-face](https://developer.mozilla.org/en/docs/Web/CSS/@font-face) rule.

Considering that the environment is backend, I am assuming the @font-face part can be immediately discarded in this case. So with only 1 sentence remaining mentioning the fonts, the following questions emerge:

  1. What default fonts? Apart from a couple non-standard font strings shown and the monospace font indicated as the default, they are not listed nor is it shown how to integrate them. The default one, monospace, will fail to load on Linux systems by the way.
  2. Using what little information there is, I am trying to integrate Helvetica font and I am getting the following warning:

Pango-WARNING **: 12:38:24.590: couldn't load font "Helvetica Bold Not-Rotated 40px", falling back to "Sans Bold Not-Rotated 40px", expect ugly output.

vresetnikov avatar Mar 24 '23 11:03 vresetnikov