lindell / lindell/JsBarcode

The text has been deformed, like a mosaic

Open
#282 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.9k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

When I draw the barcode, the text becomes a mosaic.
![image](https://user-images.githubusercontent.com/17265888/53618834-0a428200-3c28-11e9-9eef-f7fcf1eb0b4a.png)

code show as below
``` javascript
var canvas = document.createElement("canvas");
JsBarcode(canvas, md5Key, {
format: "CODE128",
height:100,
fontSize:10,
margin:1,
fontOptions:'italic',
font:'Microsoft YaHei',

displayValue:true,
text:tipName + ':' + tip,
textAlign:'left',
textPosition:'buttom',
});
var base64 = canvas.toDataURL("image/png");
```

I found this library when I googled
[polyfill](https://github.com/jondavidjohn/hidpi-canvas-polyfill)
I hope the author can join this or similar processing mechanism,
When I print out using a thermal printer, the text cannot be read.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the provided CODE128 canvas example in a browser, including the font and text settings, then compare its output with the linked hidpi-canvas-polyfill. Check whether the generated PNG remains readable when printed on a thermal printer; done means the barcode text is no longer rendered as a mosaic.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.