Xterm.js: Support lineHeight in DOM renderer

Created on 18 Sep 2018  路  5Comments  路  Source: xtermjs/xterm.js

The line height configuration is only supported in the canvas renderer (as of 3.6.0).
pointer: https://github.com/xtermjs/xterm.js/blob/e736f1223f5c42eb1b0674050ae55184f2215806/src/renderer/dom/DomRenderer.ts#L53

I thought I had seen an issue for this already but wasn't able to find it now.

arerenderer good first issue help wanted typenhancement

All 5 comments

I don't think there's an issue but there's a comment calling this out.

https://github.com/xtermjs/xterm.js/blob/e736f1223f5c42eb1b0674050ae55184f2215806/typings/xterm.d.ts#L152

Open to PRs.

You can see how this used to be handled by looking at the old DOM renderer in https://github.com/xtermjs/xterm.js/pull/938

Hello @Tyriar, I would like to tackle this one, is it just a matter of using lineHeight from options inside DomRenderer.ts and defaulting to normal otherwise?

@leomoty great!

We want it to act like line height in the canvas renderer, which is used here:

https://github.com/xtermjs/xterm.js/blob/e7ae4be394d67ef0ca1b4f41e5251b42b9630999/src/renderer/Renderer.ts#L222-L230

Also the value is always set so you don't need to worry about using normal:

https://github.com/xtermjs/xterm.js/blob/e7ae4be394d67ef0ca1b4f41e5251b42b9630999/src/Terminal.ts#L94

You can see how we used to do it by looking at src/Renderer.ts in this PR:

https://github.com/xtermjs/xterm.js/pull/938

@Tyriar this can be closed :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Tyriar picture Tyriar  路  4Comments

chris-tse picture chris-tse  路  4Comments

LB-J picture LB-J  路  3Comments

zhangjie2012 picture zhangjie2012  路  3Comments

tandatle picture tandatle  路  3Comments