Merge pull request #3090 from hax0kartik/master

Fix font rendering issue
This commit is contained in:
Isaac Connor 2020-12-03 19:03:42 -05:00 committed by GitHub
commit fc6c8ac33d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;
}