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

Font styles #41

Open
jairrc opened this issue Apr 3, 2019 · 3 comments
Open

Font styles #41

jairrc opened this issue Apr 3, 2019 · 3 comments

Comments

@jairrc
Copy link

jairrc commented Apr 3, 2019

How to print text in Bold, Italic, Expanded, Compressed... how to set and stop this styles?

Regards,

@d-lindau
Copy link

I would love to see this as well.

Being able to use React-native is awsome. And being able to adjust fonts would be great.

@mitchelson
Copy link

First install yarn add base64-js
After
` import base64 from 'base64-js';

    var boldActive = [0x1b, 0x45, 0x1];
    var boldCancel = [0x1b, 0x45, 0x0];
    var boldActiveStr = base64.fromByteArray(boldActive);
    var boldCancelStr = base64.fromByteArray(boldCancel);

    await SunmiInnerPrinter.setFontSize(30);
    await SunmiInnerPrinter.sendRAWData(boldActiveStr);
    await SunmiInnerPrinter.printOriginalText(' Text ');
    await SunmiInnerPrinter.sendRAWData(boldCancelStr);

`

@d-lindau
Copy link

Thank you!
This is great. You made my day!
You don't happen to know a way to change fonts as well @mitchelson ?

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

3 participants