FontFamily class.  
 More...
#include <font_family.h>
|  | 
|  | FontFamily () | 
|  | Constructs a null font family. 
 | 
|  | 
|  | FontFamily (const std::string &family_name, const TextureGroup &new_texture_group=TextureGroup(Size(256, 256))) | 
|  | Constructs a font family with the given family name. 
 | 
|  | 
| void | add (Canvas &canvas, Sprite &sprite, const std::string &glyph_list, float spacelen, bool monospace, const FontMetrics &metrics) | 
|  | Add a Font based on a sprite. 
 | 
|  | 
| void | add (const FontDescription &desc, const std::string &ttf_filename) | 
|  | 
| void | add (const FontDescription &desc, const std::string &ttf_filename, FileSystem fs) | 
|  | 
| void | add (const std::string &typeface_name, const FontDescription &desc) | 
|  | 
| void | add (const std::string &typeface_name, float height) | 
|  | Add standard font. 
 | 
|  | 
| const std::string & | get_family_name () const | 
|  | Font family name used for this font family. 
 | 
|  | 
| bool | is_null () const | 
|  | Returns true if this object is invalid. 
 | 
|  | 
|  | operator bool () const | 
|  | 
| void | throw_if_null () const | 
|  | Throw an exception if this object is invalid. 
 | 
|  | 
FontFamily class. 
A FontFamily is a collection of font descriptions 
◆ FontFamily() [1/2]
      
        
          | clan::FontFamily::FontFamily | ( |  | ) |  | 
      
 
Constructs a null font family. 
 
 
◆ FontFamily() [2/2]
Constructs a font family with the given family name. 
 
 
◆ add() [1/5]
      
        
          | void clan::FontFamily::add | ( | Canvas & | canvas, | 
        
          |  |  | Sprite & | sprite, | 
        
          |  |  | const std::string & | glyph_list, | 
        
          |  |  | float | spacelen, | 
        
          |  |  | bool | monospace, | 
        
          |  |  | const FontMetrics & | metrics ) | 
      
 
Add a Font based on a sprite. 
- Parameters
- 
  
    | sprite | = Sprite with glyphs |  | glyph_list | = Letter to glyph mapping |  | spacelen | = Width of space character |  | monospace | = Force monospaced font (using widest sprite character) |  | metrics | = Font metrics for the sprite font |  
 
 
 
◆ add() [2/5]
      
        
          | void clan::FontFamily::add | ( | const FontDescription & | desc, | 
        
          |  |  | const std::string & | ttf_filename ) | 
      
 
 
◆ add() [3/5]
◆ add() [4/5]
      
        
          | void clan::FontFamily::add | ( | const std::string & | typeface_name, | 
        
          |  |  | const FontDescription & | desc ) | 
      
 
 
◆ add() [5/5]
      
        
          | void clan::FontFamily::add | ( | const std::string & | typeface_name, | 
        
          |  |  | float | height ) | 
      
 
 
◆ get_family_name()
      
        
          | const std::string & clan::FontFamily::get_family_name | ( |  | ) | const | 
      
 
Font family name used for this font family. 
 
 
◆ is_null()
  
  | 
        
          | bool clan::FontFamily::is_null | ( |  | ) | const |  | inline | 
 
Returns true if this object is invalid. 
 
 
◆ operator bool()
  
  | 
        
          | clan::FontFamily::operator bool | ( |  | ) | const |  | inlineexplicit | 
 
 
◆ throw_if_null()
      
        
          | void clan::FontFamily::throw_if_null | ( |  | ) | const | 
      
 
Throw an exception if this object is invalid. 
 
 
◆ Font_Impl
The documentation for this class was generated from the following file: