Declarative domain-specific language for receipt printer

What? Write a declerative domain-specific langugae (DSL) that works as a template engine for a receipt printer. Why? An old printer class is decaying beyond any recognition. What used to be pure layout code is now littered with conditionals to decide padding and formatting, even when the injected printer driver class is used to distinguish between different printers. Just clean up the printer…