getNotesFont (RichTextItem - Java)

Returns an identifier for a font face in a document.

Note: This method is new with Release 6.5.

Defined in

RichTextItem

Syntax

public int getNotesFont(String facename, boolean addonfail)
    throws NotesException

Parameters

String facename

The name of the font face, which must be valid for the platform on which the agent is running.

boolean addonfail
  • true to assign an identifier for the font face if one is not already assigned in the current document
  • false (default) to return 0 if an identifier is not assigned for the font face in the current document

Return value

int

The identifier associated with the specified font face, or 0.

Usage

The identifier can be used to set Font in RichTextStyle.

Identifiers assigned by getNotesFont are in the range 5 through 254.

In an open document in edit mode (the NotesDocument via NotesUIDocument.Document), changes made to rich text will not appear on screen immediately as they would with fields of other types. There is no method to cause this update to occur. You must close and reopen the document to see changes.

Example