Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-ASCII text is displayed with black color #2031

Closed
hwooo opened this issue Apr 29, 2019 · 4 comments · Fixed by #2034
Closed

Non-ASCII text is displayed with black color #2031

hwooo opened this issue Apr 29, 2019 · 4 comments · Fixed by #2034
Assignees
Labels
type/bug Something is misbehaving
Milestone

Comments

@hwooo
Copy link

hwooo commented Apr 29, 2019

Details

  • Browser and browser version: Terminus (It uses xterm for terminal frontend)
  • OS version: Windows 10
  • xterm.js version: 3.13.0-beta1

Steps to reproduce

nonascii

  1. Type non-ASCII(Korean) text on Terminus terminal
  2. It is displayed with black color so it is hard to distinguish
@Eugeny
Copy link
Member

Eugeny commented Apr 29, 2019

Can confirm - xterm renders them black independently of the current color palette

@Tyriar
Copy link
Member

Tyriar commented Apr 29, 2019

This appears to be related to the canvas renderer

@Tyriar
Copy link
Member

Tyriar commented Apr 29, 2019

@jerch might have been the cell data changes?

@Tyriar Tyriar added this to the 3.13.0 milestone Apr 29, 2019
@Tyriar Tyriar added area/renderer type/bug Something is misbehaving labels Apr 29, 2019
@jerch
Copy link
Member

jerch commented Apr 29, 2019

The problematic code is:

if (cell.isInverse()) {
if (cell.isBgDefault()) {
this._ctx.fillStyle = this._colors.background.css;
} else if (cell.isBgRGB()) {
this._ctx.fillStyle = `rgb(${AttributeData.toColorRGB(cell.getBgColor()).join(',')})`;
} else {
this._ctx.fillStyle = this._colors.ansi[cell.getBgColor()].css;
}
} else if (cell.isFgRGB()) {
this._ctx.fillStyle = `rgb(${AttributeData.toColorRGB(cell.getFgColor()).join(',')})`;
} else if (cell.isFgPalette()) {
let fg = cell.getFgColor();
if (terminal.options.drawBoldTextInBrightColors && cell.isBold() && fg < 8) {
fg += 8;
}
this._ctx.fillStyle = this._colors.ansi[fg].css;
}

It misses handling of the default colors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something is misbehaving
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants