Page History
PRIM_PDF - setFont Method
| Panel | ||
|---|---|---|
| ||
Sets text font face, variant for upcoming text elements |
Member of PRIM_PDF (PRIM_PDF)
Parameters
Name | Type | Data Type | Description |
|---|---|---|---|
Font | *Input | Unicode String | Font name or family |
Style | *Input (Optional) | Enumeration | Font style or variant |
Details
Sets the text font and variant (style) for upcoming text elements.
Currently the following fonts are supported:
- Courier
- Helvetica
- Noto Sans
- Noto Sans CJK jp (Normal and Bold only)
- Roboto
- Times
- Verdana
Example
Set the font and style
Define Define_Com Class(#PRIM_PDF) Name(#pdf) Unitm(mm) Pageformat(A4) Pageorientation(Portrait) #pdf
#pdf.start
#pdf #pdf.setFont Font('Verdana') Style(Italic)
#pdf #pdf.text Text('Hello world!') Left(10) Top(10) #pdf
#pdf.save Filename('myReport.pdf')
Style Allowed Values
Enum Value | Description |
|---|---|
Normal | Normal font style |
Bold | Bold font style |
Italic | Italisized font style |
BoldItalic | Bold and italisized font style |
...