Otk presently contains two built-in fonts. So it is generally not necessary to depend on looking for, and loading external fonts, on any platform. However, an optional package is available in case you wish to add new fonts. The font-reader package contains the otk_read_external_svg_font.c file.
This file contains the public function: Otk_Read_External_SVG_Font, plus private suport routines. It reads external Scalable Vector Graphics (SVG) font files into Otk_font struct.
OtkFont *Otk_Read_External_SVG_Font( char *filename )
filename - file containing SVG font to be read-in.
Usage: Include this file (by #include) after including otk_lib.c.
From your applications initialization section, call Otk_Read_External_SVG_Font
to read in new font(s).
your_font1 = Otk_Read_External_SVG_Font( "fonts/bitsream.svg" );
To switch the font used for writing text, set the Otk_Default_Font prior to the text operation.
Otk_Default_Font = your_font1;
Back to main page