-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible to print more font sizes between 1x and 2x #6
Comments
Hello! Yes, the character sizes in receiptline are a bit strange compared to modern technology. So I will tell you how to modify If you want to print this SVG, convert it to PNG and then convert it to a printer command. Line 592: // w = printer.command.measureText(text[j], printer.encoding) * (wh < 2 ? wh + 1 : wh - 1);
w = printer.command.measureText(text[j], printer.encoding) * [ 1, 1.25, 1.5, 1.75, 2, 2.5, 3, 3.5 ][wh]; Line 608: // height = Math.max(height, wh < 3 ? wh : wh - 1);
height = Math.max(height, [ 1, 1.25, 1.5, 1.75, 2, 2.5, 3, 3.5 ][wh]); Line 1016-1017: // const w = wh < 2 ? wh + 1 : wh - 1;
// const h = wh < 3 ? wh : wh - 1;
const w = [ 1, 1.25, 1.5, 1.75, 2, 2.5, 3, 3.5 ][wh];
const h = w; |
Hi, I was wondering if it is possible to print more text sizes between 1x and 2x with the correct aspect ratio.
The font size steps are extremely big.
2x font size (^^^) is about as big as I will ever print. Therefore it would be really nice to be able to print 1.5x
Could I achieve this by setting the default text size to 0.5x?
Then I would have the following result:
(none) = 0.5x
^^^ = 1x
^^^^ = 1.5x
^^^^^ = 2x
^^^^^^ = 2.5x
^^^^^^^ = 3x
Where in the code can I change this? I tried setting "textScale" to 0.5x but with no luck
Optimally I would want the following font sizes:
1x
1.25x
1.5x
1.75x
2x
2.5x
3x
Do you have support for this, or any tips?
Thanks
The text was updated successfully, but these errors were encountered: