11.61 Sample ‘fonts

Example of font typefaces.

MGL code:

define d 0.25
loadfont 'STIX2':text 0 1.1 'default font (STIX2)'
loadfont 'adventor':text 0 1.1-d 'adventor font'
loadfont 'bonum':text 0 1.1-2*d 'bonum font'
loadfont 'chorus':text 0 1.1-3*d 'chorus font'
loadfont 'cursor':text 0 1.1-4*d 'cursor font'
loadfont 'heros':text 0 1.1-5*d 'heros font'
loadfont 'heroscn':text 0 1.1-6*d 'heroscn font'
loadfont 'pagella':text 0 1.1-7*d 'pagella font'
loadfont 'schola':text 0 1.1-8*d 'schola font'
loadfont 'termes':text 0 1.1-9*d 'termes font'
loadfont ''

C++ code:

void smgl_fonts(mglGraph *gr)	// font typefaces
{
	double h=1.1, d=0.25;
	gr->LoadFont("STIX2");		gr->Puts(mglPoint(0,h), "default font (STIX2)");
	gr->LoadFont("adventor");	gr->Puts(mglPoint(0,h-d), "adventor font");
	gr->LoadFont("bonum");		gr->Puts(mglPoint(0,h-2*d), "bonum font");
	gr->LoadFont("chorus");		gr->Puts(mglPoint(0,h-3*d), "chorus font");
	gr->LoadFont("cursor");		gr->Puts(mglPoint(0,h-4*d), "cursor font");
	gr->LoadFont("heros");		gr->Puts(mglPoint(0,h-5*d), "heros font");
	gr->LoadFont("heroscn");	gr->Puts(mglPoint(0,h-6*d), "heroscn font");
	gr->LoadFont("pagella");	gr->Puts(mglPoint(0,h-7*d), "pagella font");
	gr->LoadFont("schola");		gr->Puts(mglPoint(0,h-8*d), "schola font");
	gr->LoadFont("termes");		gr->Puts(mglPoint(0,h-9*d), "termes font");
	gr->LoadFont("");
}

Sample fonts