![]()  | 
  
    
    1.1.0
    
   | 
 
A wrapper class for fc_font. More...
#include <font.hpp>
Public Member Functions | |
| font (font &&other) noexcept | |
| Move constructor.  More... | |
| font (font const &other) | |
| Copy constructor.  More... | |
| font (uint8_t const *font_data, fc::font_size const &font_size, fc::color const &font_color) | |
| Constructs a fc::font instance from a font data, a font size and a font color.  More... | |
| ~font () | |
| Destructs a fc::font instance and frees all the memory associated with it.  More... | |
| font & | add (fc_unicode_block const &block) & | 
| Adds a new unicode block to be cooked.  More... | |
| font && | add (fc_unicode_block const &block) && | 
| Adds a new unicode block to be cooked.  More... | |
| font & | add (uint32_t first, uint32_t last) & | 
| Adds a new unicode range to be cooked.  More... | |
| font && | add (uint32_t first, uint32_t last) && | 
| Adds a new unicode range to be cooked.  More... | |
| font & | cook () & | 
| Cooks all the added unicode ranges into a pixmap and clipping information.  More... | |
| font && | cook () && | 
| Cooks all the added unicode ranges into a pixmap and clipping information.  More... | |
| fc_pixels | pixels () const | 
| Obtains a structure containing a pointer to the pixel data and it's dimensions.  More... | |
| fc::render_result | render (std::string const &text) const | 
| Produces clipping and target rectangles to render specified text.  More... | |
| fc::render_result & | render (std::string const &text, fc::render_result &result) const | 
| Produces clipping and target rectangles to render specified text reusing an instance of fc::render_result.  More... | |
A wrapper class for fc_font.
You can construct a fc::font yourself or you can use fc::from (which is preferred if you are going to use method chaining, see fc::from for an examples).
      
  | 
  inlinenoexcept | 
Move constructor.
| other | The other fc::font instance to move from. | 
      
  | 
  inline | 
      
  | 
  inline | 
Constructs a fc::font instance from a font data, a font size and a font color.
| font_data | The font data in memory | 
| font_size | The size of the font, either in fc::px or fc::pt | 
| font_color | The color of the font | 
      
  | 
  inline | 
Destructs a fc::font instance and frees all the memory associated with it.
      
  | 
  inline | 
      
  | 
  inline | 
Adds a new unicode block to be cooked.
This is the rvalue version of this method (objects without a name)
| block | The block to be cooked | 
      
  | 
  inline | 
Adds a new unicode range to be cooked.
This is the lvalue version of this method (objects with a name)
| first | The first unicode point in the range | 
| last | The last unicode point in the range | 
      
  | 
  inline | 
Adds a new unicode range to be cooked.
This is the rvalue version of this method (objects without a name)
| first | The first unicode point in the range | 
| last | The last unicode point in the range | 
      
  | 
  inline | 
      
  | 
  inline | 
Cooks all the added unicode ranges into a pixmap and clipping information.
This is the rvalue version of this method (objects without a name)
      
  | 
  inline | 
      
  | 
  inline | 
Produces clipping and target rectangles to render specified text.
This is equivalent to calling fc_render but a lot easier. It returns an instance of fc::render_result that contains the character mapping vector.
Example
| text | The text to render | 
      
  | 
  inline | 
Produces clipping and target rectangles to render specified text reusing an instance of fc::render_result.
You can use this function if you already have an instance of fc::render_result and want to reuse it without allocating a new one. The vector will be reallocated if needed.
| text | The text to render | 
| result | The fc::render_result instance to reuse | 
result argument. 
 1.8.17