Elaztek Developer Hub
Blamite Game Engine - blam!  00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
fonts.h File Reference
#include <d2d1.h>
#include <map>
#include <Windows.h>
#include <string>
#include <OGRE/OgreTextureGpu.h>
#include <OGRE/Overlay/OgreFont.h>
#include <Strings/components/classes/map/map.h>
#include <Strings/components/classes/vector/vector.h>
#include <Strings/components/diagnostics/errors/errors.h>
#include <Strings/components/resources/color/BlamColor.h>
+ Include dependency graph for fonts.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  BlamFontGlyph
 
class  BlamFontPackage
 
struct  Blam::Content::Fonts::FontGlyph
 Structure to contain data for a Font Glyph. More...
 
struct  Blam::Content::Fonts::Font
 Structure to contain data for a Font. More...
 

Namespaces

 Blam
 Namespace surrounding all major engine components.
 
 Blam::Content
 
 Blam::Content::Fonts
 
 Blam::Content::Fonts::New
 

Macros

#define BLAM
 
#define FONT_TABLE_FILE   "font_table.txt"
 
#define FONTINFO_FILENAME   "fontinfo.xml"
 
#define FONT_PACKAGE_EXTENSION   ".bin"
 
#define FONT_PACKAGE_VERSION   2
 

Enumerations

enum  BlamFontPackageType {
  BlamFontPackageType::Unknown, BlamFontPackageType::Bitmap, BlamFontPackageType::BitmapAtlas, BlamFontPackageType::TrueType,
  BlamFontPackageType::XMLBitmap, BlamFontPackageType::XMLBitmapAtlas, BlamFontPackageType::XMLTruetype
}
 
enum  FontGlyphFormat { PNG }
 Enumerator for the image format used in a given font glyph. More...
 

Functions

BLAM void Blam::Content::Fonts::LoadAllFonts ()
 Loads all fonts available in the engine's configured font directory. More...
 
BLAM HRESULT Blam::Content::Fonts::LoadFont (std::string path)
 Load a font from disk. More...
 
BLAM HRESULT Blam::Content::Fonts::ReloadFont (std::string id)
 Reloads all data for the specified font. More...
 
BLAM FontBlam::Content::Fonts::GetFont (std::string id)
 Retrieves a font from the list of loaded fonts. More...
 
BLAM FontGlyphBlam::Content::Fonts::GetFontGlyph (Font *font, char glyph)
 Retrieves a glyph from a font. More...
 
BLAM bool Blam::Content::Fonts::FontExists (std::string id)
 Checks whether or not a font is loaded. More...
 
BLAM std::map< std::string, Font > * Blam::Content::Fonts::GetFontList ()
 Retrieves the list of loaded fonts. More...
 
BLAM void Blam::Content::Fonts::Cleanup ()
 Clean-up all font data and free any allocated memory for font data. More...
 
BLAM void Blam::Content::Fonts::New::LoadAllFonts ()
 
BLAM BlamResult Blam::Content::Fonts::New::LoadFontDirectory (std::string directory)
 
BLAM BlamResult Blam::Content::Fonts::New::LoadFontPackage (std::string file)
 
BLAM BlamResult Blam::Content::Fonts::New::LoadFont (std::string font_name)
 
BLAM BlamMap< std::string, BlamFontPackage * > Blam::Content::Fonts::New::GetFontList ()
 
BLAM bool Blam::Content::Fonts::New::FontExists (std::string id)
 
BLAM BlamFontPackageBlam::Content::Fonts::New::GetFont (std::string id)
 
BLAM void Blam::Content::Fonts::New::Cleanup ()
 

Macro Definition Documentation

◆ BLAM

#define BLAM

◆ FONT_PACKAGE_EXTENSION

#define FONT_PACKAGE_EXTENSION   ".bin"

◆ FONT_PACKAGE_VERSION

#define FONT_PACKAGE_VERSION   2

◆ FONT_TABLE_FILE

#define FONT_TABLE_FILE   "font_table.txt"

◆ FONTINFO_FILENAME

#define FONTINFO_FILENAME   "fontinfo.xml"

Enumeration Type Documentation

◆ BlamFontPackageType

enum BlamFontPackageType
strong
Enumerator
Unknown 
Bitmap 
BitmapAtlas 
TrueType 
XMLBitmap 
XMLBitmapAtlas 
XMLTruetype 

◆ FontGlyphFormat

Enumerator for the image format used in a given font glyph.

Currently, only PNG images are supported. We could support other image types - but we may end up just sticking with PNG since it isn't subject to any sort of compression. Because let's face it - compression is good for photos, not so good when you're dealing with pixel precise font textures.

Enumerator
PNG 

Indicates the glyph originates from a .PNG image.