|
| virtual | ~TextRenderer () |
| |
| virtual float | GetBaseLine () const =0 |
| | Get the distance of baseline from the top of the text. More...
|
| |
| virtual int | GetCharacterIndex (const std::string &text, Geometry::Point location) const =0 |
| | Returns the character index of glyph immediately after the given location. This function is Unicode aware. More...
|
| |
| virtual int | GetCharacterIndex (const std::string &text, int w, Geometry::Point location, bool wrap=true) const =0 |
| | Returns the character index of glyph immediately after the given location. This function is Unicode aware. More...
|
| |
| virtual int | GetEMSize () const =0 |
| | Returns the size of the EM dash. More...
|
| |
| virtual const GlyphRenderer & | GetGlyphRenderer () const =0 |
| | Returns the glyphrenderer that is used by this text renderer. More...
|
| |
| virtual int | GetHeight () const =0 |
| | Get the distance of baseline from the top of the text. More...
|
| |
| virtual Geometry::Rectangle | GetPosition (const std::string &text, int index) const =0 |
| | Returns the position of the glyph at the character index. More...
|
| |
| virtual Geometry::Rectangle | GetPosition (const std::string &text, int w, int index, bool wrap=true) const =0 |
| | Returns the position of the glyph at the character index. More...
|
| |
| virtual Geometry::Size | GetSize (const std::string &text) const =0 |
| | Returns the size of the given text. More...
|
| |
| virtual Geometry::Size | GetSize (const std::string &text, int width) const =0 |
| | Returns the size of the given text. More...
|
| |
| virtual bool | IsReady () const =0 |
| | Whether the render can render text. More...
|
| |
| void | Print (TextureTarget &target, const std::string &text) |
| |
| void | Print (TextureTarget &target, const std::string &text, Geometry::Point location) const |
| |
| void | Print (TextureTarget &target, const std::string &text, Geometry::Point location, int w) const |
| |
| void | Print (TextureTarget &target, const std::string &text, Geometry::Point location, int w, TextAlignment align_override) const |
| |
| void | Print (TextureTarget &target, const std::string &text, Geometry::Pointf location) const |
| | Prints the given text to the target. More...
|
| |
| void | Print (TextureTarget &target, const std::string &text, int x, int y) const |
| |
| void | Print (TextureTarget &target, const std::string &text, int x, int y, int w) const |
| |
| void | Print (TextureTarget &target, const std::string &text, int x, int y, int w, TextAlignment align_override) const |
| |
| void | PrintNoWrap (TextureTarget &target, const std::string &text, Geometry::Point location, int w) const |
| |
| void | PrintNoWrap (TextureTarget &target, const std::string &text, Geometry::Point location, int w, TextAlignment align_override) const |
| |
| void | PrintNoWrap (TextureTarget &target, const std::string &text, int x, int y, int w) const |
| |
| void | PrintNoWrap (TextureTarget &target, const std::string &text, int x, int y, int w, TextAlignment align_override) const |
| |
|
| virtual void | print (TextureTarget &target, const std::string &text, Geometry::Point location) const =0 |
| |
| virtual void | print (TextureTarget &target, const std::string &text, Geometry::Rectangle location) const =0 |
| |
| virtual void | print (TextureTarget &target, const std::string &text, Geometry::Rectangle location, TextAlignment align_override) const =0 |
| | Should print the given text to the specified location and color. More...
|
| |
| virtual void | printnowrap (TextureTarget &target, const std::string &text, Geometry::Rectangle location) const =0 |
| | Should print the given text to the specified location and color. More...
|
| |
| virtual void | printnowrap (TextureTarget &target, const std::string &text, Geometry::Rectangle location, TextAlignment align_override) const =0 |
| | Should print the given text to the specified location and color. More...
|
| |
This class allows printing text on the screen.
All fonts should support basic left aligned print, aligned rectangular area printing. Additionally, all fonts should support basic info functions. TextRenderers must be accept utf-8. internal::decode function should be preferred to decode utf-8, among regular utf-8 decoding, this function will map \r
to
.
Should print the given text to the specified location and color.
Width should be used to align the text. Unless width is 0, text should be wrapped. Even if width is 0, the alignment should be respected. For instance if width is 0 and align is right, text should end at the given location. Height of the rectangle can be left 0, thus unless explicitly requested, it should be ignored.
Implemented in StyledRenderer, and BasicFont.