fix character clipping as mentioned by Marcus on the mailing list on 22 june
svn-id: r23292
This commit is contained in:
parent
c673860d0e
commit
dc41d02ac7
1 changed files with 3 additions and 2 deletions
|
@ -82,11 +82,12 @@ void NewFont::drawChar(Surface *dst, byte chr, int tx, int ty, uint32 color) con
|
|||
const bitmap_t buffer = READ_UINT16(tmp);
|
||||
tmp++;
|
||||
bitmap_t mask = 0x8000;
|
||||
if (ty + y < 0 || ty + y >= dst->h)
|
||||
if (ty + desc.ascent - bby - bbh + y < 0 ||
|
||||
ty + desc.ascent - bby - bbh + y >= dst->h)
|
||||
continue;
|
||||
|
||||
for (int x = 0; x < bbw; x++, mask >>= 1) {
|
||||
if (tx + x < 0 || tx + x >= dst->w)
|
||||
if (tx + bbx + x < 0 || tx + bbx + x >= dst->w)
|
||||
continue;
|
||||
if ((buffer & mask) != 0) {
|
||||
if (dst->bytesPerPixel == 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue