# 'FONT' Define/List Fonts

> Source: https://manual.pvxplus.com/mnemonics/font

**GUI Display/Printer**

## Formats

|  |  |  |
| --- | --- | --- |
| 1\. | *Define Font (with Specification):* | 'FONT'(*name$*,*size*\[,*attrib$*\[,*angle*\]\]**)** |
| 2\. | *Define Font (via Special Names):* | **'FONT'(**{"\***SYSFONT**" \| "\***GUIFONT**" \| "**\*CURFONT**"}**)** |
| 3\. | *List Channel's Fonts:* | **'FONT'(LIST\***\[,*chan*\]**)** |
| 4\. | *List Fonts, Properties:* | **'FONT'(LIST PROPERTIES FOR** \[*name$*\]\[,*chan*\]**)** |
| 5\. | *List Sizes for a Font:* | **'FONT'(LIST** *name$***)** |

***Where:***

|  |  |
| --- | --- |
| *angle* | Slant for printing, in degrees. Optional. |
| *attrib$* | Font attributes. Optional string expression. Valid codes include:<br>\|  \|  \|<br>\| --- \| --- \|<br>\| **&** \| Underscore the character following the "&" (as in hot keys) \|<br>\| **B** \| Bold \|<br>\| **C** \| Center text \|<br>\| **F** \| Show focus lines around text \|<br>\| **I** \| Italics \|<br>\| **N** \| Numeric data alignment \|<br>\| **R** \| Right justify text \|<br>\| **S** \| Fills only text background (not whole region) with chosen colour \|<br>\| **U** \| Underscore ("\_") \|<br>\| **W** \| Word wrap \|<br>\| **#** \| Same as N \|<br>Note:  <br>Use the ['TEXT'](https://manual.pvxplus.com/mnemonics/text) mnemonic to specify *vertical* alignment settings (Top, Middle, Bottom).<br>You can also control the character set:<br>\|  \|  \|<br>\| --- \| --- \|<br>\| **!** \| Use symbol character set (char. set 2) \|<br>\| **O** \| Use OEM character set (char. set 255) \|<br>\| **J** \| Use Japanese character set (char. set 128) \|<br>\| **D** \| Use character set 1 or current default for the given font \|<br>\| %*nnn* \| Use specific Windows character set *nnn* (***Default*** is ANSI, character set 0) \| |
| *chan* | Logical file number or channel. |
| \***CURFONT** | Keyword representing the current graphic font being used. (added in PxPlus v10.10) |
| \***GUIFONT** | Keyword representing the dialogue font used by standard MS Windows applications for dialogues. |
| \***SYSFONT** | Keyword representing the default graphical system font, typically "System,0.66,B". |
| *name$* | Font name. String expression. Font must exist in the system. |
| *size* | Numeric. Use positive values for font sizes relative to the current default for the device (**.5** for half size, **2** for double, etc.). Use negative sizes for absolute font size in points.  <br>  <br>As a rough guide to equivalent sizes:<br>```<br>Point size -12 = 6 LPI, 10 CPI<br>Point size -10 = 7.2 LPI, 12 CPI<br>Point size - 7  = 10 LPI, 16 CPI<br>``` |

## Description

**'FONT'** defines the current font and specifications. It can also be used to return comma-delimited font and property (attribute) lists for the channel (default is the terminal) or a size list for a specific (existing) font.

Two special font names may be used in place of the specifications:

|  |  |  |
| --- | --- | --- |
|  | **\*SYSFONT** | Default graphical system font |
|  | **\*GUIFONT** | Standard MS Windows dialogue font |

These fonts will change based on the operating system version and theme. The new special font names may be used anywhere a font specification is given.

A new **\*CURFONT** font may be specified, which indicates that the system should retain the current font selected. *(as of PxPlus v10.10)*

Note:  
'FONT' works with \*WINPRT\*, the Windows console, and \*PDF\* but *not* with direct-to-device printers.

## See Also

**[\*PDF\* PDF Print Interface](https://manual.pvxplus.com/file-handling/pdf)**  
[\*WINPRT\* Windows Printing](https://manual.pvxplus.com/file-handling/winprt)

## Example

```
f$="MS Serif";
print 'font'(list F$) ! Returns sizes for MS Serif font: 13,16,19,21,27,35,10,11,
print 'font'("MS Serif",-11)
```
