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

Use constant line-height #188

Closed
wants to merge 1 commit into from

Conversation

Tyriar
Copy link
Member

@Tyriar Tyriar commented Jul 16, 2016

Unicode characters have a constant height when using a decimal (eg. 1.2) but
can overlap which looks unattractive on some browsers that use transparent
selections (Chrome). "normal" line-height differs for CJK and other unicode
chars, only exactly pixel sized seems to work all the time.

Fixes #149

Unicode characters have a constant height when using a decimal (eg. 1.2) but
can overlap which looks unattractive on some browsers that use transparent
selections (Chrome). "normal" line-height differs for CJK and other unicode
chars, only exactly pixel sized seems to work all the time.

Fixes xtermjs#149
@parisk
Copy link
Contributor

parisk commented Jul 20, 2016

Hmmm, not sure if hardcoding font-size to px is the right way to go here. What about setting both font size and line height to 1em?

Changing this also means that we should document how different font sizes should work on xterm.js (demanding updating of both font size and line height).

@Tyriar
Copy link
Member Author

Tyriar commented Jul 20, 2016

I believe 1em translates directly to 16px, 18px just seemed to work for default font size. You can see how I handled this case in vscode here https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts#L292

@Tyriar
Copy link
Member Author

Tyriar commented Aug 2, 2016

Taking more control over row height turns out to be a pre-requisite for a virtual scrollbar as the height of rows much be known. Going to close this and handle #149 in the PR for #77

@Tyriar Tyriar closed this Aug 2, 2016
@Tyriar Tyriar deleted the 149_fix_unicode_height branch August 2, 2016 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants