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

Any way to check width of text #280

Open
Krobys opened this issue Mar 11, 2023 · 0 comments
Open

Any way to check width of text #280

Krobys opened this issue Mar 11, 2023 · 0 comments

Comments

@Krobys
Copy link

Krobys commented Mar 11, 2023

I need to somehow calculate the width of the text that is drawn on the glasses through openperipheral_bridge.
i tried UNICODE API OpenOS unicode.char(value: number, ...): string but it returns the text for the terminal and it is not suitable for glasses, because on glasses, for example, 'L' and 'I' have a width of 1, although in fact they are different 1 and 2. I also studied the documentation and the objects on the glasses have a method getWidth but Text object dont have this function.

Сan you tell me how to still find out what width the text that is drawn on the screen or which will be drawn, maybe I'm missing something

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

1 participant