.. index:: pair: class; EE::Graphics::Font .. _doxid-class_e_e_1_1_graphics_1_1_font: class EE::Graphics::Font ======================== .. toctree:: :hidden: enum_EE_Graphics_Font_Event.rst struct_EE_Graphics_Font_Info.rst Overview ~~~~~~~~ :ref:`Font ` interface class. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class Font { public: // typedefs typedef std::function`, :ref:`Event`, Font*)> :target:`FontEventCallback`; // enums enum :ref:`Event`; // structs struct :ref:`Info`; // construction virtual :target:`~Font`(); // methods static :ref:`Uint32` :target:`getHorizontalAlign`(const :ref:`Uint32`& flags); static :ref:`Uint32` :target:`getVerticalAlign`(const :ref:`Uint32`& flags); static bool :target:`isEmojiCodePoint`(const :ref:`Uint32`& codePoint); static bool :target:`containsEmojiCodePoint`(const :ref:`String`& string); static std::vector :target:`emojiCodePointsPositions`(const :ref:`String`& string); virtual :ref:`Uint32` :ref:`getFontHeight`(const :ref:`Uint32`& characterSize) const = 0; const :ref:`FontType`& :ref:`getType`() const; const std::string& :ref:`getName`() const; void :ref:`setName`(const std::string& setName); const :ref:`String::HashType`& :ref:`getId`(); virtual bool :target:`isMonospace`() const = 0; virtual bool :target:`isScalable`() const = 0; virtual const :ref:`Info`& :target:`getInfo`() const = 0; virtual const :ref:`Glyph`& :target:`getGlyph`(:ref:`Uint32` codePoint, unsigned int characterSize, bool bold, bool italic, :ref:`Float` outlineThickness = 0, :ref:`Float` maxWidth = 0) const = 0; virtual :ref:`GlyphDrawable`* :ref:`getGlyphDrawable`(:ref:`Uint32` codePoint, unsigned int characterSize, bool bold = false, bool italic = false, :ref:`Float` outlineThickness = 0, const :ref:`Float`& forzeSize = 0) const = 0; virtual :ref:`Float` :target:`getKerning`(:ref:`Uint32` first, :ref:`Uint32` second, unsigned int characterSize, bool bold, bool italic, :ref:`Float` outlineThickness = 0) const = 0; virtual :ref:`Float` :target:`getLineSpacing`(unsigned int characterSize) const = 0; virtual :ref:`Float` :target:`getUnderlinePosition`(unsigned int characterSize) const = 0; virtual :ref:`Float` :target:`getUnderlineThickness`(unsigned int characterSize) const = 0; virtual :ref:`Texture`* :target:`getTexture`(unsigned int characterSize) const = 0; virtual :ref:`Uint32` :target:`getFontStyle`() const; virtual bool :target:`isRegular`() const; virtual bool :target:`isBold`() const; virtual bool :target:`isItalic`() const; virtual bool :target:`isBoldItalic`() const; virtual bool :target:`hasBold`() const; virtual bool :target:`hasItalic`() const; virtual bool :target:`hasBoldItalic`() const; virtual bool :target:`loaded`() const = 0; :ref:`Uint32` :ref:`pushFontEventCallback`(const :ref:`FontEventCallback`& cb); void :ref:`popFontEventCallback`(const :ref:`Uint32`& callbackId); }; .. _details-class_e_e_1_1_graphics_1_1_font: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ :ref:`Font ` interface class. Methods ------- .. index:: pair: function; getFontHeight .. _doxid-class_e_e_1_1_graphics_1_1_font_1a572464f2fbe0de1bf84a3d6265f90247: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`Uint32` getFontHeight(const :ref:`Uint32`& characterSize) const = 0 .. rubric:: Returns: The current font height .. index:: pair: function; getType .. _doxid-class_e_e_1_1_graphics_1_1_font_1a2dafe4c3ec4dbca406d3e0bf847664af: .. ref-code-block:: cpp :class: doxyrest-title-code-block const :ref:`FontType`& getType() const .. rubric:: Returns: The type of the instance of the font .. index:: pair: function; getName .. _doxid-class_e_e_1_1_graphics_1_1_font_1a84eee169817fb268640c82ce30b467ea: .. ref-code-block:: cpp :class: doxyrest-title-code-block const std::string& getName() const .. rubric:: Returns: The font name .. index:: pair: function; setName .. _doxid-class_e_e_1_1_graphics_1_1_font_1a0fa3aa54feb11e838088ca91bee9c2e8: .. ref-code-block:: cpp :class: doxyrest-title-code-block void setName(const std::string& setName) Change the font name ( and id, because it's the font name hash ) .. index:: pair: function; getId .. _doxid-class_e_e_1_1_graphics_1_1_font_1a2516a3abbe7733e8f1482704c62a9a0a: .. ref-code-block:: cpp :class: doxyrest-title-code-block const :ref:`String::HashType`& getId() .. rubric:: Returns: The font id .. index:: pair: function; getGlyphDrawable .. _doxid-class_e_e_1_1_graphics_1_1_font_1a5317e14ccd72ac15cba064cdebfbd23a: .. ref-code-block:: cpp :class: doxyrest-title-code-block virtual :ref:`GlyphDrawable`* getGlyphDrawable(:ref:`Uint32` codePoint, unsigned int characterSize, bool bold = false, bool italic = false, :ref:`Float` outlineThickness = 0, const :ref:`Float`& forzeSize = 0) const = 0 .. rubric:: Returns: The glyph drawable that represents the glyph in a texture. The glyph drawable allocation is managed by the font. .. index:: pair: function; pushFontEventCallback .. _doxid-class_e_e_1_1_graphics_1_1_font_1a855c816d23cd7ec5098d90b35cca1fa6: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Uint32` pushFontEventCallback(const :ref:`FontEventCallback`& cb) Push a new on resource change callback. .. rubric:: Returns: The Callback Id .. index:: pair: function; popFontEventCallback .. _doxid-class_e_e_1_1_graphics_1_1_font_1a5abd41b82e9c9d21cfd8a2b2a291b1e4: .. ref-code-block:: cpp :class: doxyrest-title-code-block void popFontEventCallback(const :ref:`Uint32`& callbackId) Pop the on resource change callback id indicated.