# Elementname: `LoadFontfile`

## Description

Load a font file (.otf, .ttf, .pfb) and associate it with an internal name.

Allowed attributes: filename, marginprotrusion, name, oldstylefigures, smallcaps, space

Child elements: (none)

Parent elements: Case, ForAll, Include, Layout, Loop, Otherwise, Until, While

### Attributes

filename (text)

  The name (with extension) of the font file.

marginprotrusion (0 up to 100, optional)

  The amount of protrusion glyphs like -, . and - stick into the right margin. Highly font dependent. Defaults to 0.

name (text)

  The internal name of the font file. To be used within DefineFontfamily.

oldstylefigures (optional)

  Use oldstyle figures if the font includes them. (OpenType feature »onum«)

  yes: | Use oldstyle figures.
  no: | Use lining figures.

smallcaps (optional)

  Use small caps glyphs when the font supplies them.

  yes: | Use small caps for this font.
  no: | Don't switch to small caps (default).

space (0 up to 100, optional)

  The natural width between words. Can be stretched by 30% and shrunk by 10%. Defaults to 25. The value is a percentile of the font size.

## Example

## Info

The fonts are optionally taken from the local search path. On Windows the path `%WINDIR%\Fonts` (usually `C:\Windows\Fonts`) and on Mac OS X the paths `/Library/Fonts` and `/System/Library/Fonts` can be used as fallbacks for fonts. This can be configured with the setting `fontpath`.

## See also

DefineFontfamily, How to use fonts

# Commands

- A
- Action
- AddSearchpath
- AtPageCreation
- AtPageShipout
- AttachFile
- Attribute
- B
- Barcode
- Bold
- BoldItalic
- Bookmark
- Box
- Br
- Case
- Circle
- Color
- Column
- Columns
- Compatibility
- Contents
- Copy-of
- DefineColor
- DefineFontalias
- DefineFontfamily
- DefineTextformat
- Element
- Fontface
- ForAll
- Frame
- Grid
- Group
- Groupcontents
- HSpace
- Hyphenation
- I
- Image
- Include
- Initial
- InsertPages
- Italic
- Layout
- Li
- LoadDataset
- LoadFontfile
- Loop
- Makeindex
- Margin
- Mark
- Message
- NewPage
- NextFrame
- NextRow
- NoBreak
- Ol
- Options
- Otherwise
- Output
- Overlay
- PDFOptions
- Pageformat
- Pagetype
- Paragraph
- PlaceObject
- Position
- PositioningArea
- PositioningFrame
- ProcessNode
- Record
- Regular
- Rule
- SaveDataset
- SavePages
- SetGrid
- SetVariable
- SortSequence
- Span
- Stylesheet
- Sub
- Sup
- Switch
- Table
- Tablefoot
- Tablehead
- Tablerule
- Td
- Text
- Textblock
- Tr
- Trace
- Transformation
- U
- URL
- Ul
- Until
- VSpace
- Value
- While

Version: 3.2.0 | Start page | Command reference | Other language: German