Navigation
API > API/Plugins > API/Plugins/AvalancheText
| Name | FAvaFont |
| Type | struct |
| Header File | /Engine/Plugins/VirtualProduction/Avalanche/Source/AvalancheText/Public/Font/AvaFont.h |
| Include Path | #include "Font/AvaFont.h" |
Syntax
USTRUCT ()
struct FAvaFont
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FAvaFont
(
UAvaFontObject* InFontObject |
This FAvaFont will be initialized using the provided UAvaFontObject | Font/AvaFont.h | |
FAvaFont () |
Default constructor: calling GetFont() right after the constructor will return the default font | Font/AvaFont.h |
Structs
| Name | Remarks |
|---|---|
| FAvaDefaultFontObjects | A struct to hold default values which we want to prevent from being GC'd |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bIsFavorite | bool | FAvaFonts can be marked as favorites by the user | Font/AvaFont.h | |
| FontAssetState | EFontAssetState | The current font asset state, used internally to track the current state of FAvaFont with respect to its referenced font asset | Font/AvaFont.h | |
| FontName | FString | Updated when MotionDesignFontObject is set. | Font/AvaFont.h | |
| MissingFontName | FString | When a font is missing and its name is available, it will be stored here. | Font/AvaFont.h | |
| MotionDesignFontObject | TObjectPtr< UAvaFontObject > | Stores the UAvaFontObject holding all the information about the font currently used by FAvaFont | Font/AvaFont.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void EnsureUsingCurrentVersion() |
Calling this function will null the now deprecated UFont CurrentFont reference, and use that UFont to initialize the currently used UAvaFontObject | Font/AvaFont.h | |
| Returns the currently stored font, or default font if none available. | Font/AvaFont.h | ||
FName GetFontName() |
Returns current font name, as FName | Font/AvaFont.h | |
FString GetFontNameAsString() |
Returns current font name as FString | Font/AvaFont.h | |
| Returns the currently stored UAvaFontObject. | Font/AvaFont.h | ||
EAvaFontSource GetFontSource() |
Returns current font source (System, Project or Invalid) | Font/AvaFont.h | |
const FString & GetMissingFontName() |
In case this FAvaFont is in fallback state, this call can return the name of the missing font asset, if available. | Font/AvaFont.h | |
bool HasValidFont () |
Checks if the currently referenced font asset is valid. | Font/AvaFont.h | |
bool IsBold() |
Returns true if font is bold | Font/AvaFont.h | |
bool IsDefaultFont () |
Checks if this FAvaFont is referencing the default font. | Font/AvaFont.h | |
bool IsFallbackFont () |
Checks if this FAvaFont is in fallback state. | Font/AvaFont.h | |
bool IsFavorite() |
Returns true if this FAvaFont is marked as favorite by the user | Font/AvaFont.h | |
bool IsItalic() |
Returns true if font is italic | Font/AvaFont.h | |
bool IsMonospaced() |
Returns true if font is monospaced | Font/AvaFont.h | |
void PostSerialize
(
const FArchive& Ar |
Called after serialization of FAvaFont. | Font/AvaFont.h | |
void SetFavorite
(
const bool bFavorite |
Mark/unmark this font as favorite | Font/AvaFont.h | |
void SetFontObject
(
UAvaFontObject* InFontObject |
Directly sets the current UAvaFontObject, and then updates this FAvaFont accordingly. | Font/AvaFont.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Checks if the specified Ava Fonts are the same | Font/AvaFont.h | ||
static FString GenerateFontFormattedString
(
const FString& InFontName, |
Returns a formatted string representing a FAvaFont for the specified FontObjectPathName and FontName Useful e.g. when setting the value of multiple FAvaFonts using IPropertyHandle->SetPerObjectValues | Font/AvaFont.h | |
static bool GenerateFontFormattedString
(
const UAvaFontObject* InFontObject, |
Returns a formatted string representing a FAvaFont for the specified UAvaFontObject Useful e.g. when setting the value of multiple FAvaFonts using IPropertyHandle->SetPerObjectValues | Font/AvaFont.h | |
static UAvaFontObject * GetDefaultAvaFontObject() |
Returns the default font object for Ava Fonts | Font/AvaFont.h | |
static UFont * GetDefaultFont () |
Returns a default font (Roboto). | Font/AvaFont.h | |
static FAvaDefaultFontObjects & GetDefaultFontObjects() |
Returns a static FAvaDefaultFontObjects struct holding defaults values for fonts | Font/AvaFont.h | |
static UFont * GetFontByName
(
const FString& InFontName |
Search for a font asset based on a font name | Font/AvaFont.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator!=
(
const FAvaFont& Other |
Font/AvaFont.h | ||
bool operator==
(
const FAvaFont& Other |
Fonts are considered equal if they share the same font and font name | Font/AvaFont.h |