vboot/screens: Add handling for unprintable character to draw_text()

This patch enhances draw_text() to better handle unavailable (e.g.
unprintable) characters (by drawing a '?' rather than stopping with the
whole string right then and there). Pull the width measurement into
get_char_image_filename() since all callers need to do that anyway, and
also change the signature so that the function is no longer expected to
sprintf() into a string buffer it doesn't know the length of.

TEST=with other patches

Change-Id: Ic4257548bfa045e34860a4b4193492a343572ca1
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1496904
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Mathew King <mathewk@chromium.org>
1 file changed