The two simplest ways to get frosting to harden are lowering the temperature or increasing the amount of dry ingredients. Chilling the frosting firms it temporarily. Adding dry ingredients such as sugar hardens the frosting permanently.
To harden using sugar, beat powdered sugar into the bowl of frosting until the desired consistency is met. Cornstarch may be used to harden frosting, although the overall flavor may be altered. Royal icing is frosting that sets to a hard texture. It is made by whipping egg whites or reconstituted meringue powder with powdered sugar. Royal icing must be covered at all times when it is not in use, as it hardens quickly. Meringue powder, when added to regular buttercream, creates a mild crusting effect.