提交 51973ccc 编写于 作者: S Simon Glass

video: Support truetype fonts on a 32-bit display

At present only a 16bpp display is supported for Truetype fonts. Add
support for 32bpp also since this is quite common.
Signed-off-by: NSimon Glass <sjg@chromium.org>
Reviewed-by: NAnatolij Gustschin <agust@denx.de>
上级 4209be3e
......@@ -286,6 +286,27 @@ static int console_truetype_putc_xy(struct udevice *dev, uint x, uint y,
}
break;
}
#endif
#ifdef CONFIG_VIDEO_BPP32
case VIDEO_BPP32: {
u32 *dst = (u32 *)line + xoff;
int i;
for (i = 0; i < width; i++) {
int val = *bits;
int out;
if (vid_priv->colour_bg)
val = 255 - val;
out = val | val << 8 | val << 16;
if (vid_priv->colour_fg)
*dst++ |= out;
else
*dst++ &= out;
bits++;
}
break;
}
#endif
default:
free(data);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册