rvico TRichView Reference | Item Types | Math Expression

TRVMathItemInfo.FontName

Top  Previous  Next

The font name for displaying the mathematical expression.

property FontName: String;

The default value of this property is '' (empty string). This means the item uses the default font name defined in TRVMathDocObject item of DocObjects collection (or "Cambria Math", if the object does not exist).

Only mathematical fonts can be used. Examples of such fonts:

Cambria Math (included in Windows Vista and newer; the default font for the Microsoft Word equations)

XITS Math

Asana Math

Latin Modern

You can create a string list of mathematical fonts available on the computer using TMathTable.EnumMathFonts (from MathTable unit).

The example below assigns a list of available mathematical fonts to TComboBox items:

var
  SL: TStringList;
begin
  SL := TMathTable.EnumMathFonts;
  ComboBox1.Items.Assign(SL);
  SL.Free;
end;

If you assign a non-mathematical (or non-existent) font to this property, the item uses "Cambria Math" instead (or, if "Cambria Math" is not available, the first found available mathematical font). If no mathematical fonts are available on the computer, the item is displayed in an erroneous state.

Use TRichViewEdit.SetCurrentItemExtraStrPropertyEx to change value of this property as an editing operation (rvespcFontName).

See also:

FontSizeDouble


TRichView © trichview.com