Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c7f00ed authored by Dima Zavin's avatar Dima Zavin
Browse files

minui: graphics: add ability to query font size



Change-Id: I5e8f477b7b205794f2975f12e6b6010c177f6052
Signed-off-by: default avatarDima Zavin <dima@android.com>
parent c2ddaea8
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -201,6 +201,12 @@ int gr_measure(const char *s)
    return gr_font->cwidth * strlen(s);
}

void gr_font_size(int *x, int *y)
{
    *x = gr_font->cwidth;
    *y = gr_font->cheight;
}

int gr_text(int x, int y, const char *s)
{
    GGLContext *gl = gr_context;
+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ void gr_color(unsigned char r, unsigned char g, unsigned char b, unsigned char a
void gr_fill(int x, int y, int w, int h);
int gr_text(int x, int y, const char *s);
int gr_measure(const char *s);
void gr_font_size(int *x, int *y);

void gr_blit(gr_surface source, int sx, int sy, int w, int h, int dx, int dy);
unsigned int gr_get_width(gr_surface surface);