summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorDu Huanpeng <u74147@gmail.com>2015-11-22 20:24:49 +0800
committerSascha Hauer <s.hauer@pengutronix.de>2015-11-23 08:21:08 +0100
commitea682776db018af2d249097f1a682ef0881e3d0e (patch)
treef936fb0e5ea8378f6e55c19b8a71c0ee3288dafe /drivers/video
parent314b5402d9f90e4be4be2bbe7c0072876f70281c (diff)
downloadbarebox-ea682776db018af2d249097f1a682ef0881e3d0e.tar.gz
barebox-ea682776db018af2d249097f1a682ef0881e3d0e.tar.xz
font: fbconsole: add custom font supports
Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbconsole.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/video/fbconsole.c b/drivers/video/fbconsole.c
index 3842f63066..693c21f547 100644
--- a/drivers/video/fbconsole.c
+++ b/drivers/video/fbconsole.c
@@ -84,7 +84,7 @@ static struct rgb colors[] = {
{ 255, 255, 255 },
};
-static void drawchar(struct fbc_priv *priv, int x, int y, char c)
+static void drawchar(struct fbc_priv *priv, int x, int y, int c)
{
void *buf;
int bpp = priv->fb->bits_per_pixel >> 3;
@@ -97,7 +97,8 @@ static void drawchar(struct fbc_priv *priv, int x, int y, char c)
buf = gui_screen_render_buffer(priv->sc);
- inbuf = priv->font->data + c * priv->font->height;
+ i = find_font_index(priv->font, c);
+ inbuf = priv->font->data + i;
line_length = priv->fb->line_length;