![]() |
Lysa
0.0
Lysa 3D Engine
|
A font resource to render text A font is a combination of a font file name and a size.
Inheritance diagram for Font:Classes | |
| struct | GlyphBounds |
| struct | GlyphInfo |
Public Member Functions | |
| Font (const std::string &path) | |
| Font (const Font &font) | |
| ~Font () override | |
| void | getSize (const std::string &text, float fontScale, float &width, float &height) |
| auto | getFontSize () const |
| auto | getLineHeight () const |
| auto | getAscender () const |
| auto | getDescender () const |
| const GlyphInfo & | getGlyphInfo (uint32 index) const |
| auto | getAtlas () const |
| const auto & | getFontParams () const |
| void | setOutlineColor (const float4 &color) |
| void | setOutlineBias (const float bias) |
| void | setOutlineWidthAbsolute (const float width) |
| void | setOutlineWidthRelative (const float width) |
| void | setOutlineBlur (const float blur) |
| void | setOutlineThreshold (const float threshold) |
| auto | getHarfBuzzFont () const |
Public Member Functions inherited from Resource | |
| Resource (const std::string &name) | |
| auto | getId () const |
| const auto & | getName () const |
| bool | operator== (const Resource &other) const |
| bool | operator< (const Resource &other) const |
| bool | operator> (const Resource &other) const |
| virtual std::shared_ptr< Resource > | duplicate () const |
Public Member Functions inherited from Object | |
| void | connect (const Signal::signal &name, const Signal::Handler &handler) |
| void | connect (const Signal::signal &name, const std::function< void ()> &handler) |
| void | emit (const Signal::signal &name, void *params=nullptr) |
| virtual std::string | toString () const |
| Object () = default | |
| virtual | ~Object () = default |
| Font | ( | const std::string & | path | ) |
Creates a font resource
| path | : font file path, relative to the application working directory |
| Font | ( | const Font & | font | ) |
|
override |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns the font size in the atlas
|
inline |
|
inline |
| void getSize | ( | const std::string & | text, |
| float | fontScale, | ||
| float & | width, | ||
| float & | height | ||
| ) |
Returns the size (in pixels) for a string.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |