5.2.6 Font settings

MGL command: font 'fnt' [val=6]

Font style for text and labels (see text). Initial style is ’fnt’=’:rC’ give Roman font with centering. Parameter val sets the size of font for tick and axis labels. Default font size of axis labels is 1.4 times large than for tick labels. For more detail, see Font styles.

MGL command: rotatetext val
Method on mglGraph: void SetRotatedText (bool val)
C function: void mgl_set_rotated_text (HMGL gr, int val)

Sets to use or not text rotation.

MGL command: scaletext val
Method on mglGraph: void SetScaleText (bool val)
C function: void mgl_set_scale_text (HMGL gr, int val)

Sets to scale text in relative inplot (including columnplot, gridplot, stickplot, shearplot) or not.

MGL command: texparse val
Method on mglGraph: void SetTeXparse (bool val)
C function: void mgl_set_tex_parse (HMGL gr, int val)

Enables/disables TeX-like command parsing at text output.

MGL command: loadfont ['name'='']
Method on mglGraph: void LoadFont (const char *name, const char *path="")
C function: void mgl_load_font (HMGL gr, const char *name, const char *path)

Load font typeface from path/name. Empty name will load default font.

Method on mglGraph: void SetFontDef (const char *fnt)
C function: void mgl_set_font_def (HMGL gr, const char * val)

Sets the font specification (see Text printing). Default is ‘rC’ – Roman font centering.

Method on mglGraph: void SetFontSize (mreal val)
C function: void mgl_set_font_size (HMGL gr, mreal val)

Sets the size of font for tick and axis labels. Default font size of axis labels is 1.4 times large than for tick labels.

Method on mglGraph: void SetFontSizePT (mreal cm, int dpi=72)

Set FontSize by size in pt and picture DPI (default is 16 pt for dpi=72).

Method on mglGraph: inline void SetFontSizeCM (mreal cm, int dpi=72)

Set FontSize by size in centimeters and picture DPI (default is 0.56 cm = 16 pt).

Method on mglGraph: inline void SetFontSizeIN (mreal cm, int dpi=72)

Set FontSize by size in inch and picture DPI (default is 0.22 in = 16 pt).

Method on mglGraph: void CopyFont (mglGraph &from)
C function: void mgl_copy_font (HMGL gr, HMGL gr_from)

Copy font data from another mglGraph object.

Method on mglGraph: void RestoreFont ()
C function: void mgl_restore_font (HMGL gr)

Restore font data to default typeface.

Method on mglGraph: void SetDefFont (const char *name, const char *path="") static
C function: void mgl_def_font (const char *name, const char *path)

Load default font typeface (for all newly created HMGL/mglGraph objects) from path/name.