Your plug-in may need to define specialized fonts in its editors or views. The org.eclipse.ui.fontDefinitions extension point allows you to define fonts that should be made available in the workbench fonts preference page.
Using this extension allows you to consolidate the font settings for your plug-in with all of the other font preferences installed in the workbench. For example, the debugger contributes a font setting for console text:
This font definition is contributed by the debugger using the org.eclipse.ui.fontDefinitions extension point.
<extension point="org.eclipse.ui.fontDefinitions"> <fontDefinition label="%ConsoleFontDefinition.label" defaultsTo="org.eclipse.jface.textfont" id="org.eclipse.debug.ui.ConsoleFont"> <description> %ConsoleFontDefinition.description </description> </fontDefinition> ... </extension>
The label and description attributes are shown in the preferences dialog to describe the font. The defaultsTo attribute designates the id of another font definition that should be used as the default value for this font definition if none other is specified.