neoGFX
Cross-platform C++ app/game engine
neogfx::font Class Reference

#include <font.hpp>

Inheritance diagram for neogfx::font:
neogfx::font_info

Classes

struct  no_fallback_font
 

Public Member Functions

 font ()
 
 font (std::string const &aFamilyName, font_style aStyle, point_size aSize)
 
 font (std::string const &aFamilyName, std::string const &aStyleName, point_size aSize)
 
 font (const font_info &aFontInfo)
 
 font (const font &aOther)
 
 font (const font &aOther, font_style aStyle, point_size aSize)
 
 font (const font &aOther, std::string const &aStyleName, point_size aSize)
 
 ~font ()
 
fontoperator= (const font &aOther)
 
font_id id () const
 
bool has_fallback () const
 
font fallback () const
 
std::string const & family_name () const override
 
font_style style () const override
 
std::string const & style_name () const override
 
point_size size () const override
 
dimension height () const
 
dimension descender () const
 
dimension line_spacing () const
 
dimension kerning (uint32_t aLeftGlyphIndex, uint32_t aRightGlyphIndex) const
 
bool is_bitmap_font () const
 
uint32_t num_fixed_sizes () const
 
point_size fixed_size (uint32_t aFixedSizeIndex) const
 
const i_glyph_textureglyph_texture (const glyph &aGlyph) const
 
bool operator== (const font &aRhs) const
 
bool operator!= (const font &aRhs) const
 
bool operator< (const font &aRhs) const
 
i_native_font_face & native_font_face () const
 
virtual bool kerning () const
 
- Public Member Functions inherited from neogfx::font_info
 font_info ()
 
 font_info (std::string const &aFamilyName, font_style aStyle, point_size aSize)
 
 font_info (std::string const &aFamilyName, std::string const &aStyleName, point_size aSize)
 
 font_info (std::string const &aFamilyName, font_style aStyle, std::string const &aStyleName, point_size aSize)
 
 font_info (const font_info &aOther)
 
virtual ~font_info ()
 
font_infooperator= (const font_info &aOther)
 
virtual bool style_available () const
 
virtual bool style_name_available () const
 
virtual bool underline () const
 
virtual void set_underline (bool aUnderline)
 
virtual font_weight weight () const
 
virtual bool kerning () const
 
virtual void enable_kerning ()
 
virtual void disable_kerning ()
 
font_info with_style (font_style aStyle) const
 
font_info with_underline (bool aUnderline) const
 
font_info with_size (point_size aSize) const
 
bool operator== (const font_info &aRhs) const
 
bool operator!= (const font_info &aRhs) const
 
bool operator< (const font_info &aRhs) const
 

Static Public Member Functions

static font load_from_file (std::string const &aFileName)
 
static font load_from_file (std::string const &aFileName, font_style aStyle, point_size aSize)
 
static font load_from_file (std::string const &aFileName, std::string const &aStyleName, point_size aSize)
 
static font load_from_memory (const void *aData, std::size_t aSizeInBytes)
 
static font load_from_memory (const void *aData, std::size_t aSizeInBytes, font_style aStyle, point_size aSize)
 
static font load_from_memory (const void *aData, std::size_t aSizeInBytes, std::string const &aStyleName, point_size aSize)
 
- Static Public Member Functions inherited from neogfx::font_info
static font_weight weight_from_style (font_style aStyle)
 
static font_weight weight_from_style_name (std::string aStyleName)
 

Friends

class font_manager
 
class graphics_context
 

Additional Inherited Members

- Public Types inherited from neogfx::font_info
typedef font_info abstract_type
 
typedef double point_size
 

Detailed Description

Definition at line 159 of file font.hpp.

Constructor & Destructor Documentation

◆ font() [1/7]

neogfx::font::font ( )

◆ font() [2/7]

neogfx::font::font ( std::string const &  aFamilyName,
font_style  aStyle,
point_size  aSize 
)

