PRIM_PDF - setFont Method
Sets text font face, variant for upcoming text elements
Member of PRIM_PDF (PRIM_PDF)
| Name | Type | Data Type | Description |
|---|---|---|---|
| Font | *Input | Unicode String | Font name or family |
| Style | *Input (Optional) | Enumeration | Font style or variant |
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
Set the font and style
Define_Com Class(#PRIM_PDF) Name(#pdf) Unitm(mm) Pageformat(A4) Pageorientation(Portrait)
#pdf.start
#pdf.setFont Font('Verdana') Style(Italic)
#pdf.text Text('Hello world!') Left(10) Top(10)
#pdf.save Filename('myReport.pdf')
| Enum Value | Description |
|---|---|
| Normal | Normal font style |
| Bold | Bold font style |
| Italic | Italisized font style |
| BoldItalic | Bold and italisized font style |
LANSA Version 15, April 2020