Handbook
Glossary
text-size ( font -- )
Vocabulary
pdf
.
text
Inputs
font
an
object
Outputs
None
Definition
USING:
accessors
combinators
formatting
kernel
math
sequences
;
IN:
pdf.text
:
text-size
( font -- )
[
[
name>>
{
{
"Helvetica"
[
1
]
}
{
"Times"
[
2
]
}
{
"Courier"
[
3
]
}
[
" is unsupported"
append
throw
]
}
case
]
[
{
{
[
dup
~quotation~ ~quotation~
bi
and
]
[
9
]
}
{
[
dup
bold?>>
]
[
3
]
}
{
[
dup
italic?>>
]
[
6
]
}
[
0
]
}
cond
nip
+
]
bi
]
[
size>>
]
bi
"/F%d %d Tf\n"
printf
;