le2d v0.4.7
2D game engine framework
 
Loading...
Searching...
No Matches
le::IFontAtlas Class Referenceabstract

Opaque interface for a Font Atlas. More...

#include <le2d/resource/font.hpp>

Inheritance diagram for le::IFontAtlas:
le::IResource le::IAsset

Public Types

using Glyph = kvf::ttf::Glyph
 
using GlyphLayout = kvf::ttf::GlyphLayout
 

Public Member Functions

virtual auto build (gsl::not_null< kvf::ttf::Typeface * > face, TextHeight height) -> bool=0
 
virtual auto get_glyphs () const -> std::span< Glyph const >=0
 
virtual auto get_texture () const -> ITexture const &=0
 
virtual auto get_height () const -> TextHeight=0
 
virtual auto push_layouts (std::vector< GlyphLayout > &out, std::string_view text, float n_line_height=1.5f, bool use_tofu=true) const -> glm::vec2=0
 
- Public Member Functions inherited from le::IResource
virtual auto is_ready () const -> bool=0
 Check if resource is ready to use.
 

Detailed Description

Opaque interface for a Font Atlas.

Member Typedef Documentation

◆ Glyph

using le::IFontAtlas::Glyph = kvf::ttf::Glyph

◆ GlyphLayout

using le::IFontAtlas::GlyphLayout = kvf::ttf::GlyphLayout

Member Function Documentation

◆ build()

virtual auto le::IFontAtlas::build ( gsl::not_null< kvf::ttf::Typeface * >  face,
TextHeight  height 
) -> bool
pure virtual

◆ get_glyphs()

virtual auto le::IFontAtlas::get_glyphs ( ) const -> std::span< Glyph const >
pure virtual

◆ get_height()

virtual auto le::IFontAtlas::get_height ( ) const -> TextHeight
pure virtual

◆ get_texture()

virtual auto le::IFontAtlas::get_texture ( ) const -> ITexture const &
pure virtual

◆ push_layouts()

virtual auto le::IFontAtlas::push_layouts ( std::vector< GlyphLayout > &  out,
std::string_view  text,
float  n_line_height = 1.5f,
bool  use_tofu = true 
) const -> glm::vec2
pure virtual

The documentation for this class was generated from the following file: