Cream the butter and sugar together until well blended. Add the vanilla and almond extracts. Sift the flour. Very gradually add the flour to the butter mixture until you have a firm but silky dough that does not stick to your hands. If necessary, add more flour a little at a time until you’ve reached the right consistency. Chill the dough for at least an hour before rolling and shaping.
Heat the oven to 350 degrees F. Divide the dough in half. Roll each piece between sheets of waxed paper to about 1/4-inch thick. Lightly dust the dough with flour. If the dough becomes sticky, chill it for about 10 minutes. Press the dough with cookie cutters.Reroll the scraps and cut more shapes. Repeat.
Bake the cookies until they turn light brown, 10 to 12 minutes. Remove from the baking sheet and cool on a wire rack. When completely cooled, decorate.
FOR SANDWICH COOKIES: Make the dough as directed but roll it to about 1/8-inch thick. Press cookies with a 2-inch circular cutter. Using a smaller cookie cutter of the same or a different shape, cut holes in half of the 2-inch circles. (Use scraps from the holes to make a few more cookies.) Bake as directed above. When the cookies are cool, spread about 1 teaspoon ganache (see recipe) or fruit preserves on one side of a whole cookie. Press on a cookie with a cut-out center. Repeat with the rest of the cookies. Yields about 30 sandwich cookies.
FOR BAR COOKIES: Shape dough into a brick about 3-inches wide, 9 1/2 inches long, and 1 1/4-inches thick. Chill the dough for at least an hour. Cut the brick into 1/4-inch slices. Bake in a 350 degrees F oven until golden brown, about 12 to 15 minutes. Yields about 40 cookies.
VARIATIONS: For a nutty flavor, omit the almond extract and add 1 cup of toasted chopped hazelnuts to the dough. For a cardamom-flavored cookie, omit the almond extract and add 1/2 teaspoon ground cardamom to the dough. This tastes great paired with orange marmalade in a cookie sandwich (as described above).