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

字型标识。 更多...

#include <Font.h>

类 YSLib::Drawing::Typeface 继承关系图:
YSLib::Drawing::Typeface 的协作图:

struct  BitmapKey
 
struct  BitmapKeyHash
 
struct  SmallBitmapData
 

Public 成员函数

 Typeface (FontCache &, const FontPath &, u32=0)
 使用字体缓存引用在指定字体文件路径读取指定索引的字型并构造对象。 更多...
 
 ~Typeface ()
 since build 461 更多...
 
bool operator== (const Typeface &) const
 比较:相等关系。 更多...
 
bool operator< (const Typeface &) const
 比较:严格递增偏序关系。 更多...
 
 DefGetterMem (const ynothrow, FamilyName, FamilyName, GetFontFamily()) DefGetter(const ynothrow
 取字型家族。 更多...
 
const FontFamily ref first DefGetter (const ynothrow, const StyleName &, StyleName, style_name) DefGetter(const ynothrow
 取字符映射索引号。 更多...
 

Public 属性

const FontPath Path
 
const FontFamily FontFamily
 
const FontFamily ref first CMapIndex
 

Private 属性

::FT_Long face_index
 
::FT_Int cmap_index
 
StyleName style_name
 
pair< std::reference_wrapper
< FontFamily >
, std::reference_wrapper
<::FT_FaceRec_ > > 
ref
 
GMRUCache< BitmapKey,
SmallBitmapData, BitmapKeyHash
bitmap_cache
 
unordered_map< ucs4_t,::FT_UInt > glyph_index_cache
 
unordered_map< FontSize,
NativeFontSize
size_cache
 

友元

class Font
 
 ClearGlyphIndexCache
 
 ClearSizeCache
 
 PDefH (void, ClearBitmapCache,) ImplExpr(bitmap_cache.clear()) PDefH(void
 
 ImplExpr (glyph_index_cache.clear()) PDefH(void
 since build 420 更多...
 
SmallBitmapDataLookupBitmap (const BitmapKey &) const
 
::FT_UInt LookupGlyphIndex (ucs4_t) const
 
NativeFontSizeLookupSize (FontSize) const
 since build 420 更多...
 

额外继承的成员函数

- Private 成员函数 继承自 ystdex::noncopyable
 noncopyable (const noncopyable &)=delete
 禁止复制构造。 更多...
 
noncopyableoperator= (const noncopyable &)=delete
 禁止赋值复制。 更多...
 
 noncopyable ()=default
 protected 构造:默认实现。 更多...
 
 ~noncopyable ()=default
 protected 析构:默认实现。 更多...
 
- Private 成员函数 继承自 ystdex::nonmovable
 nonmovable (const nonmovable &)=delete
 禁止复制构造。 更多...
 
nonmovableoperator= (const nonmovable &)=delete
 禁止赋值复制。 更多...
 
 nonmovable ()=default
 protected 构造:默认实现。 更多...
 
 ~nonmovable ()=default
 protected 析构:默认实现。 更多...
 

详细描述

字型标识。

自从
build 145

在文件 Font.h227 行定义.

构造及析构函数说明

YSLib::Drawing::Typeface::Typeface ( FontCache ,
const FontPath ,
u32  = 0 
)

使用字体缓存引用在指定字体文件路径读取指定索引的字型并构造对象。

后置条件
断言: cmap_index 在 face 接受的范围内。
YSLib::Drawing::Typeface::~Typeface ( )

since build 461

在文件 Font.cpp277 行定义.

参考 bitmap_cache, YSLib::Drawing::face, glyph_index_cache, ref, size_cache, YAssert , 以及 YAssertNonnull.

成员函数说明

const FontFamily ref first YSLib::Drawing::Typeface::DefGetter ( const ynothrow  ,
const StyleName ,
StyleName  ,
style_name   
) const

取字符映射索引号。

自从
build 278
YSLib::Drawing::Typeface::DefGetterMem ( const ynothrow  ,
FamilyName  ,
FamilyName  ,
GetFontFamily()   
) const

取字型家族。

自从
build 278
YSLib::Drawing::Typeface::ImplExpr ( glyph_index_cache.  clear())

since build 420

FT_UInt YSLib::Drawing::Typeface::LookupGlyphIndex ( ucs4_t  c) const
private
NativeFontSize & YSLib::Drawing::Typeface::LookupSize ( FontSize  s) const
private

since build 420

在文件 Font.cpp350 行定义.

参考 platform::Descriptions::Alert, ref, size_cache , 以及 YB_UNLIKELY.

参考自 LookupBitmap().

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

bool YSLib::Drawing::Typeface::operator< ( const Typeface rhs) const

比较:严格递增偏序关系。

在文件 Font.cpp308 行定义.

参考 face_index , 以及 Path.

bool YSLib::Drawing::Typeface::operator== ( const Typeface rhs) const

比较:相等关系。

在文件 Font.cpp303 行定义.

参考 face_index , 以及 Path.

YSLib::Drawing::Typeface::PDefH ( void  ,
ClearBitmapCache   
)

友元及相关函数文档

friend class Font
friend
自从
build 419

在文件 Font.h230 行定义.

类成员变量说明

GMRUCache<BitmapKey, SmallBitmapData, BitmapKeyHash> YSLib::Drawing::Typeface::bitmap_cache
mutableprivate
自从
build 461

在文件 Font.h277 行定义.

参考自 LookupBitmap() , 以及 ~Typeface().

YSLib::Drawing::Typeface::ClearGlyphIndexCache

在文件 Font.h333 行定义.

YSLib::Drawing::Typeface::ClearSizeCache

在文件 Font.h338 行定义.

::FT_Int YSLib::Drawing::Typeface::cmap_index
private

在文件 Font.h270 行定义.

参考自 LookupGlyphIndex().

const FontFamily ref first YSLib::Drawing::Typeface::CMapIndex

在文件 Font.h314 行定义.

::FT_Long YSLib::Drawing::Typeface::face_index
private

在文件 Font.h269 行定义.

参考自 operator<() , 以及 operator==().

const FontFamily YSLib::Drawing::Typeface::FontFamily

在文件 Font.h308 行定义.

unordered_map<ucs4_t, ::FT_UInt> YSLib::Drawing::Typeface::glyph_index_cache
mutableprivate
自从
build 419

在文件 Font.h279 行定义.

参考自 LookupGlyphIndex() , 以及 ~Typeface().

const FontPath YSLib::Drawing::Typeface::Path

在文件 Font.h233 行定义.

参考自 operator<() , 以及 operator==().

pair<std::reference_wrapper<FontFamily>, std::reference_wrapper<::FT_FaceRec_> > YSLib::Drawing::Typeface::ref
private
自从
build 420

在文件 Font.h274 行定义.

参考自 LookupBitmap(), LookupGlyphIndex(), LookupSize() , 以及 ~Typeface().

unordered_map<FontSize, NativeFontSize> YSLib::Drawing::Typeface::size_cache
mutableprivate
自从
build 420

在文件 Font.h281 行定义.

参考自 LookupSize() , 以及 ~Typeface().

StyleName YSLib::Drawing::Typeface::style_name
private

在文件 Font.h271 行定义.


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