Using a hand mixer or a stand mixer fitted with a paddle attachment, beat the butter with sugar on medium speed until smooth and creamy, about 2 minutes.
Add cream cheese and beat until combined.
Add egg, vanilla extract, salt, almond extract, and baking powder. Beat for 1-2 minutes or until well combined. Scrape the batter from the sides of the bowl with a spatula halfway through.
Add the flour and mix at low speed until it's incorporated. Don't mix for too long. The cookie dough will be sticky.
Scrape the dough out of the bowl with a spatula and place on a large piece of plastic foil. Wrap the dough in foil, flatten it out (about 1/2-inch or 1.5 cm thick) and place in the freezer for about 15 minutes or until cold and easy to roll out. You can also chill the dough in the fridge but it will take longer (flatten it into a very thin disk and chill for about an hour or longer).
Divide the dough in half, put one half in the fridge and roll out the second half of the dough on a silicone rolling mat (or a counter) lightly sprinkled with flour into a thickness of 1/5-1/4 of an inch (5-7mm) (I like thick cookies). Cut out cookies with a heart cutter. Reroll the scraps and repeat with the remaining dough.
Place the cookies on a baking sheet lined with parchment paper.
Bake the cookies in batches at 350°F (180°C) for about 9 minutes. For the next batch use a cold baking sheet. The cookies should be pale and soft. Leave them on the baking sheet for 5 minutes then transfer to a wire rack to cool down (they need to be completely cooled before you start frosting them).