mirror of
https://github.com/wez/wezterm.git
synced 2024-12-24 22:01:47 +03:00
fix black pixel "halo"
Need to only set alpha to 1 if the pixel is not transparent closes: #1110
This commit is contained in:
parent
05fc55a128
commit
3f212012f2
@ -134,7 +134,7 @@ impl FreeTypeRasterizer {
|
||||
rgba[dest_offset + (x * 4)] = gray;
|
||||
rgba[dest_offset + (x * 4) + 1] = gray;
|
||||
rgba[dest_offset + (x * 4) + 2] = gray;
|
||||
rgba[dest_offset + (x * 4) + 3] = 0xff;
|
||||
rgba[dest_offset + (x * 4) + 3] = if gray == 0 { 0 } else { 0xff };
|
||||
}
|
||||
}
|
||||
RasterizedGlyph {
|
||||
@ -177,7 +177,7 @@ impl FreeTypeRasterizer {
|
||||
rgba[dest_offset + (x * 4)] = red;
|
||||
rgba[dest_offset + (x * 4) + 1] = green;
|
||||
rgba[dest_offset + (x * 4) + 2] = blue;
|
||||
rgba[dest_offset + (x * 4) + 3] = 0xff;
|
||||
rgba[dest_offset + (x * 4) + 3] = if red | green | blue == 0 { 0 } else { 0xff };
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user