#include <tscope.h>
int main()
{
ts_scrsize(SIZE1);
ts_init();
ts_printf_centre(0, 120,
"default, Tscope uses an simple terminal font");
ts_font(ARIAL, 8, BOLD);
ts_printf_centre(0, 80, "ts_font changes the font");
ts_printf_centre(0, 60, "it takes three arguments: ");
ts_printf_centre(0, 40, "font, size and style");
int oldfont;
oldfont = ts_font(COURIER, 12, IT);
ts_printf_centre(0, 0, "when changing the font");
ts_printf_centre(0, -20, "the old value can be restored");
ts_printf_centre(0, -40, "by using the value returned by ts_font");
ts_setfont(oldfont);
ts_printf_centre(0, -80, "in a call to a function called ts_setfont");
ts_setfont(0);
ts_printf_centre(0, -120, "ts_setfont(0) returns to the default font");
ts_button(XMAX - 20, -YMAX + 20);
ts_clrscr();
ts_loadfont("timesbi12.dat");
ts_printf_centre(0, 80, "ts_loadfont can be used to load a font");
ts_printf_centre(0, 60, "from a custom font file");
oldfont = ts_font(COURIER, 12, BOLD);
ts_printf_centre(0, 20, "how to make a custom font file");
ts_printf_centre(0, 00, "is explained in the FAQ");
ts_setfont(oldfont);
ts_printf_centre(0, -40, "the return value of ts_loadfont");
ts_printf_centre(0, -60, "can also be used in a call to ts_setfont");
ts_printf_centre(0, -80, "to return to the previous font again");
ts_button(XMAX - 20, -YMAX + 20);
return 0;
}
END_OF_MAIN();