+
+ /**
+ * returns the given string, truncated (preferrably at whitespace) to be at most max_width pixels long
+ */
+ std::string wrap_to_width(const std::string& text, int max_width, std::string* overflow) const;
+
+ /**
+ * returns the given string, truncated (preferrably at whitespace) to be at most max_chars characters long
+ */
+ static std::string wrap_to_chars(const std::string& text, int max_chars, std::string* overflow);
+