This class wrapps a FreeType face.
More...
#include <FTFontManager.h>
|
| | Face (Face &&face) |
| | Move constructor.
|
| |
| | Face (FTFontManager &fontManager, const FT_Face &ftFace, const std::string &filename) |
| | Creates a new face object for a given FreeType face and keeps ownership of this face object.
|
| |
| | ~Face () |
| | Destructs a Face object.
|
| |
| SharedFont | font (const unsigned int size, const unsigned int dpi) |
| | Returns the font associated with this Face object for a specified size.
|
| |
| const std::string & | filename () const |
| | Returns the filename of this face object.
|
| |
| Face & | operator= (Face &&face) |
| | Move operator.
|
| |
|
| using | FontMap = std::unordered_map< uint64_t, SharedFont > |
| | Definition of a map mapping size and dpi to font objects.
|
| |
|
| FTFontManager & | fontManager_ |
| | The owner of the face object.
|
| |
| std::string | filename_ |
| | The name of the file from which the FreeType face can be acquired if requested.
|
| |
| FT_Face | ftFace_ = nullptr |
| | The FreeType face (which represents a font) associated with this object, nullptr if the face object needs to be acquired from the file first.
|
| |
| FontMap | fontMap_ |
| | The map of font objects, one object for each individual combination of size and dpi.
|
| |
This class wrapps a FreeType face.
Each face represent a font with individual size.
◆ FontMap
Definition of a map mapping size and dpi to font objects.
◆ Face() [1/3]
| Ocean::CV::Fonts::FTFontManager::Face::Face |
( |
Face && |
face | ) |
|
|
inline |
Move constructor.
- Parameters
-
| face | The face object to be moved |
◆ Face() [2/3]
| Ocean::CV::Fonts::FTFontManager::Face::Face |
( |
FTFontManager & |
fontManager, |
|
|
const FT_Face & |
ftFace, |
|
|
const std::string & |
filename |
|
) |
| |
|
inline |
Creates a new face object for a given FreeType face and keeps ownership of this face object.
- Parameters
-
| fontManager | The owner of this new object |
| ftFace | The FreeType face defining the font, will be release after usage, can be nullptr if a valid 'filename' is provided |
| filename | The filename from which the FreeType face can be accessed when actually needed, can be empty if 'ftFace' is valid |
◆ ~Face()
| Ocean::CV::Fonts::FTFontManager::Face::~Face |
( |
| ) |
|
|
inline |
◆ Face() [3/3]
| Ocean::CV::Fonts::FTFontManager::Face::Face |
( |
const Face & |
face | ) |
|
|
protecteddelete |
Disabled copy constructor.
- Parameters
-
| face | The object which would be copied |
◆ filename()
| const std::string & Ocean::CV::Fonts::FTFontManager::Face::filename |
( |
| ) |
const |
|
inline |
Returns the filename of this face object.
- Returns
- The face object's filename, if known
◆ font()
| SharedFont Ocean::CV::Fonts::FTFontManager::Face::font |
( |
const unsigned int |
size, |
|
|
const unsigned int |
dpi |
|
) |
| |
Returns the font associated with this Face object for a specified size.
If the font does not exist yet, the font will be create and initialized.
- Parameters
-
| size | The size of the font, in dots, with range [1, infinity) |
| dpi | The dots per inch of the font, with range [1, infinity) |
- Returns
- The requested font, nullptr if invalid
◆ operator=() [1/2]
| Face & Ocean::CV::Fonts::FTFontManager::Face::operator= |
( |
const Face & |
face | ) |
|
|
protecteddelete |
Disabled copy operator.
- Parameters
-
| face | The object which would be copied |
- Returns
- The reference to this object
◆ operator=() [2/2]
| Face & Ocean::CV::Fonts::FTFontManager::Face::operator= |
( |
Face && |
face | ) |
|
Move operator.
- Parameters
-
| face | The object to be moved |
- Returns
- The reference to this object
◆ filename_
| std::string Ocean::CV::Fonts::FTFontManager::Face::filename_ |
|
protected |
The name of the file from which the FreeType face can be acquired if requested.
◆ fontManager_
| FTFontManager& Ocean::CV::Fonts::FTFontManager::Face::fontManager_ |
|
protected |
The owner of the face object.
◆ fontMap_
| FontMap Ocean::CV::Fonts::FTFontManager::Face::fontMap_ |
|
protected |
The map of font objects, one object for each individual combination of size and dpi.
◆ ftFace_
| FT_Face Ocean::CV::Fonts::FTFontManager::Face::ftFace_ = nullptr |
|
protected |
The FreeType face (which represents a font) associated with this object, nullptr if the face object needs to be acquired from the file first.
The documentation for this class was generated from the following file: