backend/render: Code documentation + minor code changes.

This code isn't used yet, but the idea is to have a common code path
for resolving exactly how text is to be rendered by a frontend.