-
Notifications
You must be signed in to change notification settings - Fork 10
Description
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 doesn't 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
I have created this library and manually put each symbol and its size, but i don't think it is a proper solution
https://pastebin.com/hz93gUbT