Skip to content

Any way to check width of text #280

@Krobys

Description

@Krobys

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions