engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Public 属性 | 友元 | 所有成员列表
FSlateFontInfo结构体 参考

A representation of a font in Slate. 更多...

#include <SlateFontInfo.h>

Public 成员函数

 FSlateFontInfo ()
 Default constructor.
 
 FSlateFontInfo (const ANSICHAR *InFontName, uint16 InSize, EFontHinting InHinting=EFontHinting::Default)
 DEPRECATED - Creates and initializes a new instance with the specified font name and size. 更多...
 
 FSlateFontInfo (const FName &InFontName, uint16 InSize, EFontHinting InHinting=EFontHinting::Default)
 DEPRECATED - Creates and initializes a new instance with the specified font name and size. 更多...
 
 FSlateFontInfo (const FString &InFontName, uint16 InSize, EFontHinting InHinting=EFontHinting::Default, const FFontOutlineSettings &InOutlineSettings=FFontOutlineSettings())
 DEPRECATED - Creates and initializes a new instance with the specified font name and size. 更多...
 
 FSlateFontInfo (const UObject *InFontObject, const int32 InSize, const FName &InTypefaceFontName=NAME_None, const FFontOutlineSettings &InOutlineSettings=FFontOutlineSettings())
 Creates and initializes a new instance with the specified font, size, and emphasis. 更多...
 
 FSlateFontInfo (const WIDECHAR *InFontName, uint16 InSize, EFontHinting InHinting=EFontHinting::Default)
 DEPRECATED - Creates and initializes a new instance with the specified font name and size. 更多...
 
 FSlateFontInfo (TSharedPtr< const FCompositeFont > InCompositeFont, const int32 InSize, const FName &InTypefaceFontName=NAME_None, const FFontOutlineSettings &InOutlineSettings=FFontOutlineSettings())
 Creates and initializes a new instance with the specified font, size, and emphasis. 更多...
 
const FCompositeFont * GetCompositeFont () const
 Get the composite font pointer associated with this font info (either directly or via a UFont) 更多...
 
bool HasValidFont () const
 Check to see whether this font info has a valid composite font pointer set (either directly or via a UFont)
 

Public 属性

TSharedPtr< const FCompositeFont > CompositeFont
 The composite font data to use (valid when used with a Slate style set in C++)
 
EFontFallback FontFallback
 The font fallback level. 更多...
 
UObject * FontMaterial
 The material to use when rendering this font
 
const UObject * FontObject
 The font object (valid when used from UMG or a Slate widget style asset)
 
int32 LetterSpacing = 0
 The uniform spacing (or tracking) between all characters in the text.
 
FFontOutlineSettings OutlineSettings
 Settings for applying an outline to a font
 
int32 Size
 The font size is a measure in point values. 更多...
 
FName TypefaceFontName
 The name of the font to use from the default typeface (None will use the first entry)
 

友元

uint32 GetTypeHash (const FSlateFontInfo &FontInfo)
 Calculates a type hash value for a font info. 更多...
 

详细描述

A representation of a font in Slate.

构造及析构函数说明

◆ FSlateFontInfo() [1/6]

FSlateFontInfo::FSlateFontInfo ( TSharedPtr< const FCompositeFont >  InCompositeFont,
const int32  InSize,
const FName &  InTypefaceFontName = NAME_None,
const FFontOutlineSettings &  InOutlineSettings = FFontOutlineSettings() 
)

Creates and initializes a new instance with the specified font, size, and emphasis.

参数
InCompositeFontThe font instance to use.
InSizeThe size of the font.
InTypefaceFontNameThe name of the font to use from the default typeface (None will use the first entry)

◆ FSlateFontInfo() [2/6]

FSlateFontInfo::FSlateFontInfo ( const UObject *  InFontObject,
const int32  InSize,
const FName &  InTypefaceFontName = NAME_None,
const FFontOutlineSettings &  InOutlineSettings = FFontOutlineSettings() 
)

Creates and initializes a new instance with the specified font, size, and emphasis.

参数
InFontObjectThe font instance to use.
InSizeThe size of the font.
InFamilyFontNameThe name of the font to use from the default typeface (None will use the first entry)

◆ FSlateFontInfo() [3/6]

FSlateFontInfo::FSlateFontInfo ( const FString &  InFontName,
uint16  InSize,
EFontHinting  InHinting = EFontHinting::Default,
const FFontOutlineSettings &  InOutlineSettings = FFontOutlineSettings() 
)

DEPRECATED - Creates and initializes a new instance with the specified font name and size.

参数
InFontNameThe name of the font.
InSizeThe size of the font.
InHintingThe type of hinting to use for the font.

◆ FSlateFontInfo() [4/6]

FSlateFontInfo::FSlateFontInfo ( const FName &  InFontName,
uint16  InSize,
EFontHinting  InHinting = EFontHinting::Default 
)

DEPRECATED - Creates and initializes a new instance with the specified font name and size.

参数
InFontNameThe name of the font.
InSizeThe size of the font.
InHintingThe type of hinting to use for the font.

◆ FSlateFontInfo() [5/6]

FSlateFontInfo::FSlateFontInfo ( const ANSICHAR *  InFontName,
uint16  InSize,
EFontHinting  InHinting = EFontHinting::Default 
)

DEPRECATED - Creates and initializes a new instance with the specified font name and size.

参数
InFontNameThe name of the font.
InSizeThe size of the font.
InHintingThe type of hinting to use for the font.

◆ FSlateFontInfo() [6/6]

FSlateFontInfo::FSlateFontInfo ( const WIDECHAR *  InFontName,
uint16  InSize,
EFontHinting  InHinting = EFontHinting::Default 
)

DEPRECATED - Creates and initializes a new instance with the specified font name and size.

参数
InFontNameThe name of the font.
InSizeThe size of the font.
InHintingThe type of hinting to use for the font.

成员函数说明

◆ GetCompositeFont()

const FCompositeFont * FSlateFontInfo::GetCompositeFont ( ) const

Get the composite font pointer associated with this font info (either directly or via a UFont)

注解
This function will return the fallback font if this font info itself does not contain a valid font. If you want to test whether this font info is empty, use HasValidFont

友元及相关函数文档

◆ GetTypeHash

uint32 GetTypeHash ( const FSlateFontInfo &  FontInfo)
friend

Calculates a type hash value for a font info.

Type hashes are used in certain collection types, such as TMap.

参数
FontInfoThe font info to calculate the hash for.
返回
The hash value.

类成员变量说明

◆ FontFallback

EFontFallback FSlateFontInfo::FontFallback

The font fallback level.

Runtime only, don't set on shared FSlateFontInfo, as it may change the font elsewhere (make a copy).

◆ Size

int32 FSlateFontInfo::Size

The font size is a measure in point values.

The conversion of points to Slate Units is done at 96 dpi. So if you're using a tool like Photoshop to prototype layouts and UI mock ups, be sure to change the default dpi measurements from 72 dpi to 96 dpi.


该结构体的文档由以下文件生成: