22#include <kiwano/core/Resource.h>
23#include <kiwano/platform/NativeObject.hpp>
174 void RemoveFont(
size_t key);
178 void RemoveFontByFamily(
StringView font_family);
189 String TransformFamily(String family)
const;
192 using FontMap = UnorderedMap<size_t, RefPtr<Font>>;
195 using FontFamilyMap = UnorderedMap<String, RefPtr<Font>>;
196 FontFamilyMap font_family_cache_;
纹理缓存
Definition: Font.h:152
static RefPtr< Font > Preload(StringView file)
预加载字体
Definition: Font.cpp:29
Font()
创建系统默认字体
Definition: Font.cpp:87
float GetSize() const
获取字号
Definition: Font.h:206
uint32_t GetWeight() const
获取字体粗细值
Definition: Font.h:211
FontPosture GetPosture() const
获取字体形态
Definition: Font.h:216
void SetFamilyName(StringView name)
获取字体族
Definition: Font.h:226
FontStretch GetStretch() const
获取字体拉伸
Definition: Font.h:221
String GetFamilyName() const
获取字体族
Definition: Font.h:201
含有本地指针的对象
Definition: NativeObject.hpp:32
引用计数智能指针
Definition: RefBasePtr.hpp:35
资源
Definition: Resource.h:41
Definition: Singleton.h:28
FontPosture
字体形态
Definition: Font.h:60
FontStretch
字体拉伸
Definition: Font.h:71
字体粗细值
Definition: Font.h:40
Value
Definition: Font.h:42
@ Bold
加粗
Definition: Font.h:48
@ Normal
正常
Definition: Font.h:46