libui: Properly cut off the last drawn character if necessary
This commit is contained in:
parent
c0ada40e2c
commit
98aaf1f7ff
@ -101,7 +101,7 @@ namespace ui
|
|||||||
{
|
{
|
||||||
u32 line = offset;
|
u32 line = offset;
|
||||||
int mask = 1 << (m_psf_header.width - 1);
|
int mask = 1 << (m_psf_header.width - 1);
|
||||||
for (int x = 0; x < m_psf_header.width; x++)
|
for (int x = 0; x < width; x++)
|
||||||
{
|
{
|
||||||
if (*((u32*)glyph) & mask) *(u32*)(canvas.ptr + line) = color.raw;
|
if (*((u32*)glyph) & mask) *(u32*)(canvas.ptr + line) = color.raw;
|
||||||
mask >>= 1;
|
mask >>= 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user