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.