29#ifndef NOMLIB_GRAPHICS_FONTS_FONT_HPP
30#define NOMLIB_GRAPHICS_FONTS_FONT_HPP
32#include "nomlib/config.hpp"
33#include "nomlib/graphics/fonts/IFont.hpp"
43 typedef Font self_type;
44 typedef IFont font_type;
55 Font(
const std::shared_ptr<font_type>& font);
101 IFont::FontType
type(
const std::string& filename)
const;
114 bool load(
const std::string& filename);
117 std::shared_ptr<Font::font_type> font_;
bool operator==(const self_type &rhs) const
Equality comparison overload.
bool unique() const
Get the object's unique state.
Font(const std::shared_ptr< font_type > &font)
Constructor for initializing an object from a std::shared_ptr object<nom::IFont> object.
bool load(const std::string &filename)
Load a font from a filename.
IFont::FontType type(const std::string &filename) const
Determine the type of font by filename extension.
font_type * operator->() const
Read-write pointer operator overload.
Font()
Default constructor; initialize the font to NULL and the sharable state to false.
bool operator!=(const self_type &rhs) const
In-equality comparison overload.
Font(font_type *font)
Constructor for initializing an object from a nom::IFont derived raw pointer.
Pure abstract interface for a font resource.