29 #ifndef _CEGUIFreeTypeFont_h_
30 #define _CEGUIFreeTypeFont_h_
32 #include "CEGUI/Font.h"
33 #include "CEGUI/DataContainer.h"
34 #include "CEGUI/BasicImage.h"
37 #include FT_FREETYPE_H
96 const bool anti_aliased,
const String& font_filename,
97 const String& resource_group =
"",
99 const Sizef& native_res =
Sizef(640.0f, 480.0f),
100 const float specific_line_spacing = 0.0f);
145 CodepointMap::const_iterator e)
const;
155 void initialiseGlyphMap();
159 void rasterise(utf32 start_codepoint, utf32 end_codepoint)
const;
186 #endif // end of guard _CEGUIFreeTypeFont_h_
void free()
Free all allocated font data.
TextureVector d_glyphTextures
Textures that hold the glyph imagery for this font.
Definition: FreeTypeFont.h:177
uint getTextureSize(CodepointMap::const_iterator s, CodepointMap::const_iterator e) const
Return the required texture size required to store imagery for the glyphs from s to e...
Implementation of the Font class interface using the FreeType library.
Definition: FreeTypeFont.h:53
No auto scaling takes place.
Definition: Image.h:42
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
void setPointSize(const float point_size)
return the point size of the freetype font.
uint32 argb_t
32 bit ARGB representation of a colour.
Definition: Colour.h:38
RawDataContainer d_fontData
Font file data.
Definition: FreeTypeFont.h:172
Definition: BasicImage.h:42
float getPointSize() const
return the point size of the freetype font.
float d_ptSize
Point size of font.
Definition: FreeTypeFont.h:166
AutoScaledMode
Definition: Image.h:39
Abstract base class specifying the required interface for Texture objects.
Definition: Texture.h:52
internal class representing a single font glyph.
Definition: FontGlyph.h:42
bool d_antiAliased
True if the font should be rendered as anti-alaised by freeType.
Definition: FreeTypeFont.h:168
Class that encapsulates a typeface.
Definition: Font.h:58
FT_Face d_fontFace
FreeType-specific font handle.
Definition: FreeTypeFont.h:170
bool isAntiAliased() const
return whether the freetype font is rendered anti-aliased.
Class used as the databuffer for loading files throughout the library.
Definition: DataContainer.h:42
FreeTypeFont(const String &font_name, const float point_size, const bool anti_aliased, const String &font_filename, const String &resource_group="", const AutoScaledMode auto_scaled=ASM_Disabled, const Sizef &native_res=Sizef(640.0f, 480.0f), const float specific_line_spacing=0.0f)
Constructor for FreeTypeFont based fonts.
float d_specificLineSpacing
If non-zero, the overridden line spacing that we're to report.
Definition: FreeTypeFont.h:164
void rasterise(utf32 start_codepoint, utf32 end_codepoint) const
This function prepares a certain range of glyphs to be ready for displaying. This means that after re...
~FreeTypeFont()
Destructor.
void setAntiAliased(const bool anti_alaised)
return whether the freetype font is rendered anti-aliased.
const FontGlyph * findFontGlyph(const utf32 codepoint) const
finds FontGlyph in map and returns it, or 0 if none.
void updateFont()
Update the font as needed, according to the current parameters.
std::vector< Texture *CEGUI_VECTOR_ALLOC(Texture *)> TextureVector
Type definition for TextureVector.
Definition: FreeTypeFont.h:175
ImageVector d_glyphImages
collection of images defined for this font.
Definition: FreeTypeFont.h:181
void initialiseFontGlyph(CodepointMap::iterator cp) const
initialise FontGlyph for given codepoint.
void addFreeTypeFontProperties()
Register all properties of this class.
void writeXMLToStream_impl(XMLSerializer &xml_stream) const
implementaion version of writeXMLToStream.
Class used to create XML Document.
Definition: XMLSerializer.h:85
void drawGlyphToBuffer(argb_t *buffer, uint buf_width) const
Copy the current glyph data into buffer, which has a width of buf_width pixels (not bytes)...
String class used within the GUI system.
Definition: String.h:62