roff was the first Unix text-formatting computer program, the most important application run on the first machine specifically purchased to run UNIX, and a predecessor of the nroff and troff document processing systems.
It was a Unix version of the runoff text-formatting program from Multics, which was a descendant of RUNOFF for CTSS (the first computerized text-formatting application).
The first UNIX version was a transliteration of the BCPL version of runoff into PDP-7 assembly, for the prototype UNIX on the PDP-7, circa 1970. When the first PDP-11 was acquired for UNIX in late 1970 (a PDP-11/20), the justification cited to management for the funding required was that it was to be used as a word processing system, and so roff was quickly transliterated again, into PDP-11 assembly, in 1971.
Dennis Ritchie notes that the ability to rapidly modify roff (because it was locally written software) to provide special features needed by the Bell Labs Patent department was an important factor in leading to the adoption of UNIX by the Patent department to fill their word processing needs. This in turn gave UNIX enough credibility inside Bell Labs to secure the funding to purchase one of the first PDP-11/45s produced; it was on that machine that UNIX evolved into the system that later took the computer science world by storm.