Name

xlfont — load a font in the graphic context or query loaded font

Calling Sequence

xlfont(font-name)
xlfont(font-filename)
xlfont('reset')
xlfont(font-name,font-id)
xlfont(font-filename,font-id)
xlfont(font-name,font-id,bold)
xlfont(font-name,font-id,bold,italic)
fonts=xlfont('AVAILABLE_FONTS')
fonts=xlfont()

Parameters

font-name

string, name of the font family.

font-filename

string, filename of a true type font.

font-id

integer >= 0 .

fonts

a column vector of font names.

Description

Without any argument, xlfont() returns the list of currently loaded fonts.

xlfont('AVAILABLE_FONTS') returns list of fonts available on your system.

xlfont('reset') reset to initial index list of fonts.

With arguments, xlfont is used to load a new font at different sizes in the graphics context.

Default fonts are "Monospaced" (0), "Symbol" (1), "Serif" (2), "Serif Italic" (3), "Serif Bold" (4), "Serif Bold Italic" (5), "SansSerif" (6), "SansSerif Italic" (7), "SansSerif Bold" (8), "SansSerif Bold Italic" (9). These default fonts are automaticaly loaded when needed and so xlfont is not really required for them. In fact xlfont is essentially useful to load a new font.

Examples

xlfont('reset');
xlfont()

// Caution : this example may not work if your system have not Monospaced font.
xlfont("Monospaced",10,%t,%t);
xset("font", 10, 4) // use Monospaced Bold Italic
plot2d()

xlfont()

xlfont(SCI+'/thirdparty/fonts/scilabsymbols.ttf')
xset("font", 12, 4) // use scilabsymbols.ttf font
plot2d()

xlfont()

xlfont('reset');

 
  

See Also

xset, getfont

Authors

Allan CORNET.