altos/draw: Add ao_text_width
[fw/altos] / src / draw / ao_draw.h
index 7f1a413cd980be8ed87d10b0dcb9fce261194996..96e334981bcf91825b564deb77e48ebca5dad558 100644 (file)
@@ -103,6 +103,14 @@ struct ao_glyph_metrics {
        int8_t  advance;
 };
 
+struct ao_text_metrics {
+       int16_t width;
+       int16_t height;
+       int16_t x_off;
+       int16_t y_off;
+       int16_t advance;
+};
+
 struct ao_font {
        const uint8_t   *bytes;
        const uint16_t  *pos;
@@ -169,6 +177,10 @@ ao_text(struct ao_bitmap   *dst,
        uint32_t                fill,
        uint8_t                 rop);
 
+int16_t
+ao_text_width(const struct ao_font     *font,
+             const char                *string);
+
 void
 ao_logo_poly(struct ao_bitmap          *dst,
             const struct ao_transform  *transform,