YSTest  PreAlpha_b500_20140530
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
YSLib::Drawing::Font类 参考final

字体:字模,包含字型、样式和大小。 更多...

#include <Font.h>

YSLib::Drawing::Font 的协作图:

Public 成员函数

 Font ()
 默认构造:使用默认字型家族、大小和样式的字体对象。 更多...
 
 Font (const FontFamily &, FontSize=DefaultSize, FontStyle=FontStyle::Regular)
 构造:使用指定字型家族、大小和样式的字体对象。 更多...
 

静态 Public 属性

static yconstexpr FontSize DefaultSize = 12
 
static yconstexpr FontSize MinimalSize = 4
 
static yconstexpr FontSize MaximalSize = 96
 

Private 属性

std::reference_wrapper< Typefacetypeface
 
FontSize font_size
 
FontStyle style
 字体样式。 更多...
 
 Bold
 
 Italic
 
 Underline
 
 Strikeout
 
 FTC_SBit = {}) const
 
const FontFamily FontFamily
 
const FontFamily FontSize
 
const FontFamily Size
 
const FontFamily font_size::FT_UInt flags
 
 DefDeCopyCtor (Font) Font(Font &&fnt)
 
 DefDeCopyAssignment (Font) DefPred(const ynothrow
 
 bool (style &FontStyle::Bold)) DefPred(const ynothrow
 
 bool (style &FontStyle::Italic)) DefPred(const ynothrow
 
 bool (style &FontStyle::Underline)) DefPred(const ynothrow
 
 bool (style &FontStyle::Strikeout)) s8 GetAdvance(ucs4_t
 取跨距。 更多...
 
s8 GetAscender () const
 取升部。 更多...
 
 DefGetter (const ynothrow, FontCache &, Cache, GetFontFamily().Cache) s8 GetDescender() const
 取降部。 更多...
 
 DefGetterMem (const ynothrow, const FamilyName &, FamilyName, GetFontFamily()) DefGetterMem(const ynothrow
 
const FontFamily GetTypeface ()) DefGetter(const ynothrow
 
const FontFamily font_size DefGetter (const ynothrow, FontStyle, Style, style) CharBitmap GetGlyph(ucs4_t c
 取当前字型和大小渲染的指定字符的字形。 更多...
 
FontSize GetHeight () const ynothrow
 取字体对应的字符高度。 更多...
 
 DefGetter (const ynothrow, Typeface &, Typeface, typeface) void SetSize(FontSize
 取内部信息。 更多...
 
bool SetStyle (FontStyle)
 设置样式。 更多...
 

详细描述

字体:字模,包含字型、样式和大小。

自从
build 145

在文件 Font.h546 行定义.

构造及析构函数说明

YSLib::Drawing::Font::Font ( )
inline

默认构造:使用默认字型家族、大小和样式的字体对象。

自从
build 351

在文件 Font.h568 行定义.

YSLib::Drawing::Font::Font ( const FontFamily family,
FontSize  size = DefaultSize,
FontStyle  fs = FontStyle::Regular 
)
explicit

构造:使用指定字型家族、大小和样式的字体对象。

自从
build 351

在文件 Font.cpp493 行定义.

成员函数说明

YSLib::Drawing::Font::bool ( style &FontStyle::Bold  ) const
YSLib::Drawing::Font::bool ( style &FontStyle::Italic  ) const
YSLib::Drawing::Font::bool ( style &FontStyle::Underline  ) const
YSLib::Drawing::Font::bool ( style &FontStyle::Strikeout  )

取跨距。

自从
build 280
YSLib::Drawing::Font::DefDeCopyAssignment ( Font  ) const
YSLib::Drawing::Font::DefDeCopyCtor ( Font  )
inline
自从
build 419 as workaround for G++ 4.7.1

在文件 Font.h580 行定义.

YSLib::Drawing::Font::DefGetter ( const ynothrow  ,
FontCache ,
Cache  ,
GetFontFamily().  Cache 
) const

取降部。

自从
build 280
const FontFamily font_size YSLib::Drawing::Font::DefGetter ( const ynothrow  ,
FontStyle  ,
Style  ,
style   
)

取当前字型和大小渲染的指定字符的字形。

自从
build 414
参数
c指定需要被渲染的字符。
flagsFreeType 渲染标识。
警告
返回的位图在下一次调用 FontCache 方法或底层 FreeType 缓存时不保证有效。
flags 可能被移除,应仅用于内部实现。
自从
build 280
YSLib::Drawing::Font::DefGetter ( const ynothrow  ,
Typeface ,
Typeface  ,
typeface   
)

取内部信息。

自从
build 419

取字型引用。

自从
build 280

设置字体大小。

YSLib::Drawing::Font::DefGetterMem ( const ynothrow  ,
const FamilyName ,
FamilyName  ,
GetFontFamily()   
) const
s8 YSLib::Drawing::Font::GetAscender ( ) const

取升部。

自从
build 280

在文件 Font.cpp509 行定义.

参考自 YSLib::Drawing::FetchLastLineBasePosition() , 以及 YSLib::Drawing::TextState::GetTextLineBaseOf().

这是这个函数的调用关系图:

FontSize YSLib::Drawing::Font::GetHeight ( ) const

取字体对应的字符高度。

自从
build 280

在文件 Font.cpp527 行定义.

参考自 YSLib::DS::UI::DualScreenReader::Execute(), YSLib::Drawing::TextState::GetTextLineHeightExOf(), YSLib::Drawing::TextState::GetTextLineHeightOf() , 以及 YSLib::UI::TextBox::PaintDefaultCaret().

这是这个函数的调用关系图:

const FontFamily YSLib::Drawing::Font::GetTypeface ( ) const
bool YSLib::Drawing::Font::SetStyle ( FontStyle  fs)

设置样式。

注解
仅当存在字型时设置样式。
自从
build 280

在文件 Font.cpp544 行定义.

参考 style, typeface , 以及 yunseq.

类成员变量说明

YSLib::Drawing::Font::Bold

在文件 Font.h587 行定义.

yconstexpr FontSize YSLib::Drawing::Font::DefaultSize = 12
static

在文件 Font.h549 行定义.

参考自 YSLib::Drawing::TextRegion::InitializeFont().

const FontFamily font_size ::FT_UInt YSLib::Drawing::Font::flags
初始值:
= FT_LOAD_RENDER | FT_LOAD_TARGET_NORMAL)
const

在文件 Font.h626 行定义.

FontSize YSLib::Drawing::Font::font_size
private
自从
build 419

在文件 Font.h556 行定义.

const FontFamily YSLib::Drawing::Font::FontFamily

在文件 Font.h613 行定义.

const FontFamily YSLib::Drawing::Font::FontSize

在文件 Font.h614 行定义.

YSLib::Drawing::Font::FTC_SBit = {}) const

在文件 Font.h597 行定义.

YSLib::Drawing::Font::Italic

在文件 Font.h588 行定义.

yconstexpr FontSize YSLib::Drawing::Font::MaximalSize = 96
static

在文件 Font.h550 行定义.

参考自 YReader::ShlTextReader::OnKeyDown().

yconstexpr FontSize YSLib::Drawing::Font::MinimalSize = 4
static

在文件 Font.h550 行定义.

参考自 YReader::ShlTextReader::OnKeyDown().

const FontFamily YSLib::Drawing::Font::Size

在文件 Font.h614 行定义.

YSLib::Drawing::Font::Strikeout

在文件 Font.h590 行定义.

FontStyle YSLib::Drawing::Font::style
private

字体样式。

自从
build 297

在文件 Font.h561 行定义.

参考自 SetStyle().

std::reference_wrapper<Typeface> YSLib::Drawing::Font::typeface
private
自从
build 419

在文件 Font.h554 行定义.

参考自 SetStyle().

YSLib::Drawing::Font::Underline

在文件 Font.h589 行定义.


该类的文档由以下文件生成: