aboutsummaryrefslogtreecommitdiffstats
path: root/src/gdisp/mcufont/mf_scaledfont.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gdisp/mcufont/mf_scaledfont.h')
-rw-r--r--src/gdisp/mcufont/mf_scaledfont.h30
1 files changed, 30 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..f378ca67
--- /dev/null
+++ b/src/gdisp/mcufont/mf_scaledfont.h
@@ -0,0 +1,30 @@
+/*
+ * This file is subject to the terms of the GFX License. If a copy of
+ * the license was not distributed with this file, you can obtain one at:
+ *
+ * http://ugfx.org/license.html
+ */
+
+/* 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