TerCreateFont
Create a font id.
int TerCreateFont( ReuseId, shared, typeface, pointsize, style, color, BkColor, FieldId, AuxId)
int TerCreateFont2( ReuseId, shared, typeface, pointsize, style, color, BkColor, FieldId, AuxId, CharStyId, ParaStyId, expand)
int TerCreateFont3( ReuseId, shared, typeface, pointsize, style, color, BkColor, FieldId, AuxId, CharStyId, ParaStyId, expand, CharSet)
int TerCreateFont3( ReuseId, shared, typeface, pointsize, style, HtmlColor, HtmlBkColor, FieldId, AuxId, CharStyId, ParaStyId, expand, CharSet)
int ReuseId; | Existing font id to modify with new information. Use -1 to create a new font id. |
boolean shared; | When true, the editor matches the requested specification against the existing font ids. If a matching font id is found, it returns that id. Otherwise it creates a new id. A true value for this field is mutually exclusive with a zero or positive value for the ReuseId field. |
String typeface; | Typeface of the new font |
int PointSize; | Point size of the new font. You can also specify the font size in twips unit by using a negative value (1 point equal 20 twips). |
int style; | Style bits for the new font. Refer to the function SetTerCharStyle for a list of style ids. Use 0 for the default value. |
Color color; | Text foreground color. use 0 for default. |
| String HtmlColor | Text foreground color in Html string format, example "red", "#FF0000" |
Color BkColor; | Text background color. use 0xFFFFFF for default. |
| String HtmlBkColor | Text background color in Html string format, example, "red" or "#FF0000" |
int FieldId; | Text field id. Use 0 for the default value. |
int AuxId; | An application specified id. The editor does not use this id intejally. Use 0 for default. |
int CharStyId; | Character style id. Set to 1 to use the default. |
int ParaStyId; | Paragraph style id. Set to 0 to use the default. |
int exapnd; | Character width expansion in twips unit. Use 0 for default. |
| int CharSet | Character set for the font |
Description: This function is used to create a new font id or to modify an exiting id with new font information. To modify an existing id, specify the old font id using the 'ReuseId' argument, otherwise set the 'ReuseId' parameter to -1. When an existing id is modified, this function automatically updates the text which uses this id with new information.
Return Value: When successful, this function returns the id of the new font. Otherwise it returns -1.