|
@@ -43,7 +43,7 @@ class FontFaceHandle;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
A textured layer stored as part of a font face handle. Each handle will have at least a base
|
|
A textured layer stored as part of a font face handle. Each handle will have at least a base
|
|
|
- layer for the standard font. Further layers can be added to allow to rendering of text effects.
|
|
|
|
|
|
|
+ layer for the standard font. Further layers can be added to allow rendering of text effects.
|
|
|
|
|
|
|
|
@author Peter Curry
|
|
@author Peter Curry
|
|
|
*/
|
|
*/
|
|
@@ -52,7 +52,7 @@ class FontFaceLayer
|
|
|
{
|
|
{
|
|
|
public:
|
|
public:
|
|
|
FontFaceLayer();
|
|
FontFaceLayer();
|
|
|
- virtual ~FontFaceLayer();
|
|
|
|
|
|
|
+ ~FontFaceLayer();
|
|
|
|
|
|
|
|
/// Generates the character and texture data for the layer.
|
|
/// Generates the character and texture data for the layer.
|
|
|
/// @param[in] handle The handle generating this layer.
|
|
/// @param[in] handle The handle generating this layer.
|
|
@@ -60,14 +60,14 @@ public:
|
|
|
/// @param[in] clone The layer to optionally clone geometry and texture data from.
|
|
/// @param[in] clone The layer to optionally clone geometry and texture data from.
|
|
|
/// @param[in] deep_clone If true, the clones geometry will be completely cloned and the effect will have no option to affect even the glyph origins.
|
|
/// @param[in] deep_clone If true, the clones geometry will be completely cloned and the effect will have no option to affect even the glyph origins.
|
|
|
/// @return True if the layer was generated successfully, false if not.
|
|
/// @return True if the layer was generated successfully, false if not.
|
|
|
- virtual bool Initialise(const FontFaceHandle* handle, SharedPtr<const FontEffect> effect = {}, const FontFaceLayer* clone = nullptr, bool deep_clone = false);
|
|
|
|
|
|
|
+ bool Initialise(const FontFaceHandle* handle, SharedPtr<const FontEffect> effect = {}, const FontFaceLayer* clone = nullptr, bool deep_clone = false);
|
|
|
|
|
|
|
|
/// Generates the texture data for a layer (for the texture database).
|
|
/// Generates the texture data for a layer (for the texture database).
|
|
|
/// @param[out] texture_data The pointer to be set to the generated texture data.
|
|
/// @param[out] texture_data The pointer to be set to the generated texture data.
|
|
|
/// @param[out] texture_dimensions The dimensions of the texture.
|
|
/// @param[out] texture_dimensions The dimensions of the texture.
|
|
|
/// @param[in] glyphs The glyphs required by the font face handle.
|
|
/// @param[in] glyphs The glyphs required by the font face handle.
|
|
|
/// @param[in] texture_id The index of the texture within the layer to generate.
|
|
/// @param[in] texture_id The index of the texture within the layer to generate.
|
|
|
- virtual bool GenerateTexture(const byte*& texture_data, Vector2i& texture_dimensions, int texture_id);
|
|
|
|
|
|
|
+ bool GenerateTexture(UniquePtr<const byte[]>& texture_data, Vector2i& texture_dimensions, int texture_id);
|
|
|
/// Generates the geometry required to render a single character.
|
|
/// Generates the geometry required to render a single character.
|
|
|
/// @param[out] geometry An array of geometries this layer will write to. It must be at least as big as the number of textures in this layer.
|
|
/// @param[out] geometry An array of geometries this layer will write to. It must be at least as big as the number of textures in this layer.
|
|
|
/// @param[in] character_code The character to generate geometry for.
|
|
/// @param[in] character_code The character to generate geometry for.
|