Skip to content

Documentation: Missing information on font integration #429

@vresetnikov

Description

@vresetnikov

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions