STLL
0.0
Simple Text Layouting Library
|
This class represents a font resource. More...
Public Member Functions | |
template<typename... Args> | |
FontResource_c (Args...par) | |
void | addFont (const std::string &pathname) |
void | addFont (std::pair< std::shared_ptr< uint8_t >, size_t > data, const std::string &descr) |
size_t | size (void) const |
auto | begin (void) const |
auto | end (void) const |
FontResource_c (void) | |
internal::FontFileResource_c | getRessource (size_t idx) const |
bool | operator< (const FontResource_c &b) const |
This class represents a font resource.
A font is a collection of several font files that together constitute of the font. If several files contain the same glyphs then the first one added to this resource class will be used
A good example for the usage of this is the google noto font. Which consists of many files but the hebrew fonts don't contain numbers for example, so you have to take the glyphs for numbers from the regular fonts with the roman letters
|
inline |
create a new font resource with one font
|
inline |
Create an empty resource
This constructor is required by the STL containers, don't use it
|
inline |
add another font to the resource: a file given its path.
pathname | File name of the file to use as font |
|
inline |
add another font to the resource: from memory.
data | is a pair containing a shared pointer to the data and the size of the data |
descr | description string, will be used to describe the font when an exception is thrown (e.g. problems loading the font) |
|
inline |
iterators for for loops
|
inline |
|
inline |
get the fontfile ressource class for the fontfile at a given index
|
inline |
operator for stl container usage
|
inline |
the number of font files in this font