lindell / lindell/JsBarcode

Documentation: Missing information on font integration

Open
#429 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
5.9k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

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.`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No documentation file or test is named in the issue. Start by locating the font section and the backend/Node.js font handling it describes; document the available default fonts, backend font integration, and the cause or workaround for the Helvetica warning. Done means the backend font behavior and supported font configuration are unambiguous.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.