12 enum class FontWeight :
int {
33 enum class FontCharSet : uint8_t {
35 Baltic = BALTIC_CHARSET,
36 CheneseBig5 = CHINESEBIG5_CHARSET,
37 Default = DEFAULT_CHARSET,
38 EastEurope = EASTEUROPE_CHARSET,
39 GB2312 = GB2312_CHARSET,
40 Greek = GREEK_CHARSET,
41 Hangul = HANGUL_CHARSET,
44 Russian = RUSSIAN_CHARSET,
45 ShiftJIS = SHIFTJIS_CHARSET,
46 Symbol = SYMBOL_CHARSET,
47 Turkish = TURKISH_CHARSET,
48 Vietnamese = VIETNAMESE_CHARSET,
51 Johab = JOHAB_CHARSET,
54 Arabic = ARABIC_CHARSET,
55 Hebrew = HEBREW_CHARSET,
64 enum class FontOutPrecision : uint8_t {
65 Character = OUT_CHARACTER_PRECIS,
66 Default = OUT_DEFAULT_PRECIS,
67 Device = OUT_DEVICE_PRECIS,
68 Outline = OUT_OUTLINE_PRECIS,
69 PostScriptOnly = OUT_PS_ONLY_PRECIS,
70 Raster = OUT_RASTER_PRECIS,
71 String = OUT_STRING_PRECIS,
72 Stroke = OUT_STROKE_PRECIS,
73 TrueTypeOnly = OUT_TT_ONLY_PRECIS,
74 TrueType = OUT_TT_PRECIS,
80 enum class FontClipPrecision : uint8_t {
81 CharacterPrecis = CLIP_CHARACTER_PRECIS,
82 DefaultPrecis = CLIP_DEFAULT_PRECIS,
84#if defined(CLIP_DFA_DISABLE)
85 DFA_Disable = CLIP_DFA_DISABLE,
88 Embedded = CLIP_EMBEDDED,
89 LH_Angles = CLIP_LH_ANGLES,
92#if defined(CLIP_DFA_OVERRIDE)
93 DFA_Override = CLIP_DFA_OVERRIDE,
96 StrokePrecis = CLIP_STROKE_PRECIS,
97 TT_Always = CLIP_TT_ALWAYS,
103 enum class FontQuality : uint8_t {
104 AntiAliased = ANTIALIASED_QUALITY,
105 ClearType = CLEARTYPE_QUALITY,
106 Default = DEFAULT_QUALITY,
107 Draft = DRAFT_QUALITY,
108 NoAntiAliased = NONANTIALIASED_QUALITY,
109 Proof = PROOF_QUALITY,
115 enum class FontPitch : uint8_t {
116 Default = DEFAULT_PITCH,
118 Variable = VARIABLE_PITCH,
124 enum class FontFamily : uint8_t {
125 Decorative = FF_DECORATIVE,
126 DontCare = FF_DONTCARE,
162 FontWeight
weight = FontWeight::DontCare;
207 FontPitch
pitch = FontPitch::Default;
212 FontFamily
family = FontFamily::DontCare;
238 operator LOGFONTW()
const;
FontFamily family
字体系列
Definition Font.h:212
HFONT CreateHandle() const
创建HFONT句柄
bool strikeOut
是否有删除线
Definition Font.h:177
std::wstring name
字体的字体名称,此字符串的长度不能超过 32
Definition Font.h:142
FontClipPrecision clipPrecision
裁剪精度
Definition Font.h:192
static Font GetFont(HFONT hFont)
通过HFONT获取字体信息
bool underline
是否有下划线
Definition Font.h:172
int escapement
转义向量与设备的 x 轴之间的角度(以十分之一度为单位)
Definition Font.h:152
FontQuality quality
输出质量
Definition Font.h:197
Font(const LOGFONTW &logFont)
从LOGFONTW构造字体对象
Font(const std::wstring &name, double size=12, FontWeight weight=FontWeight::DontCare)
构造指定字体名称、大小与粗细的字体对象
FontOutPrecision outPrecision
输出精度
Definition Font.h:187
FontWeight weight
字体的粗细,范围为 0 到 1000
Definition Font.h:162
bool italic
是否为斜体
Definition Font.h:167
double size
字体大小,以dip为单位
Definition Font.h:147
FontCharSet charSet
字符集
Definition Font.h:182
static Font & GetDefaultFont(bool update=false)
获取默认字体,线程中首次调用或参数update为true时会获取系统默认字体
Font(const std::wstring &name, FontCharSet charSet)
构造指定字体名称和字符集的字体对象
FontPitch pitch
字体的间距和系列
Definition Font.h:207
int orientation
每个字符的基线和设备 x 轴之间的角度(以十分之一度为单位)
Definition Font.h:157