Handbook
Glossary
string>image ( font string -- image loc )
Factor handbook
»
UI framework
»
Implementing new gadgets
»
Customizing gadget appearance
»
Implementing custom drawing logic
»
Rendering text
Prev:
draw-text ( font text -- )
Next:
string-width ( font string -- w )
Vocabulary
ui
.
text
Inputs
font
a
font
string
a
string
Outputs
image
an
image
loc
a pair of real numbers
Word description
Renders a line of text into an image.
Definition
USING:
ui.text.private
;
IN:
ui.text
HOOK:
string>image
font-renderer
( font string -- image loc )
Methods
USING:
accessors
core-text
kernel
ui.text
ui.text.core-text
ui.text.core-text.private
;
M:
core-text-renderer
string>image
cached-line
[
line>image
]
[
loc>>
scale-dim
]
bi
;