Vocabulary
fonts

Class description
The class of fonts.

Definition

TUPLE: font name size bold? italic? foreground background ;


Methods

M: font pdf-value
[
"<<" , "/Type /Font" , "/Subtype /Type1" , {
[
name>> {
{ "sans-serif" ~quotation~ }
{ "serif" ~quotation~ }
{ "monospace" ~quotation~ }
[ " is unsupported" append throw ]
} case
]
[
[ bold?>> ] [ italic?>> ] bi or
[ "-" append ] when
]
[ bold?>> [ "Bold" append ] when ]
[ italic?>> [ "Italic" append ] when ]
[
name>> { "sans-serif" "monospace" } member?
[ "Italic" "Oblique" replace ] when
]
} cleave "/BaseFont " prepend , ">>" ,
] { } make "\n" join ;