It is a Torah prohibition to write two letters on Shabbat, and a rabbinic prohibition to write one letter. The same is true of erasing. One may open a sefer whose letters appear on the edges of the pages, use a faucet attached to a digital water meter, and cut a cake that has letters on it. From the booklet of Rabbi David Shalom Naki, shlit"a.