Handbook
Glossary
font-with-direction ( font direction/f -- font' )
Font shaping options
Next:
font-with-tab-width ( font width/f -- font' )
Vocabulary
fonts
.
shaping
Inputs
font
a font
direction/f
left-to-right, right-to-left, or f
Outputs
font'
a new font
Word description
Sets paragraph reading direction. A false value uses the backend default (left-to-right on DirectWrite and Uniscribe). Bidirectional runs within the paragraph still follow Unicode shaping rules.
Definition
USING:
fonts.shaping.private
kernel
sequences
;
IN:
fonts.shaping
:
font-with-direction
( font direction/f -- font' )
dup
{
f
left-to-right
right-to-left
}
member?
[
invalid-text-direction
]
unless
"direction"
swap
font-with-option
;