Handbook
Glossary
string-width ( font string -- w )
Factor handbook
»
UI framework
»
Implementing new gadgets
»
Customizing gadget appearance
»
Implementing custom drawing logic
»
Rendering text
Prev:
string>image ( font string -- image loc )
Next:
string-height ( font string -- h )
Vocabulary
ui
.
text
.
private
Inputs
font
a
font
string
a
string
Outputs
w
a positive integer
Generic word contract
Outputs the width of a string.
Notes
This is a low-level word; use
text-width
instead.
Definition
USING:
sequences
;
IN:
ui.text.private
:
string-width
( font string -- w )
string-dim
first
;
inline