aboutsummaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers/video/font.h
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2017-07-23 16:05:47 +0300
committerMartin Roth <martinroth@google.com>2017-08-03 20:37:07 +0000
commitd85e485c5892f2d96e8c5d10828c13af154a5481 (patch)
tree38a90e1b5efaae53430068ba823ee95044262459 /payloads/libpayload/drivers/video/font.h
parent1c0b603673a3132a1554905dbcfe95c8fadb501e (diff)
libpayload: video: Add support for font scaling with a factor
This introduces support for font scaling with a factor provided via Kconfig. In practice, the font itself is not scaled at any point in memory and only the logic to determine whether a pixel should be filled or not is changed. Thus, it should not significantly impact either the access time or memory use. Change-Id: Idff210617c9ec08c6034aef107cfdb34c7cdf029 Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-on: https://review.coreboot.org/20709 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'payloads/libpayload/drivers/video/font.h')
-rw-r--r--payloads/libpayload/drivers/video/font.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/payloads/libpayload/drivers/video/font.h b/payloads/libpayload/drivers/video/font.h
index a5e0b85c02..9ea328c78d 100644
--- a/payloads/libpayload/drivers/video/font.h
+++ b/payloads/libpayload/drivers/video/font.h
@@ -34,13 +34,14 @@
extern int font_width;
extern int font_height;
+extern int font_scale;
inline int font_glyph_filled(unsigned int ch, int x, int y)
{
unsigned char *glyph = font8x16 + ((ch & 0xFF) * FONT_HEIGHT);
- return glyph[y] & (1 << x);
+ return glyph[y/font_scale] & (1 << x/font_scale);
}
-void font_init(void);
+void font_init(int width);
#endif