Fix rendering of non-integer height fonts.

This commit is contained in:
Stefan `Sec` Zehl 2011-05-12 14:07:54 +02:00
parent 0f525a87f9
commit a118098eae
1 changed files with 11 additions and 3 deletions

View File

@ -55,14 +55,22 @@ int DoChar(int sx, int sy, char c){
/* multiple 8-bit-lines */ /* multiple 8-bit-lines */
for(y=0;y<=height;y++){ for(y=0;y<=height;y++){
mask=255; // XXX: Fixme int m=yoff+font->u8Height-8*y;
if(m>8)m=8;
if(m<0)m=0;
mask=255<<(8-m);
if(y==0){ if(y==0){
mask=mask>>(yoff); mask=mask>>(yoff);
} else if(y==height){ } else if(y==height){
mask=mask<<((8-(font->u8Height%8))%8); // mask=mask<<((8-(font->u8Height%8))%8);
mask=mask<<(8-yoff); // mask=mask<<(8-yoff);
}; };
if(mask==0)
break;
// buffer[(rx-dmul)+(yidx+y)*RESX]=5;
if(font_direction==FONT_DIR_LTR) if(font_direction==FONT_DIR_LTR)
flip(mask); flip(mask);