Fix error: conversion from ‘int’ to ‘uchar’ {aka ‘unsigned char’} #120879

Closed
Giang-Chaebol wants to merge 1 commits from Giang-Chaebol/blender:FixConversionBlfGlyph into blender-v4.1-release

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 1 additions and 1 deletions

View File

@ -303,7 +303,7 @@ static GlyphBLF *blf_glyph_cache_add_glyph(FontBLF *font,
for (int i = 0; i < buffer_size; i++) {
#ifdef BLF_GAMMA_CORRECT_GLYPHS
/* Convert coverage amounts to perceptually-improved lightness values. */
g->bitmap[i] = blf_glyph_gamma(glyph->bitmap.buffer[i] * scale);
g->bitmap[i] = blf_glyph_gamma(char(glyph->bitmap.buffer[i] * scale));
#else
g->bitmap[i] = glyph->bitmap.buffer[i] * scale;
#endif /* BLF_GAMMA_CORRECT_GLYPHS */