Fix force transparent foreground colors to be opaque

This commit is contained in:
dennnnny
2023-08-13 17:52:49 +08:00
parent fb7349bc87
commit bef87403db
2 changed files with 3 additions and 2 deletions
+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 || (inverse && !color.isOpaque(this._config.colors.foreground))) {
if (this._config.allowTransparency) {
// 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.