Command Reference

Register Font

Registers a file on the the local system.

Setup Factory will attempt to automatically register the file as a TrueType font during installation. This means that the font will be registered with the operating system and will be made available to the user. In order for this to work, the file must be a valid Windows .TTF file.

Action ID: 54
Action Category: File Operations

Settings

Font

File name:

The path and filename of the file that you want to register.

Font name:

The for the TrueType font as it will appear in the Registry. You can press the Auto-Name button beside this field to automatically scan the file and try to determine its embedded name. Note: If the Auto-Name returns "Unknown", the file is most likely not a valid Windows .TTF file.

Auto-Name:

This will automatically scan the font specified in the File name field and try to determine its embedded name.

Return Values

Value
(%LastErrorNum%)

Simple Message
(%LastErrorMsg%)

Verbose Message
(%LastErrorDetails%)

0

OK

 

1

Failed to register font.

File not found.
<<File name>>

2

Failed to register font.

Invalid font name specified.
<<Font Description>>

3

Failed to register font.

Failed to add font to system font table.
<<File name>>

4

Failed to register font.

Failed to add font to registry.
<<File name>>

Example

In this example, we will register a font named "MyProgramFont.ttf" on the user's system.

Note: %FontDir% is a built-in variable.

Source: %FontDir%\MyProgramFont.ttf
Font name: My Font

 

See Also: Alphabetical List of Actions, Categorical List of Actions, On Error tab