currently i've used conditional headers (eg. "# Title" or "### Title") in JSON data structures, calculated by the character length and trial-and-error, then queried by a DB resource on page load.
what would be cool is an option to say, for instance, "make this text as small as it needs to be to fit everything without wrapping, down to a minimum of 8px"