ULRE/inc/hgl/graph/font/TileFont.h

37 lines
962 B
C
Raw Normal View History

2020-06-29 19:49:54 +08:00
#ifndef HGL_GRAPH_TILE_FONT_INCLUDE
#define HGL_GRAPH_TILE_FONT_INCLUDE
#include<hgl/graph/TileData.h>
#include<hgl/graph/font/FontSource.h>
2020-07-01 20:36:49 +08:00
#include<hgl/type/UnicodeBlocks.h>
2020-06-29 19:49:54 +08:00
namespace hgl
{
namespace graph
{
2020-07-01 20:36:49 +08:00
/**
* Tile字符管理<br>
* unicode块, unicode块只能对应一个字体数据来源
*/
2020-06-29 19:49:54 +08:00
class TileFont
{
2020-07-01 20:36:49 +08:00
using FontSourcePointer=FontSource *;
using FontSourceTable=FontSourcePointer[(size_t)UnicodeBlock::RANGE_SIZE];
FontSourceTable source_map;
2020-06-29 19:49:54 +08:00
TileData *tile_data;
public:
2020-07-01 20:36:49 +08:00
TileFont()
{
hgl_zero(source_map);
}
2020-06-29 19:49:54 +08:00
};//class TileFont
2020-07-01 20:36:49 +08:00
TileFont *CreateTileFont(const Font &,const int=-1);
2020-06-29 19:49:54 +08:00
}//namespace graph
}//namespace hgl
#endif//HGL_GRAPH_TILE_FONT_INCLUDE