update Font codes.
This commit is contained in:
parent
1784e1b2e2
commit
22c30427b3
@ -13,7 +13,7 @@ namespace hgl
|
|||||||
*/
|
*/
|
||||||
struct Font
|
struct Font
|
||||||
{
|
{
|
||||||
char name[128]; ///<字体名称(utf8)
|
os_char name[128]; ///<字体名称
|
||||||
|
|
||||||
int width; ///<宽度
|
int width; ///<宽度
|
||||||
int height; ///<高度
|
int height; ///<高度
|
||||||
|
@ -101,7 +101,7 @@ namespace hgl
|
|||||||
bool end_disable; ///<是否行尾禁用符号
|
bool end_disable; ///<是否行尾禁用符号
|
||||||
bool vrotate; ///<竖排时是否需要旋转
|
bool vrotate; ///<竖排时是否需要旋转
|
||||||
|
|
||||||
FontAdvInfo adv_info; ///<字符绘制信息
|
CharMetricsInfo adv_info; ///<字符绘制信息
|
||||||
};//struct CharLayoutAttributes
|
};//struct CharLayoutAttributes
|
||||||
|
|
||||||
using CLA=CharLayoutAttributes;
|
using CLA=CharLayoutAttributes;
|
||||||
|
14
inc/hgl/graph/font/TextRenderable.h
Normal file
14
inc/hgl/graph/font/TextRenderable.h
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#ifndef HGL_GRAPH_TEXT_RENDERABLE_INCLUDE
|
||||||
|
#define HGL_GRAPH_TEXT_RENDERABLE_INCLUDE
|
||||||
|
|
||||||
|
#include<hgl/graph/vulkan/VKRenderable.h>
|
||||||
|
namespace hgl
|
||||||
|
{
|
||||||
|
namespace graph
|
||||||
|
{
|
||||||
|
class TextRenderable:public vulkan::Renderable
|
||||||
|
{
|
||||||
|
};//
|
||||||
|
}//namespace graph
|
||||||
|
}//namespace hgl
|
||||||
|
#endif//HGL_GRAPH_TEXT_RENDERABLE_INCLUDE
|
@ -30,14 +30,14 @@ namespace hgl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool FontSourceSingle::GetCharAdvInfo(FontAdvInfo &adv_info,const u32char &ch)
|
const bool FontSourceSingle::GetCharMetrics(CharMetricsInfo &adv_info,const u32char &ch)
|
||||||
{
|
{
|
||||||
FontBitmap *bmp=GetCharBitmap(ch);
|
FontBitmap *bmp=GetCharBitmap(ch);
|
||||||
|
|
||||||
if(!bmp)
|
if(!bmp)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
adv_info=bmp->adv_info;
|
adv_info=bmp->metrics_info;
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
}//namespace graph
|
}//namespace graph
|
||||||
|
@ -61,7 +61,7 @@ namespace hgl
|
|||||||
{
|
{
|
||||||
hdc=CreateCompatibleDC(0);
|
hdc=CreateCompatibleDC(0);
|
||||||
|
|
||||||
hfont=CreateFont( -fnt.height,
|
hfont=CreateFontW( -fnt.height,
|
||||||
fnt.width,
|
fnt.width,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
@ -144,4 +144,4 @@ namespace hgl
|
|||||||
return(new WinBitmapFont(f));
|
return(new WinBitmapFont(f));
|
||||||
}
|
}
|
||||||
}//namespace graph
|
}//namespace graph
|
||||||
}//namespace hgl
|
}//namespace hgl
|
||||||
|
Loading…
x
Reference in New Issue
Block a user