TE Edit Control Java / HTML-JavaScript Help
Product page

TerGetFontParam

Retrieve the font parameters.

int TerGetFontParam( FontId, type)
boolean TerGetFontParam( FontId, type, out color)
int FontId;

FontId (0 to TotalFonts-1). Set to 0 to specify the default font.

You can also use this function to get the font information for a stylesheet item by specifying the style id as a negative value for this parameter. Also, use the following constant to specify normal or the current style item.

SID_NORMAL'Normal' style item.
SID_CURStyle item being currently edited.
int type;One of the following parameter types can be used:
FONTINFO_CHARSETThe character set for the font
FONTINFO_PICT_WIDTHThe picture width in twips assuming that the FontId represents a picture.
FONTINFO_PICT_HEIGHTThe picture height in twips assuming that the FontId represents a picture.
FONTINFO_ULINE_COLORThe color of the underline bar.
FONTINFO_AUX_IDThe auxiliary id for the font.
FONTINFO_FLAGS

Font flags. The following font flags are available:

FFLAG_AUTO_SPELL: Font with wave underline.

FONTINFO_FRAME_TYPE

The frame type for a floating picture assuming that the FontId represents a picture..

Please refer to the TerSetPictFrame2 function for a list of PFRAME_ constants.

FONTINFO_FRAME_IDThe frame id for a floating picture assuming that the FontId represents a picture.
FONTINFO_OFFSETReturn the character offset (twips) from the baseline.
FONTINFO_IS_PICTReturns 1 if the FontId represents a picture, otherwise returns 0.
FONTINFO_IS_CTLReturns 1 if the FontId represents a control, otherwise returns 0.
FONTINFO_FIELDField id used for the font.
FONTINFO_INS_REV_IDReviewer id for inserted text.
FONTINFO_DEL_REV_IDReviewer id for deleted text.
FONTINFO_SIZEReturn the font styles. Please refer to the GetFontInfo function for the definition of style constants.
FONTINFO_STYLEReturn the font style constants. Please refer to the GetFontInfo function for the font style constant values.
FONTINFO_TEXT_COLORReturn the text color
FONTINFO_BK_COLORReturn the text background color
FONTINFO_WLINE_COLORReturn the color of the wave line under the text.
Color color;The 'out' parameter to retrieve the color parameter. This parameter is valid only for the parameter types which return a color value.

Return Value: This first method returns the value of the requested parameter. It returns -1 to indicate an error condition.

The second override method returns True if successful, otherwise it returns a False value.