Elaztek Developer Hub
Blamite Game Engine - blam!  00406.12.10.23.1457.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 representing a font glyph. More...
 
class  BlamFontPackage
 Class representing a Blamite font package. More...
 

Namespaces

 Blam
 Namespace surrounding all major engine components.
 
 Blam::Content
 
 Blam::Content::Fonts
 Namespace containing functions for interacting with font packages.
 

Macros

#define BLAM
 
#define FONT_TABLE_FILE   "font_table.txt"
 The filename of the font table file. Currently unused. More...
 
#define FONTINFO_FILENAME   "fontinfo.xml"
 The default filename for XML (unpacked) font information. More...
 
#define FONT_PACKAGE_EXTENSION   ".bin"
 The default extension for font package files. More...
 
#define FONT_PACKAGE_VERSION   2
 The current font package version. Used to ensure compatibility. More...
 

Enumerations

enum  BlamFontPackageType {
  BlamFontPackageType::Unknown, BlamFontPackageType::Bitmap, BlamFontPackageType::BitmapAtlas, BlamFontPackageType::TrueType,
  BlamFontPackageType::XMLBitmap, BlamFontPackageType::XMLBitmapAtlas, BlamFontPackageType::XMLTruetype
}
 Enumerator listing all possible font package types. More...
 

Functions

BLAM void Blam::Content::Fonts::LoadAllFonts ()
 Loads all available font packages within the fonts directory. More...
 
BLAM BlamResult Blam::Content::Fonts::LoadFontDirectory (std::string directory)
 Attempts to load an unpackaged (XML) font from a directory. More...
 
BLAM BlamResult Blam::Content::Fonts::LoadFontPackage (std::string file)
 Attempts to load a font package from a file. More...
 
BLAM BlamResult Blam::Content::Fonts::LoadFont (std::string font_name)
 
BLAM BlamMap< std::string, BlamFontPackage * > Blam::Content::Fonts::GetFontList ()
 Retrieves the map of all available fonts. More...
 
BLAM bool Blam::Content::Fonts::FontExists (std::string id)
 Checks if a font package exists with a given name. More...
 
BLAM BlamFontPackageBlam::Content::Fonts::GetFont (std::string id)
 Retrieves a font package from its name. More...
 
BLAM void Blam::Content::Fonts::Cleanup ()
 Releases all font package data from memory. More...
 

Macro Definition Documentation

◆ BLAM

#define BLAM

◆ FONT_PACKAGE_EXTENSION

#define FONT_PACKAGE_EXTENSION   ".bin"

The default extension for font package files.

◆ FONT_PACKAGE_VERSION

#define FONT_PACKAGE_VERSION   2

The current font package version. Used to ensure compatibility.

◆ FONT_TABLE_FILE

#define FONT_TABLE_FILE   "font_table.txt"

The filename of the font table file. Currently unused.

◆ FONTINFO_FILENAME

#define FONTINFO_FILENAME   "fontinfo.xml"

The default filename for XML (unpacked) font information.

Enumeration Type Documentation

◆ BlamFontPackageType

enum BlamFontPackageType
strong

Enumerator listing all possible font package types.

Enumerator
Unknown 

Indicates the font package has an unknown type. Should generally be considered an error.

Bitmap 

Indicates that the font package stores glyphs in separate bitmaps.

BitmapAtlas 

Indicates that the font package stores glyphs in a texture atlas bitmap.

TrueType 

Indicates that the font package stores a TrueType (or similar) font directly.

XMLBitmap 

Identical to #Bitmap, but indicates that the font package is unpacked.

XMLBitmapAtlas 

Identical to #BitmapAtlas, but indicates that the font package is unpacked.

XMLTruetype 

Identical to #Truetype, but indicates that the font package is unpacked.