ez.no / exponential / documentation / reference / template operators / pdf / set_font
{pdf(set_font, hash( [ name, font_name, ]
[ size, font_size, ]
[ colorCMYK, cmyk_color, ]
[ colorRGB, rgb_color, ]
[ justification, text_justification, ] ) )}
| Name | Type | Description | Required |
|---|---|---|---|
| name | string | Font name | no |
| size | integer | Default font size | no |
| colorCMYK | array | Array defining CMYK color values, 0 to 1 | no |
| colorRGB | array | Array defining RGB color values, 0 to 255 | no |
| justification | string | Text alignment, left, rigth, center or full | no |
Change the font name and default font size. Only content added after this function is called will be changed.
Change fot to Times-Roman, font size 14.
{pdf(set_font, hash( name, "Times-Roman", size, 14 ) ) }
Change font to Helvetica, use full page witdh, blue text.
{pdf(set_font, hash( name, "Helvetica", justification, full, colorRGB, array( 255, 0, 0 ) ) )}
Comments