STLL
0.0
Simple Text Layouting Library
|
this class encapsulates open fonts of a single library, it makes sure that each font is open only once More...
Public Member Functions | |
FontCache_c (std::shared_ptr< FreeTypeLibrary_c > l) | |
Create a cache using a specific library. More... | |
FontCache_c (void) | |
Create a cache using an instance of the FreeType library that is created specifically for this cache instance. More... | |
Font_c | getFont (const FontResource_c &res, uint32_t size) |
Get a font face from this cache with the given resource and size. More... | |
std::shared_ptr< FontFace_c > | getFont (const internal::FontFileResource_c &res, uint32_t size) |
void | clear (void) |
remove all fonts from the cache, fonts that are still in use will be kept, but all others are removed More... | |
this class encapsulates open fonts of a single library, it makes sure that each font is open only once
|
inline |
Create a cache using a specific library.
I am not really sure where is might be useful to use multiple caches on one library... though
|
inline |
Create a cache using an instance of the FreeType library that is created specifically for this cache instance.
This is usually the thing you need, create one instance of this class per thread of your application that needs to access the library
|
inline |
remove all fonts from the cache, fonts that are still in use will be kept, but all others are removed
Font_c STLL::FontCache_c::getFont | ( | const FontResource_c & | res, |
uint32_t | size | ||
) |
Get a font face from this cache with the given resource and size.
If there is already one instance of this font open, it will be used otherwise a new one will be opened.
res | The resource to use to create the font instance |
idx | the index, which font do we want to get from the ressource |
size | The requested size |
std::shared_ptr<FontFace_c> STLL::FontCache_c::getFont | ( | const internal::FontFileResource_c & | res, |
uint32_t | size | ||
) |