Fix transparent foreground color

This commit is contained in:
dennnnny
2023-08-12 08:39:39 +08:00
parent dc390ab03a
commit fb7349bc87
+1 -1
View File
@@ -277,7 +277,7 @@ export class TextureAtlas implements ITextureAtlas {
}
private _getBackgroundColor(bgColorMode: number, bgColor: number, inverse: boolean, dim: boolean): IColor {
if (this._config.allowTransparency) {
if (this._config.allowTransparency || (inverse && !color.isOpaque(this._config.colors.foreground))) {
// The background color might have some transparency, so we need to render it as fully
// transparent in the atlas. Otherwise we'd end up drawing the transparent background twice
// around the anti-aliased edges of the glyph, and it would look too dark.