Fix font rendering issue

This commit is contained in:
hax0kartik 2020-12-04 05:22:54 +05:30
parent b2e5df1854
commit 8012438573
2 changed files with 3 additions and 3 deletions

Binary file not shown.

View File

@ -2012,7 +2012,7 @@ void Image::Annotate(
if ( !bg_trans ) memset(temp_ptr, bg_bw_col, char_width);
while ( f != 0 ) {
uint64_t t = f & -f;
int idx = char_width - __builtin_ctzll(f>>2);
int idx = char_width - __builtin_ctzll(f);
*(temp_ptr + idx) = fg_bw_col;
f ^= t;
}
@ -2040,7 +2040,7 @@ void Image::Annotate(
}
while ( f != 0 ) {
uint64_t t = f & -f;
int idx = char_width - __builtin_ctzll(f >> 2);
int idx = char_width - __builtin_ctzll(f);
unsigned char *colour_ptr = temp_ptr + (idx*3);
RED_PTR_RGBA(colour_ptr) = fg_r_col;
GREEN_PTR_RGBA(colour_ptr) = fg_g_col;
@ -2068,7 +2068,7 @@ void Image::Annotate(
}
while ( f != 0 ) {
uint64_t t = f & -f;
int idx = char_width - __builtin_ctzll(f >> 2);
int idx = char_width - __builtin_ctzll(f);
*(temp_ptr + idx) = fg_rgb_col;
f ^= t;
}