Font Definitions

org.eclipse.ui.fontDefinitions

Release 2.1

This extension point is used to register fonts with the JFace FontRegistry and with the workbench preference store for use by the Fonts preference page. This extension point has been deprecated in 3.0. You should now add fontDefinition elements to org.eclipse.ui.themes.

<!ELEMENT extension (fontDefinition*)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT fontDefinition (description?)>

<!ATTLIST fontDefinition

id         CDATA #REQUIRED

label      CDATA #REQUIRED

value      CDATA #IMPLIED

categoryId CDATA #IMPLIED

defaultsTo CDATA #IMPLIED>


<!ELEMENT description EMPTY>

a short description of the fonts usage



Following is an example of an a font definition extension:

   

<extension point=

"org.eclipse.ui.fontDefinition"

>

<fontDefinition id=

"org.eclipse.examples.textFont"

label=

"Text"

>

<description>

The text font

</description>

</fontDefinition>

<fontDefinition id=

"org.eclipse.examples.userFont"

label=

"User"

defaultsTo=

"org.eclipse.jface.textFont"

>

<description>

The user font

</description>

</fontDefinition>

</extension>

The defaultsTo tag is used as a directive by the Workbench to set the value of the font definition to the value of defaultsTo whenever the defaultsTo fontDefinition is updated. This only occurs if the fontDefinition is at its default value - once it is set by the user this updates will not occur. The workbench provides 4 fonts:

org.eclipse.jface.bannerfont. The banner font is used in wizard banners.
org.eclipse.jface.dialogfont. The dialog font is the font for widgets in dialogs.
org.eclipse.jface.headerfont. The header font is used for section headers in composite text pages.
org.eclipse.jface.textfont. The text font is used by text editors.

The workbench provides the font definitions for the text, dialog, banner and header fonts.