Kiwano Engine v1.3.x
kiwano::Font类 参考

字体 更多...

#include <Font.h>

Public 成员函数

 Font (StringView family_name, float size, uint32_t weight=FontWeight::Normal, FontPosture posture=FontPosture::Normal, FontStretch stretch=FontStretch::Normal)
 创建字体,根据字体族名称自动搜索已预加载的 FontCollection 缓存,查找失败时使用系统字体 更多...
 
 Font (RefPtr< FontCollection > collection, float size, uint32_t weight=FontWeight::Normal, FontPosture posture=FontPosture::Normal, FontStretch stretch=FontStretch::Normal)
 创建字体,使用字体集合中的第一个字体族名称 更多...
 

Public 属性

float size
 
uint32_t weight
 
FontPosture posture
 
FontStretch stretch
 
String family_name
 
RefPtr< FontCollectioncollection
 

详细描述

字体

构造及析构函数说明

◆ Font() [1/2]

kiwano::Font::Font ( StringView  family_name,
float  size,
uint32_t  weight = FontWeight::Normal,
FontPosture  posture = FontPosture::Normal,
FontStretch  stretch = FontStretch::Normal 
)

创建字体,根据字体族名称自动搜索已预加载的 FontCollection 缓存,查找失败时使用系统字体

参数
family_name字体族
size字号
weight字体粗细
posture字体形态

◆ Font() [2/2]

kiwano::Font::Font ( RefPtr< FontCollection collection,
float  size,
uint32_t  weight = FontWeight::Normal,
FontPosture  posture = FontPosture::Normal,
FontStretch  stretch = FontStretch::Normal 
)

创建字体,使用字体集合中的第一个字体族名称

参数
collection字体集合
size字号
weight字体粗细
posture字体形态