PDA

View Full Version : Load CL_Font from file



Aikidos
02-10-2013, 03:59 PM
Hello, all!

How i can load font from file (not name)?
Example: fonts/fontfont.ttf

Thnx

sphair
02-10-2013, 05:36 PM
http://clanlib.org/wiki/MainDocs:Fonts

rombust
02-11-2013, 08:20 AM
btw, it is much easier and intuitive in ClanLib 3.0

clan::FontDescription contains


/// \brief Sets the typeface name
void set_typeface_name(const std::string &name);

/// \brief Sets the filename of the font (when required)
void set_filename(const std::string &filename);

But until then, CL_Font_Freetype is your friend. (Or the CL_Font_System::register_font() bizarre hack)