a) Introduction to ‘Mochaik’ (erasing). The melacha of mochaik may be defined as the cleaning of any surface to render it suitable for writing, whether this entails erasure of existing script, removal of dirt or a smudge, or any preparation that provides a writing surface. (Examples: scraping or whiting out an ink stain from a clean sheet of writing paper, wiping a chalkboard to clean it for writing.) As a general rule, the melacha of mochaik also includes any act that reverses or undoes an act of kosaiv (writing). Examples: Erasing penciled writing to allow for corrections, whiting out penned characters in order to rewrite on that spot.
b) Tearing through letters on a food wrapper etc. The melacha of mochaik does not necessarily have to take the form of “erasing” in the familiar sense (e.g. erasing pencil writing with a pencil eraser.) Any manner of defacing or obliterating letters, words, or pictures is mochaik as well, even if the surface that remains is no more suitable for writing than before, or even if no surface remains at all. (However, these may not be the melacha mid’oraisa.) Examples: blotting out a printed page with ink, or smearing black grease over the words, tearing a food wrapper or peeling an orange through printed words or a company symbol, destroying toy letters made of plastic or wood.)
b) Cutting a cake with letters on the icing. Cutting cakes and other foods with letters or meaningful designs iced on them also presents a question of mochaik, because the cutting obviously breaks apart, and thereby destroys, the letters. Some poskim adopt a lenient attitude on this matter, particularly if the writing is made of a food or substance that would eventually dissolve in any case. It is nevertheless proper to avoid this ‘shailah’ (halachic issue) where possible, especially since these letterings are often made of icing (or other substances) which remain intact, and do not dissolve. Therefore, one should not cut or break through the letters or designs.
Permissible methods of cutting a cake with letters.
In the event that a cake with letters and pictures was decorated and prepared before Shabbos for a special occasion (e.g. Sheva Brachos, Bar Mitzvah etc.), the occasion can still be honored, as there are fully permissible methods of cutting and eating the cake: i.) One may carefully slice off each letter, picture, etc. together with some of the icing or cake beneath it. There is no need to be overly concerned if the letter inadvertently breaks apart while being removed, as this consequence would be neither intentional, nor inevitable (i.e. ‘davar she’aino miskavein’.)
ii.) If this is difficult, one may even remove the letters directly (i.e. without slicing off any cake or icing together with them.) iii.) It is also permitted to cut between the letters. The slices of cake may then be eaten even though the letters on the icing will be obliterated in the process.
(Ed. Today, upon request, some kosher bakers will make the decoration on a totally separate “icing board”, which can be removed from the top of the cake prior to cutting, thus avoiding all Shabbos issues!)
I have presented most of the material on this topic. The rest is, well… icing on the cake!