aboutsummaryrefslogtreecommitdiffstats
path: root/src/gdisp/mcufont/mf_scaledfont.h
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2013-07-28 17:08:45 +1000
committerinmarket <andrewh@inmarket.com.au>2013-07-28 17:08:45 +1000
commit3977ee687ffff23e49dcac0ea9a7c3e8652248f0 (patch)
treec5be0359998987d29b6be213413c896fe4d6b07f /src/gdisp/mcufont/mf_scaledfont.h
parentf84bc2a3f6b82b0f05319fd7c609f8b30929d788 (diff)
downloaduGFX-3977ee687ffff23e49dcac0ea9a7c3e8652248f0.tar.gz
uGFX-3977ee687ffff23e49dcac0ea9a7c3e8652248f0.tar.bz2
uGFX-3977ee687ffff23e49dcac0ea9a7c3e8652248f0.zip
First cut - beautiful new font handling by PetteriAimonen
Diffstat (limited to 'src/gdisp/mcufont/mf_scaledfont.h')
-rw-r--r--src/gdisp/mcufont/mf_scaledfont.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/gdisp/mcufont/mf_scaledfont.h b/src/gdisp/mcufont/mf_scaledfont.h
new file mode 100644
index 00000000..f6607010
--- /dev/null
+++ b/src/gdisp/mcufont/mf_scaledfont.h
@@ -0,0 +1,23 @@
+/* Generate scaled (nearest-neighbor) fonts. This can be used for displaying
+ * larger text without spending the memory required for including larger fonts.
+ */
+
+#ifndef _MF_SCALEDFONT_H_
+#define _MF_SCALEDFONT_H_
+
+#include "mf_font.h"
+
+struct mf_scaledfont_s
+{
+ struct mf_font_s font;
+
+ const struct mf_font_s *basefont;
+ uint8_t x_scale;
+ uint8_t y_scale;
+};
+
+MF_EXTERN void mf_scale_font(struct mf_scaledfont_s *newfont,
+ const struct mf_font_s *basefont,
+ uint8_t x_scale, uint8_t y_scale);
+
+#endif