Expose bitmap data of Font glyphs in FontTextureAtlas

This commit is contained in:
2023-05-26 16:19:10 +03:00
parent 5f8e5d44dc
commit 326b6f000a
4 changed files with 55 additions and 29 deletions

View File

@@ -10,6 +10,7 @@
#include "TextLayoutOptions.h"
class FontAsset;
struct FontTextureAtlasSlot;
// The default DPI that engine is using
#define DefaultDPI 96
@@ -204,6 +205,11 @@ DECLARE_SCRIPTING_TYPE_MINIMAL(FontCharacterEntry);
/// The size the character in the texture (in texture coordinates space).
/// </summary>
API_FIELD() Float2 UVSize;
/// <summary>
/// The slot in texture atlas, containing the pixel data of the glyph.
/// </summary>
API_FIELD() const FontTextureAtlasSlot* Slot;
};
template<>