From ee6f735ac7b6c3122412c09d1514b7b2f7b80141 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Wed, 17 Jul 2019 17:54:07 -0400 Subject: font_get_width(), font_get_height(): New functions --- diff --git a/src/font.c b/src/font.c index f110a23..c198943 100644 --- a/src/font.c +++ b/src/font.c @@ -54,3 +54,15 @@ font_find(const char *name) } return (struct font *) fonts[0]; } + +int +font_get_width(struct font *font) +{ + return font->desc.width; +} + +int +font_get_height(struct font *font) +{ + return font->desc.height; +} diff --git a/src/font.h b/src/font.h index cf9276a..0e22c55 100644 --- a/src/font.h +++ b/src/font.h @@ -29,4 +29,10 @@ struct font * font_find(const char *name) __attribute__((pure)); +int +font_get_width(struct font *font) __attribute__((pure)); + +int +font_get_height(struct font *font) __attribute__((pure)); + #endif /* FONT_H */ -- cgit v0.9.1