![]() |
nomlib
|
Public Types | |
| typedef BitmapFont | self_type |
| typedef self_type * | RawPtr |
| typedef std::shared_ptr< self_type > | SharedPtr |
| Public Types inherited from nom::IFont | |
| enum | FontType { NotDefined = 0 , BitmapFont , TrueTypeFont , BMFont } |
| typedef IFont | self_type |
| typedef self_type * | raw_ptr |
| typedef std::shared_ptr< self_type > | shared_ptr |
| typedef std::unique_ptr< self_type > | unique_ptr |
Public Member Functions | |
| BitmapFont (void) | |
| Default constructor. | |
| ~BitmapFont (void) | |
| Destructor. | |
| BitmapFont (const BitmapFont ©) | |
| Copy constructor. | |
| IFont::raw_ptr | clone (void) const override |
| Construct a clone of the existing instance. | |
| bool | valid (void) const override |
| Validity check. | |
| enum IFont::FontType | type (void) const override |
| const Image * | image (uint32 character_size) const override |
| sint | spacing (uint32 character_size) const override |
| Obtain text character spacing width in pixels. | |
| int | newline (uint32 character_size) const override |
| Obtain font's line spacing. | |
| int | kerning (uint32 first_char, uint32 second_char, uint32 character_size) const override |
| Obtain the kerning pair offsets between two glyphs. | |
| int | hinting (void) const override |
| Get the font's hinting style. | |
| uint32 | font_style (void) const override |
| Get the rendering style of the font. | |
| const Glyph & | glyph (uint32 codepoint, uint32 character_size) const override |
| Obtain a glyph. | |
| bool | set_point_size (sint size) override |
| Set a new font point size. | |
| bool | set_hinting (int type) override |
| Set the requested font hinting style. | |
| bool | set_outline (int) override |
| void | set_font_style (uint32 style) override |
| Set the rendering style of the font. | |
| void | set_font_kerning (bool state) override |
| Set the use of kerning for the font. | |
| bool | load (const std::string &filename) override |
| Loads a new bitmap font from a file. | |
| const FontMetrics & | metrics (void) const override |
| Obtain information about the loaded font. | |
| Public Member Functions inherited from nom::IFont | |
| virtual bool | set_point_size (int)=0 |
Private Member Functions | |
| bool | build (uint32 character_size) |
| const GlyphPage & | pages (void) const |
| sint | sheet_width (void) const |
| sint | sheet_height (void) const |
Private Attributes | |
| enum IFont::FontType | type_ |
| The type of font we are. | |
| sint | sheet_width_ |
| Width – in pixels – of overall texture atlas sheet. | |
| sint | sheet_height_ |
| Height – in pixels – of overall texture atlas sheet. | |
| GlyphPage | pages_ |
| FontMetrics | metrics_ |
| General font metric data, such as the proper value for newline spacing. | |
| Color4i | color_mask_ |
| The pixel color found at the texture atlas position 0, 0 is used as a color mask – to filter out non-glyph data. | |
Definition at line 55 of file BitmapFont.hpp.
| typedef self_type* nom::BitmapFont::RawPtr |
Definition at line 59 of file BitmapFont.hpp.
| typedef BitmapFont nom::BitmapFont::self_type |
Definition at line 58 of file BitmapFont.hpp.
| typedef std::shared_ptr<self_type> nom::BitmapFont::SharedPtr |
Definition at line 60 of file BitmapFont.hpp.
|
private |
Trigger a build of the font characteristics gleaned from the image file; recalculate the character sizes, coordinate origins, spacing, etc.
| character_size | Reserved for future implementation. |
|
overridevirtual |
Construct a clone of the existing instance.
Implements nom::IFont.
|
overridevirtual |
|
overridevirtual |
Obtain a glyph.
| codepoint | ASCII character to lookup |
| character_size | Reserved for future implementation |
Implements nom::IFont.
|
overridevirtual |
Get the font's hinting style.
Implements nom::IFont.
|
overridevirtual |
Implements nom::IFont.
|
overridevirtual |
Obtain the kerning pair offsets between two glyphs.
Implements nom::IFont.
|
overridevirtual |
Loads a new bitmap font from a file.
Implements nom::IFont.
|
overridevirtual |
|
overridevirtual |
Obtain font's line spacing.
| character_size | Point size in pixels |
Implements nom::IFont.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Implements nom::IFont.
|
override |
|
overridevirtual |
Obtain text character spacing width in pixels.
Implements nom::IFont.
|
overridevirtual |
Implements nom::IFont.
|
overridevirtual |
Validity check.
Implements nom::IFont.
|
private |
The pixel color found at the texture atlas position 0, 0 is used as a color mask – to filter out non-glyph data.
Definition at line 186 of file BitmapFont.hpp.
|
private |
General font metric data, such as the proper value for newline spacing.
Definition at line 180 of file BitmapFont.hpp.
|
mutableprivate |
Table mapping a character size to its page – a texture atlas combined with corresponding glyphs data.
Definition at line 177 of file BitmapFont.hpp.
|
private |
Height – in pixels – of overall texture atlas sheet.
Definition at line 173 of file BitmapFont.hpp.
|
private |
Width – in pixels – of overall texture atlas sheet.
Definition at line 170 of file BitmapFont.hpp.
|
private |
The type of font we are.
Definition at line 167 of file BitmapFont.hpp.