Once the cookies are baked and have cooled completely, prepare the royal icing.
Use the stiffer consistency of icing to outline everything, then thin the remaining icing with a bit of water so you are able to 'flood'/fill in the outlines. See Royal Icing Techniques for more detail.
Let the decorated cookies dry for at least 2 hours, or until dry to the touch