Whisk the flour, baking powder, and salt together in a medium bowl. Set aside.
In a large bowl using a handheld or a stand mixer fitted with a paddle attachment, beat the butter and sugar together on high speed until completely smooth and creamy, about 2 minutes. Add the egg, vanilla, and almond extract (if using) and beat on high speed until combined, about 1 minute. Scrape down the sides and up the bottom of the bowl and beat again as needed to combine.
Add the dry ingredients to the wet ingredients and mix on low until combined. Dough will be a bit soft. If the dough seems too soft and sticky for rolling, add 1 more Tablespoon of flour.
Divide the dough into 2 equal parts. Place each portion onto a piece of lightly floured parchment paper or a lightly floured silicone baking mat. With a lightly floured rolling pin, roll the dough out to about 1/4-inch thickness. Use more flour if the dough seems too sticky. The rolled-out dough can be any shape, as long as it is evenly 1/4-inch thick.
Lightly dust one of the rolled-out doughs with flour. Place a piece of parchment on top. (This prevents sticking.) Place the 2nd rolled-out dough on top. Cover with plastic wrap or aluminum foil, then refrigerate for at least 2 hours and up to 2 days.
Once chilled, preheat oven to 350°F (177°C). Line 2–3 large baking sheets with silicone baking mats or parchment paper. Carefully remove the top dough piece from the refrigerator. If it’s sticking to the bottom, run your hand under it to help remove it. Using a heart cookie cutter (pictured cookies use the 3.5-inch size), cut the dough into hearts. Re-roll the remaining dough and continue cutting until all is used. Repeat with 2nd piece of dough. (Note: It may not seem like a lot of dough, but you get a lot of cookies from the dough scraps you re-roll.)
Arrange cookies on baking sheets 3 inches apart. Bake for 11–12 minutes or until lightly browned around the edges. If your oven has hot spots, rotate the baking sheets halfway through bake time. Allow cookies to cool on the baking sheets for 5 minutes, then transfer to a wire rack to cool completely before decorating.
Make the icing: I have a video for how to make royal icing below. Use that as your guide for this step. Combine sifted confectioners’ sugar, meringue powder, and 9 Tablespoons of water in a large bowl. Using a hand mixer or a stand mixer fitted with a whisk attachment, beat icing ingredients together on high speed for 1.5–2 minutes. When lifting the whisk up off the icing, the icing should drizzle down and smooth out within 5–10 seconds. If it’s too thick, beat in more water 1 Tablespoon at a time. I usually need 10 Tablespoons, but on particularly dry days, I may use up to 12–14 Tablespoons. Keep in mind that the longer you beat the royal icing, the thicker it becomes. If your royal icing is too thin, just keep beating it to introduce more air OR you can add more sifted confectioners’ sugar. Yields about 3 cups of icing.
Separate icing into 6 different bowls. (Or fewer bowls, depending how many colors you want.) Stir in 1 tiny drop of the following colors into each bowl, 1 color per bowl: pink, violet, green, yellow, and orange. The 6th bowl is for the writing. For that, stir in 2–3 drops of red. You won’t use the red icing for a couple hours after the base icing sets, so place a damp paper towel directly on the surface of it. This prevents it from hardening.
Spoon or pour the pastel icings into piping bags (disposable or reusable) fitted with round piping tip #4. If you only have 1 tip and want to decorate with multiple colors of icing, keep the tip on the outside of the bag by using a coupler so you can easily transfer the piping tip to other bags of colored icing. Decorate cookies with colored icing by piping a border around the edges and then filling it. Let the icing-covered cookies mostly set, uncovered, for at least 2 hours before adding writing.
Spoon or pour the red icing into a piping bag (disposable or reusable) fitted with round piping tip #2. Write desired words/messages on the cookies (ideas/suggestions listed in the post above!). Writing icing will set within 2–3 hours.
Decorated or plain cookies stay fresh covered at room temperature for 5 days or in the refrigerator for up to 10 days.