x>offset ( x font string -- n )
Factor handbook » UI framework » Implementing new gadgets » Customizing gadget appearance » Implementing custom drawing logic » Rendering text

Prev:line-metrics ( font string -- metrics )
Next:offset>x ( n font string -- x )


Vocabulary
ui.text

Inputs
xa real
fonta font
stringa string


Outputs
nan integer


Generic word contract
Outputs the string index closest to the given x coordinate.

Definition


Methods