text-size ( font -- )


Vocabulary
pdf.text

Inputs
fontan object


Outputs
None

Definition


: 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 ;