FStandaloneCompositeFont how to use

According to 4.6, all slate fonts(FSlateFontInfo) should be be replaced by FStandaloneCompositeFont

How ever when I add a variable like this to be HUD class,

UPROPERTY(EditAnywhere, Category = Inventory)
FStandaloneCompositeFont StacksFont;

Its show compilation error.

1>C:/Users/Srikant/Documents/Unreal Projects/SurvivalGame/Source/SurvivalGame/TestHUD.h(38): error : In TestHUD: Unrecognized type 'FStandaloneCompositeFont'

FStandaloneCompositeFont is a special version of FCompositeFont for use outside of the UObject system (such as C++ Slate style-sets). Its job is to make sure the UFontBulkData referenced by the composite font doesn’t get deleted by the GC system.

To be clear; FCompositeFont provides a definition of a font that can be used by FSlateFontInfo (either in code using a C++ Slate style-set, or via a UFont asset). It isn’t supposed to wholesale replace all usages of FSlateFontInfo.

Your use-case here looks like something that should be using a composite font, rather than defining a composite font - so in this case, FSlateFontInfo is still the correct thing to use. Viewing this property in the editor would allow you to pick a UFont asset to use as the font, and it is this asset which defines the FCompositeFont (rather than in code).

The information about replacing FSlateFontInfo with FStandaloneCompositeFont was only for C++ based Slate style-sets, not for anything else.

I hope that clears things up, but let me know if you have any other queries about it.

Ok thanks for the reply. In 4.6 the slate fonts work properly? I am not able to make my font work for some reason.

				SNew(STextBlock)
				.Font(&InvStorage->StacksFont)
				.Text(this, &SItemWidget::GetNumOfStacks)

I am doing something like this but my fonts are not changing.

Corrected replaced with
.Font(InvStorage->StacksFont)
and worked.