Merge branch 'fix-alpha-for-overlapping-glyphs' of ssh://github.com/ZachNagengast/Pillow into fix-alpha-for-overlapping-glyphs

This commit is contained in:
ZachNagengast 2023-11-06 21:11:36 -08:00
commit 8ecf2e9f30

View File

@ -1080,7 +1080,7 @@ font_render(FontObject *self, PyObject *args) {
int out_alpha = CLIP8(src_alpha + MULDIV255(target[k * 4 + 3], (255 - src_alpha), tmp)); int out_alpha = CLIP8(src_alpha + MULDIV255(target[k * 4 + 3], (255 - src_alpha), tmp));
target[k * 4 + 3] = out_alpha; target[k * 4 + 3] = out_alpha;
} else { } else {
/* paste source directly to BGRa */ /* paste unpremultiplied RGBA values */
target[k * 4 + 0] = src_blu; target[k * 4 + 0] = src_blu;
target[k * 4 + 1] = src_grn; target[k * 4 + 1] = src_grn;
target[k * 4 + 2] = src_red; target[k * 4 + 2] = src_red;