Plutonium framework API  0.3
Simple UI framework for libnx and SDL2
pu::ttf::Font Class Reference

#include <ttf_Font.hpp>

Public Member Functions

NX_CONSTEXPR bool IsValidFontFaceIndex (i32 index)
 
 Font (u32 font_sz)
 
 ~Font ()
 
i32 LoadFromMemory (void *ptr, size_t size, FontFaceDisposingFunction disp_fn)
 
i32 LoadFromFile (String path)
 
void Unload (i32 font_idx)
 
u32 GetFontSize ()
 
sdl2::Font FindValidFontFor (char16_t ch)
 
std::pair< u32, u32 > GetTextDimensions (String str)
 
SDL_Texture * RenderText (String str, ui::Color color)
 

Static Public Attributes

static constexpr i32 InvalidFontFaceIndex = -1
 
static constexpr u32 DefaultFontSize = 25
 

Constructor & Destructor Documentation

pu::ttf::Font::Font ( u32  font_sz)
pu::ttf::Font::~Font ( )

Member Function Documentation

sdl2::Font pu::ttf::Font::FindValidFontFor ( char16_t  ch)
u32 pu::ttf::Font::GetFontSize ( )
inline
std::pair<u32, u32> pu::ttf::Font::GetTextDimensions ( String  str)
NX_CONSTEXPR bool pu::ttf::Font::IsValidFontFaceIndex ( i32  index)
inline
i32 pu::ttf::Font::LoadFromFile ( String  path)
i32 pu::ttf::Font::LoadFromMemory ( void *  ptr,
size_t  size,
FontFaceDisposingFunction  disp_fn 
)
SDL_Texture* pu::ttf::Font::RenderText ( String  str,
ui::Color  color 
)
void pu::ttf::Font::Unload ( i32  font_idx)

Member Data Documentation

constexpr u32 pu::ttf::Font::DefaultFontSize = 25
static
constexpr i32 pu::ttf::Font::InvalidFontFaceIndex = -1
static

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