Handbook
Glossary
font-with-tab-width ( font width/f -- font' )
Font shaping options
Prev:
font-with-direction ( font direction/f -- font' )
Next:
font-with-features ( font assoc -- font' )
Vocabulary
fonts
.
shaping
Inputs
font
a font
width/f
a positive distance in logical pixels, or f
Outputs
font'
a new font
Word description
Sets a uniform tab-stop interval. A false value restores the backend default. DirectWrite and Uniscribe support this option. Uniscribe rounds the scaled interval to whole device pixels, with a minimum of one pixel.
Definition
USING:
fonts.shaping.private
kernel
math
;
IN:
fonts.shaping
:
font-with-tab-width
( font width/f -- font' )
dup
[
dup
real?
[
dup
[
0
>
]
[
1/0.
<
]
bi
and
]
[
f
]
if
[
invalid-tab-width
]
unless
]
when
"tab-width"
swap
font-with-option
;