Gorgon Game Engine
FreeType.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Font.h"
4 #include "Drawables.h"
5 #include "BitmapFont.h"
6 #include "../Geometry/Point.h"
7 #include "../Containers/Collection.h"
8 
9 namespace Gorgon { namespace Resource { class Font; } }
10 
11 
12 namespace Gorgon { namespace Graphics {
13 
15  struct ftlib;
17 
49  class FreeType : public GlyphRenderer, public BasicFont {
51 
53  class GlyphDescriptor {
55  struct Images {
56  Images(Drawable *regular = nullptr, Drawable *withoffset = nullptr) :
57  regular(regular), withoffset(withoffset) {}
58  Drawable *regular;
59  Drawable *withoffset;
60  };
61  public:
62  GlyphDescriptor() { }
63 
64  GlyphDescriptor(Images images, float advance, Geometry::Point offset, unsigned int ftind) :
65  images(images), advance(advance), offset(offset), ftindex(ftind) { }
66 
68  Images images;
69  float advance = 0;
70  Geometry::Point offset = {0, 0};
71  unsigned int ftindex = 0;
72  };
73 
74  public:
79  FreeType();
80 
84  FreeType(const std::string &filename) : FreeType() {
85  LoadFile(filename);
86  }
87 
89  FreeType(const std::string &filename, int size, bool loadascii = true) : FreeType() {
90  LoadFile(filename, size, loadascii);
91  }
92 
94  FreeType(const FreeType &) = delete;
95 
97  FreeType &operator =(const FreeType &) = delete;
98 
100  virtual ~FreeType();
101 
107  bool LoadFile(const std::string &filename);
108 
112  bool LoadFile(const std::string &filename, int size, bool loadascii = true);
113 
121  bool Load(const std::vector<Byte> &data);
122 
128  bool Load(const Byte *data, long datasize);
129 
137  bool Assume(std::vector<Byte> &data);
138 
145  bool Assume(const Byte *data, long datasize);
146 
153  bool LoadMetrics(int size);
154 
158  bool LoadGlyphs(GlyphRange range, bool prepare = true);
159 
163  bool LoadGlyphs(Glyph start, Glyph end, bool prepare = true) { return LoadGlyphs(GlyphRange{start, end}, prepare); }
164 
169  bool LoadGlyphs(const std::vector<GlyphRange> &ranges, bool prepare = true);
170 
175  bool IsScalable() const;
176 
180  std::vector<int> GetPresetSizes() const;
181 
183  bool IsFileLoaded() const;
184 
188  bool IsReady() const override;
189 
191  bool IsSymbolOnly() const {
192  return issymbol;
193  }
194 
196  bool HasKerning() const {
197  return haskerning;
198  }
199 
203  aa = false;
204  }
205 
209  aa = true;
210  }
211 
213  std::string GetFamilyName() const;
214 
216  std::string GetStyleName() const;
217 
219  void Clear();
220 
226  BitmapFont CopyToBitmap(bool prepare = true) const;
227 
228 
235  BitmapFont MoveOutBitmap(bool unpack = false, bool prepare = true);
236 
239  void Pack(bool keeppacked = true, bool tight = true, float extrasize = 0.2) {
240  this->keeppacked = keeppacked;
241  this->tightpack = tight;
242 
243  pack(extrasize);
244  }
245 
248  void StopPacking() {
249  keeppacked = false;
250  }
251 
258  virtual void Render(Glyph chr, TextureTarget &target, Geometry::Pointf location, RGBAf color) const override;
259 
264 
265  using BasicFont::GetSize;
266 
269  virtual Geometry::Size GetSize(Glyph chr) const override;
270 
273  virtual float GetCursorAdvance(Glyph g) const override;
274 
276  virtual bool Exists(Glyph g) const override;
277 
280  bool Available(Glyph g) const;
281 
283  virtual bool IsASCII() const override { return isascii; }
284 
287  virtual bool IsFixedWidth() const override { return isfixedw; }
288 
291  virtual Geometry::Pointf KerningDistance(Glyph chr1, Glyph chr2) const override;
292 
294  virtual int GetEMSize() const override { return Exists(0x2004) ? GetSize(0x2004).Width : GetHeight(); }
295 
297  virtual int GetMaxWidth() const override { return maxadvance; }
298 
302  virtual int GetHeight() const override { return height; }
303 
306  virtual int GetDigitWidth() const override { return GetSize("0").Width; }
307 
309  virtual float GetBaseLine() const override { return baseline; }
310 
312  virtual float GetLineGap() const override { return linegap; }
313 
316  virtual float GetLineThickness() const override { return linethickness; }
317 
319  virtual int GetUnderlineOffset() const override { return underlinepos; }
320 
322  virtual bool NeedsPrepare() const override { return true; }
323 
326  virtual void Prepare(const std::string &text) const override;
327 
331  void Discard();
332 
333 
334  virtual std::pair<int, int> GetLetterHeight(bool asciionly = false) const override;
335 
336  private:
337  void pack(float extrasize = 0.2) const;
338 
339  bool loadglyphs(GlyphRange range, bool prepare) const;
340 
341  bool finalizeload();
342 
343  bool savedata(std::ostream &stream);
344 
345  void setatlassize(unsigned size) const;
346 
347  // automatic loading requires these functions to be mutable
348  mutable ftlib *lib;
349 
350  mutable std::map<Glyph, GlyphDescriptor> glyphmap ;
351 
352  //this exists to speed up loading glyphs that are already read.
353  mutable std::map<unsigned int, Glyph> ft_to_map;
354 
356 
357  //these are here for saving the font
358  std::string filename;
359 
360  const std::vector<Byte> *vecdata = nullptr;
361  const Byte *data = nullptr;
362  long datasize = 0;
363 
364  //stores the glyph atlas. could be empty if packing is not used
365  mutable Texture atlas;
366  //stores atlas pixel data
367  mutable Containers::Image atlasdata;
368 
369  //stores which pixels are used within the atlas
370  mutable std::vector<bool> used;
371 
372  //stores first free pixel location
373  mutable int rowsused = 0;
374 
375  bool keeppacked = true;
376  bool tightpack = true;
377 
378 
379  int isfixedw = false;
380 
381  int maxwidth = 0;
382 
383  int maxadvance = 0;
384 
385  int height = 0;
386 
387  float baseline = 0;
388 
389  bool aa = true;
390 
391  mutable int digw = 0;
392 
393  bool isascii = false;
394 
395  bool issymbol = false;
396 
397  float linethickness = 1;
398 
399  int underlinepos = 0;
400 
401  bool haskerning = false;
402 
403  float linegap = 0;
404 
405  float size = 0;
406  };
407 
408 } }
Gorgon::Graphics::FreeType::GetMaxWidth
virtual int GetMaxWidth() const override
Returns the advance the of widest glyph.
Definition: FreeType.h:297
Gorgon::swap
void swap(Event< Source_, Args_... > &l, Event< Source_, Args_... > &r)
Swaps two events.
Definition: Event.h:351
Gorgon::Graphics::FreeType::GetCharacter
Drawable * GetCharacter(Glyph chr)
This function will return the drawable that is used to render the given glyph.
Definition: FreeType.cpp:554
Gorgon::Graphics::FreeType::IsFixedWidth
virtual bool IsFixedWidth() const override
This function should return true if this font is fixed width.
Definition: FreeType.h:287
Gorgon::Containers::basic_Image::GetMode
Graphics::ColorMode GetMode() const
Returns the color mode of the image.
Definition: Image.h:1311
Gorgon::Graphics::FreeType::GetLineThickness
virtual float GetLineThickness() const override
Should return the average thickness of a line.
Definition: FreeType.h:316
Gorgon::Graphics::FreeType::Render
virtual void Render(Glyph chr, TextureTarget &target, Geometry::Pointf location, RGBAf color) const override
This function should render the given character to the target at the specified location and color.
Definition: FreeType.cpp:543
Gorgon::Containers::basic_Image::Resize
void Resize(const Geometry::Size &size, Graphics::ColorMode mode)
Resizes the image to the given size and color mode.
Definition: Image.h:71
Gorgon::Containers::Image
basic_Image< Byte > Image
Definition: Image.h:1364
Gorgon::Graphics::Texture
This class represents an image depends on a GL texture.
Definition: Texture.h:17
Gorgon::Graphics::FreeType::LoadGlyphs
bool LoadGlyphs(Glyph start, Glyph end, bool prepare=true)
Loads the glyphs in the given range.
Definition: FreeType.h:163
Gorgon::Graphics::FreeType::GetUnderlineOffset
virtual int GetUnderlineOffset() const override
The position of the underline, if it is to be drawn.
Definition: FreeType.h:319
Gorgon::Graphics::FreeType::GetLineGap
virtual float GetLineGap() const override
Returns the spacing between the lines.
Definition: FreeType.h:312
Gorgon::Graphics::Texture::GetCoordinates
virtual const Geometry::Pointf * GetCoordinates() const override final
Returns the coordinates of the texture to be used. Declared final to allow inlining.
Definition: Texture.h:161
Gorgon::Graphics::FreeType::MoveOutBitmap
BitmapFont MoveOutBitmap(bool unpack=false, bool prepare=true)
Moves the loaded glyphs into a new bitmap font.
Definition: FreeType.cpp:703
Gorgon::Graphics::FreeType::operator=
FreeType & operator=(const FreeType &)=delete
No copy assignment.
Gorgon::Graphics::FreeType::Pack
void Pack(bool keeppacked=true, bool tight=true, float extrasize=0.2)
Packs current glyphs into a single atlas.
Definition: FreeType.h:239
Gorgon::Graphics::FreeType::NeedsPrepare
virtual bool NeedsPrepare() const override
Should return if the glyph renderer requires preparation regarding the text given.
Definition: FreeType.h:322
Drawables.h
Gorgon::Graphics::FreeType::KerningDistance
virtual Geometry::Pointf KerningDistance(Glyph chr1, Glyph chr2) const override
This function should return the additional distance between given glyphs.
Definition: FreeType.cpp:571
Gorgon::Resource::GID::Font
constexpr Type Font
Definition: GID.h:199
Gorgon::Graphics::BitmapFont::SetLineGap
void SetLineGap(float value)
Changes the distance between two lines. Non-integer values are not recommended.
Definition: BitmapFont.h:263
Gorgon::Graphics::internal::isnewline
bool isnewline(Glyph g)
Definition: Font.cpp:79
Gorgon::Graphics::FreeType::IsASCII
virtual bool IsASCII() const override
This function should return true if this font renderer supports only 7-bit ASCII.
Definition: FreeType.h:283
Gorgon::Graphics::FreeType::FreeType
FreeType()
Initializes the class without loading any glyphs or files.
Definition: FreeType.cpp:117
Gorgon::Graphics::Bitmap::GetHeight
int GetHeight() const
Returns the height of the bitmap.
Definition: Bitmap.h:480
Gorgon::Graphics::Texture::Release
GL::Texture Release()
Releases the texture id that might be owned by this object without destroying it.
Definition: Texture.h:180
Gorgon::Graphics::GlyphRange::End
Glyph End
End point of the range. This value is included in the range.
Definition: Font.h:42
Gorgon::Graphics::GlyphRenderer
Should be implemented by the systems aimed to render fonts on the screen.
Definition: Font.h:67
Gorgon::Graphics::RGBAf
Represents a four channel 32 bit float per channel color information.
Definition: Color.h:373
Gorgon::Graphics::FreeType::GetPresetSizes
std::vector< int > GetPresetSizes() const
Returns the preset sizes in the font file.
Definition: FreeType.cpp:466
Gorgon::Graphics::FreeType::Discard
void Discard()
Discards intermediate files.
Definition: FreeType.cpp:1068
Gorgon::Graphics::FreeType::IsSymbolOnly
bool IsSymbolOnly() const
Returns whether the font is a symbol only font.
Definition: FreeType.h:191
Gorgon::Graphics::Texture::CreateEmpty
void CreateEmpty(const Geometry::Size &size, ColorMode mode)
Create an empty texture.
Definition: Texture.h:142
Gorgon::IO::WriteArray
void WriteArray(std::ostream &stream, const T_ *data, unsigned long size)
Writes an array to the stream.
Definition: Stream.h:294
Gorgon::Containers::basic_Image::GetWidth
int GetWidth() const
Returns the width of the image.
Definition: Image.h:1296
Gorgon::Graphics::FreeType::GetCursorAdvance
virtual float GetCursorAdvance(Glyph g) const override
This function should return the number of pixels the cursor should advance after this glyph.
Definition: FreeType.cpp:515
Font.h
Gorgon::IO::WriteVector
void WriteVector(std::ostream &stream, const std::vector< T_ > &data)
Writes a vector to the stream.
Definition: Stream.h:302
Gorgon::Graphics::FreeType::GetSize
virtual Geometry::Size GetSize(const std::string &text) const override
Definition: Font.cpp:678
Gorgon::Graphics::FreeType::IsReady
bool IsReady() const override
Returns if the FreeType is ready to work.
Definition: FreeType.cpp:502
Gorgon::Graphics::internal::decode
Glyph decode(std::string::const_iterator &it, std::string::const_iterator end)
Decodes a utf-8 character from the given iterator.
Definition: Font.cpp:9
Gorgon::Input::Keyboard::Keycodes::X
constexpr Key X
Definition: Keyboard.h:103
Gorgon::Graphics::FreeType::LoadGlyphs
bool LoadGlyphs(GlyphRange range, bool prepare=true)
Loads the glyphs in the given range.
Definition: FreeType.cpp:1058
Gorgon::Graphics::BitmapFont::AddGlyph
void AddGlyph(Glyph glyph, const RectangularDrawable &bitmap, int baseline=0)
Adds a new glyph bitmap to the list.
Definition: BitmapFont.h:154
Gorgon::Graphics::internal::isspace
bool isspace(Glyph g)
Definition: Font.cpp:96
Gorgon::Graphics::FreeType::FreeType
FreeType(const std::string &filename, int size, bool loadascii=true)
Initializes the class by loading the given file.
Definition: FreeType.h:89
Gorgon::Graphics::FreeType::IsScalable
bool IsScalable() const
Returns if the loaded font is scalable.
Definition: FreeType.cpp:458
Gorgon::Containers::basic_Image::GetTotalSize
unsigned long GetTotalSize() const
Total size of this image in number units.
Definition: Image.h:1306
Gorgon::Graphics::FreeType::GetLetterHeight
virtual std::pair< int, int > GetLetterHeight(bool asciionly=false) const override
Returns the offset (first) and maximum height (second) that is used by letters.
Definition: FreeType.cpp:1085
Gorgon::Graphics::GlyphRange::Count
int Count() const
Returns the number of the glyphs in the range.
Definition: Font.h:27
Gorgon
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
Gorgon::Graphics::GlyphRange::Start
Glyph Start
Start point of the range.
Definition: Font.h:39
Gorgon::Geometry::basic_Size
This class represents a 2D geometric size.
Definition: Size.h:23
Gorgon::Graphics::BitmapFont::SetUnderlineOffset
void SetUnderlineOffset(int value)
Changes the underline position to the specified value.
Definition: BitmapFont.h:257
Gorgon::Char
uint32_t Char
Definition: Types.h:46
Gorgon::Graphics::FreeType::StopPacking
void StopPacking()
Stops packing new glyphs.
Definition: FreeType.h:248
Gorgon::Graphics::FreeType::EnableAntiAliasing
void EnableAntiAliasing()
Enables anti aliasing.
Definition: FreeType.h:208
Gorgon::Graphics::Texture::GetImageSize
virtual Geometry::Size GetImageSize() const override final
Returns the size of the texture in pixels. Declared final to allow inlining.
Definition: Texture.h:156
Gorgon::CeilToPowerOf2
uint32_t CeilToPowerOf2(uint32_t v)
Calculate the smalllest power of two larger than this value.
Definition: Types.h:77
Gorgon::Graphics::FreeType::FreeType
FreeType(const FreeType &)=delete
No copy constructor.
Gorgon::Graphics::FreeType::GetEMSize
virtual int GetEMSize() const override
Returns the size of the EM dash.
Definition: FreeType.h:294
Gorgon::Graphics
Contains generic 2D graphics related data structures and functions.
Definition: Window.h:24
Bitmap.h
Gorgon::Containers::basic_Image::Destroy
void Destroy()
Destroys this image by setting width and height to 0 and freeing the memory used by its data.
Definition: Image.h:189
Gorgon::Containers::Collection
Collection is a container for reference typed objects.
Definition: Collection.h:21
Gorgon::Geometry::Point
basic_Point< int > Point
Definition: Point.h:598
Gorgon::Graphics::FreeType::Prepare
virtual void Prepare(const std::string &text) const override
Notifies glyph renderer about a text to be rendered.
Definition: FreeType.cpp:584
Gorgon::Graphics::Glyph
Gorgon::Char Glyph
Glyph is a symbol for a character. In Gorgon, glyphs are UTF32 chars.
Definition: Font.h:15
Gorgon::Graphics::Bitmap
This object contains an bitmap image.
Definition: Bitmap.h:25
Gorgon::Graphics::TextureImage
This is a solid texture based image class.
Definition: Texture.h:211
Gorgon::Graphics::FreeType::~FreeType
virtual ~FreeType()
Destructor.
Definition: FreeType.cpp:121
Gorgon::Graphics::FreeType::LoadFile
bool LoadFile(const std::string &filename)
Loads the given file.
Definition: FreeType.cpp:182
Gorgon::Graphics::FreeType::FreeType
FreeType(const std::string &filename)
Initializes the class by loading the given file.
Definition: FreeType.h:84
Gorgon::Graphics::BitmapFont::SetGlyphSpacing
void SetGlyphSpacing(int value)
Changes the spacing between glyphs.
Definition: BitmapFont.h:248
Gorgon::Input::Keyboard::Keycodes::B
constexpr Key B
Definition: Keyboard.h:81
Gorgon::Graphics::TextureTarget
This interface defines a class that can be used as a common target for texture based drawing.
Definition: TextureTargets.h:12
Gorgon::Graphics::ColorMode::Alpha
@ Alpha
8bit alpha only color mode
Gorgon::Geometry::basic_Point
This class represents a 2D point.
Definition: Point.h:32
FreeType.h
Gorgon::Graphics::Texture::GetID
virtual GL::Texture GetID() const override final
Returns GL::Texture to be drawn. Declared final to allow inlining.
Definition: Texture.h:151
Gorgon::Byte
unsigned char Byte
Represents smallest cell in memory.
Definition: Types.h:9
Gorgon::Graphics::FreeType::Exists
virtual bool Exists(Glyph g) const override
Returns true if the glyph exists.
Definition: FreeType.cpp:528
Gorgon::Graphics::BasicFont
This is the basic font, performing the minimal amount of operations necessary to render text on the s...
Definition: Font.h:271
Gorgon::Graphics::FreeType::CopyToBitmap
BitmapFont CopyToBitmap(bool prepare=true) const
Copy the loaded glyphs into a new bitmap font.
Definition: FreeType.cpp:621
Gorgon::UI::Graphics
@ Graphics
Definition: Template.h:164
Gorgon::Graphics::RectangularDrawable
Definition: Drawables.h:74
Gorgon::Graphics::FreeType::LoadMetrics
bool LoadMetrics(int size)
Continues loading a file by setting font size and obtaining necessary information.
Definition: FreeType.cpp:314
Gorgon::Containers::basic_Image::CopyTo
bool CopyTo(basic_Image &dest, Geometry::Point target={0, 0}) const
Copies data from one image to another.
Definition: Image.h:318
Gorgon::Graphics::BasicFont::GetSize
virtual Geometry::Size GetSize(const std::string &text) const override
Returns the size of the given text.
Definition: Font.cpp:678
Gorgon::Graphics::Texture::GetMode
ColorMode GetMode() const override
Definition: Texture.h:165
Gorgon::Geometry::basic_Size::Area
T_ Area() const
Returns the exact area of the rectangle has the size of this object.
Definition: Size.h:240
Gorgon::Graphics::FreeType::DisableAntiAliasing
void DisableAntiAliasing()
Disables anti aliasing.
Definition: FreeType.h:202
Gorgon::Graphics::FreeType::HasKerning
bool HasKerning() const
Returns whether this font contains kerning table.
Definition: FreeType.h:196
Gorgon::Graphics::FreeType::Assume
bool Assume(std::vector< Byte > &data)
Loads the given data.
Definition: FreeType.cpp:248
Gorgon::Containers::basic_Image
This class is a container for image data.
Definition: Image.h:19
Gorgon::Graphics::BitmapFont::Adopt
void Adopt(const RectangularDrawable &img)
This will add the given image to the list of images that will be destroyed with this object.
Definition: BitmapFont.h:372
Gorgon::Graphics::BitmapFont
Bitmap fonts provide an easy way to render text on the screen.
Definition: BitmapFont.h:24
Gorgon::Geometry::basic_Size::Width
T_ Width
Width of this size object.
Definition: Size.h:258
Gorgon::Graphics::Drawable
Represents a drawable object, that can be drawn to the given point.
Definition: Drawables.h:17
Gorgon::Graphics::BitmapFont::AssumeGlyph
void AssumeGlyph(Glyph glyph, const RectangularDrawable &bitmap, int baseline=0)
Adds a new glyph bitmap to the list.
Definition: BitmapFont.h:164
Gorgon::Graphics::GlyphRange
This class represents a range of glyphs. Both start and end is included.
Definition: Font.h:18
Gorgon::Graphics::FreeType::GetBaseLine
virtual float GetBaseLine() const override
Baseline point of glyphs from the top.
Definition: FreeType.h:309
Gorgon::Graphics::FreeType::IsFileLoaded
bool IsFileLoaded() const
Returns whether the file is loaded. Check IsReady.
Definition: FreeType.cpp:497
Gorgon::end
std::vector< T_ >::const_iterator end(enum_type_id< T_ >)
Definition: Enum.h:288
Gorgon::Graphics::Texture::Set
void Set(const Containers::Image &image)
Sets the texture to the given id with the given size.
Definition: Texture.h:69
Gorgon::Graphics::Bitmap::GetWidth
int GetWidth() const
Returns the width of the bitmap.
Definition: Bitmap.h:476
Gorgon::Graphics::BitmapFont::SetKerning
void SetKerning(Glyph left, Glyph right, Geometry::Pointf kern)
Definition: BitmapFont.h:180
Gorgon::Containers::basic_Image::GetHeight
int GetHeight() const
Returns the height of the image.
Definition: Image.h:1301
Gorgon::Containers::basic_Image::Swap
void Swap(basic_Image &other)
Swaps this image with another. This function is used to implement move semantics.
Definition: Image.h:200
BitmapFont.h
Gorgon::Graphics::FreeType::GetStyleName
std::string GetStyleName() const
Returns the style name of the font.
Definition: FreeType.cpp:489
Gorgon::Filesystem::Canonical
std::string Canonical(const std::string &path)
Canonicalizes a given relative path.
Definition: Linux.cpp:94
Gorgon::Graphics::FreeType::Available
bool Available(Glyph g) const
Returns true if the glyph is available in the font.
Definition: FreeType.cpp:533
Gorgon::Graphics::Bitmap::Discard
virtual void Discard()
This function discards image data.
Definition: Bitmap.cpp:20
Gorgon::Graphics::BitmapFont::SetBaseline
void SetBaseline(float value)
Changes the baseline. Might cause problems if the font already has glyphs in it.
Definition: BitmapFont.h:260
Gorgon::GL::CopyToTexture
void CopyToTexture(Texture texture, const Containers::Image &data, Geometry::Point target)
Copies the data from the given image to the texture starting from the given target.
Definition: OpenGL.cpp:181
Gorgon::GL::UpdateTexture
void UpdateTexture(Texture texture, const Containers::Image &data)
Updates the given texture to contain the given data.
Definition: OpenGL.cpp:177
Gorgon::Graphics::FreeType::GetDigitWidth
virtual int GetDigitWidth() const override
Width of a digit, if digits do not have the same width, maximum should be returned.
Definition: FreeType.h:306
Gorgon::Graphics::FreeType::Load
bool Load(const std::vector< Byte > &data)
Loads the given data.
Definition: FreeType.cpp:213
Gorgon::Input::Keyboard::Keycodes::Y
constexpr Key Y
Definition: Keyboard.h:104
Gorgon::Graphics::BitmapFont::SetLineThickness
void SetLineThickness(int value)
Changes the line thickness to the specified value.
Definition: BitmapFont.h:254
Gorgon::Graphics::FreeType
This class allows using font files for text rendering.
Definition: FreeType.h:49
Gorgon::Graphics::FreeType::GetHeight
virtual int GetHeight() const override
Height of glyphs, actual size could be smaller but all glyphs should have the same virtual height.
Definition: FreeType.h:302
Gorgon::Graphics::FreeType::GetFamilyName
std::string GetFamilyName() const
Returns the name of the font.
Definition: FreeType.cpp:481
Gorgon::Graphics::BasicFont::color
RGBAf color
Color of this renderer, can be overridden.
Definition: Font.h:423
Gorgon::Containers::basic_Image::GetSize
Geometry::Size GetSize() const
Returns the size of the image.
Definition: Image.h:1291
Gorgon::Graphics::FreeType::Clear
void Clear()
Clears the glyphs that are loaded.
Definition: FreeType.cpp:812