◆ font() [3/7]

neogfx::font::font ( std::string const &  aFamilyName,
std::string const &  aStyleName,
point_size  aSize 
)

◆ font() [4/7]

neogfx::font::font ( const font_info aFontInfo)

◆ font() [5/7]

neogfx::font::font ( const font aOther)

◆ font() [6/7]

neogfx::font::font ( const font aOther,
font_style  aStyle,
point_size  aSize 
)

◆ font() [7/7]

neogfx::font::font ( const font aOther,
std::string const &  aStyleName,
point_size  aSize 
)

◆ ~font()

neogfx::font::~font ( )

Member Function Documentation

◆ descender()

dimension neogfx::font::descender ( ) const

◆ fallback()

font neogfx::font::fallback ( ) const

◆ family_name()

std::string const& neogfx::font::family_name ( ) const
overridevirtual

Reimplemented from neogfx::font_info.

◆ fixed_size()

point_size neogfx::font::fixed_size ( uint32_t  aFixedSizeIndex) const

◆ glyph_texture()

const i_glyph_texture& neogfx::font::glyph_texture ( const glyph aGlyph) const

◆ has_fallback()

bool neogfx::font::has_fallback ( ) const

◆ height()

dimension neogfx::font::height ( ) const

◆ id()

font_id neogfx::font::id ( ) const

◆ is_bitmap_font()

bool neogfx::font::is_bitmap_font ( ) const

◆ kerning() [1/2]

virtual bool neogfx::font_info::kerning

◆ kerning() [2/2]

dimension neogfx::font::kerning ( uint32_t  aLeftGlyphIndex,
uint32_t  aRightGlyphIndex 
) const

◆ line_spacing()

dimension neogfx::font::line_spacing ( ) const

◆ load_from_file() [1/3]

static font neogfx::font::load_from_file ( std::string const &  aFileName)
static

◆ load_from_file() [2/3]

static font neogfx::font::load_from_file ( std::string const &  aFileName,
font_style  aStyle,
point_size  aSize 
)
static

◆ load_from_file() [3/3]

static font neogfx::font::load_from_file ( std::string const &  aFileName,
std::string const &  aStyleName,
point_size  aSize 
)
static

◆ load_from_memory() [1/3]

static font neogfx::font::load_from_memory ( const void *  aData,
std::size_t  aSizeInBytes 
)
static

◆ load_from_memory() [2/3]

static font neogfx::font::load_from_memory ( const void *  aData,
std::size_t  aSizeInBytes,
font_style  aStyle,
point_size  aSize 
)
static

◆ load_from_memory() [3/3]

static font neogfx::font::load_from_memory ( const void *  aData,
std::size_t  aSizeInBytes,
std::string const &  aStyleName,
point_size  aSize 
)
static

◆ native_font_face()

i_native_font_face& neogfx::font::native_font_face ( ) const

◆ num_fixed_sizes()

uint32_t neogfx::font::num_fixed_sizes ( ) const

◆ operator!=()

bool neogfx::font::operator!= ( const font aRhs) const

◆ operator<()

bool neogfx::font::operator< ( const font aRhs) const

◆ operator=()

font& neogfx::font::operator= ( const font aOther)

◆ operator==()

bool neogfx::font::operator== ( const font aRhs) const

◆ size()

point_size neogfx::font::size ( ) const
overridevirtual

Reimplemented from neogfx::font_info.

◆ style()

font_style neogfx::font::style ( ) const
overridevirtual

Reimplemented from neogfx::font_info.

◆ style_name()

std::string const& neogfx::font::style_name ( ) const
overridevirtual

Reimplemented from neogfx::font_info.

Friends And Related Function Documentation

◆ font_manager

friend class font_manager
friend

Definition at line 161 of file font.hpp.

◆ graphics_context

friend class graphics_context
friend

Definition at line 162 of file font.hpp.


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