Skip to content
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

请问热敏打印机的纸质宽度是如何计算的? #1

Open
Jibinghao opened this issue Sep 7, 2017 · 4 comments
Open

请问热敏打印机的纸质宽度是如何计算的? #1

Jibinghao opened this issue Sep 7, 2017 · 4 comments

Comments

@Jibinghao
Copy link

public final static int WIDTH_PIXEL = 384;这个384是如何计算的,求解。
@Jibinghao
Copy link
Author

是不是这样的,你先打印出来看一行能显示多少个文字,一个文字是24,我这边一行最多21个,所以其宽度应该是21*24=504

@4dcity
Copy link
Owner

4dcity commented Sep 7, 2017

是的,我用的小票一行最多16个字,所以24*16=384

@Jibinghao
Copy link
Author

那我还想问一下,“------”,这个是怎样计算的,如果我要根据最多字数,来使得“------”铺满一整行,那应该如何换算。

@4dcity
Copy link
Owner

4dcity commented Sep 7, 2017

一个汉字宽度=两个英文字符宽度

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants