diff --git a/wezterm-font/src/rasterizer/freetype.rs b/wezterm-font/src/rasterizer/freetype.rs index 0fe9f2d6f..b195ed0a0 100644 --- a/wezterm-font/src/rasterizer/freetype.rs +++ b/wezterm-font/src/rasterizer/freetype.rs @@ -124,7 +124,6 @@ impl FreeTypeRasterizer { let dest_offset = y * width * 4; for x in 0..width { let linear_gray = data[src_offset + x]; - let gray = linear_u8_to_srgb8(linear_gray); // Texture is SRGBA, which in OpenGL means @@ -135,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] = linear_gray; + rgba[dest_offset + (x * 4) + 3] = 0xff; } } RasterizedGlyph { @@ -165,7 +164,6 @@ impl FreeTypeRasterizer { let red = data[src_offset + (x * 3)]; let green = data[src_offset + (x * 3) + 1]; let blue = data[src_offset + (x * 3) + 2]; - let alpha = red.max(green).max(blue); // Texture is SRGBA, which in OpenGL means // that the RGB values are gamma adjusted @@ -179,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] = alpha; + rgba[dest_offset + (x * 4) + 3] = 0xff; } }