-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Add line-height
configuration parameter
#75
Comments
So, this is the closest I got to figuring out how hterm manages lineheight https://chromium.googlesource.com/apps/libapps/+/HEAD/hterm/js/hterm_scrollport.js#676 It does not look like line-height is part of hterm's built in prefs https://chromium.googlesource.com/apps/libapps/+/HEAD/hterm/js/hterm_preference_manager.js#105 |
Love it. Happy to review
|
Working on it, still fighting with cursor node haha |
Another reason for having a lineHeight config, fonts with powerline symbols do not get proper height by default. The arrow symbol in the screenshow below is higher than the line-height. Input Mono was used for the screenshot above. |
Current workaround is to add the following to the
YMMV UpdateThe above CSS setting will only affect the line height for |
... lineHeight doesnt work :( |
@spoike your workaround doesn't work for me, did you mean adding this to // custom css to embed in the main window
css: `
x-row > span {
line-height: 2em;
padding: 0.2em 0 0.02em 0;
}
`, Thanks for your help, I am getting to know HyperTerm and loving it |
@kartsims you're almost there. it's for |
i would love to see this too, the workarounds didn't work for me either. |
Sorry about the confusion and the late reply. The workaround is for fixing the line height of the line which is only relevant if you are using powerline symbols in your shell prompt and other terminal UI, though it won't fix the positioning of the lines (which is currently set directly on the x-row's style attribute IIRC) and they will overlap each other. I'll edit my reply above to make this clearer. |
Just to add my two cents contribution: I use FiraCode with powerline and lines were wrapped due to bad css. termCSS: `x-row > span {
line-height: 1.3em;
}
`, |
Is anyone still working on this? The |
i dont think anybody works on this, though check in the chat https://zeit-community.slack.com/messages/hyper/ I would be glad i smb will fix this |
this doesn't look like it can be fixed by hyper. it needs to be fixed by hterm, which currently doesn't support anything like a i tried my hand at a super hacky, sorta buggy plugin that achieves this: https://gitlab.com/adityavm/hyper-lineheight. its problems are listed in the readme. this is one of two methods i tried, the other one being setting the if someone is willing to continue where i left off, i can put up the other code as well. |
@adityavm yep, accurate observation. We need to improve the hterm character / line measurement logic |
Really looking forward to this -- basically the only visual annoyance I have that prevents me from switching :p |
Understood. We'll get to it. Thanks for chiming in |
For an increased line height, I am currently using a font with increased line height by default; for example: https://github.com/andreberg/Meslo-Font. (I am using Meslo LG L) I also use this to increase the line height in Xcode, and apparently it works fine in Hyper. |
Hey all, it appears that all fontSize: 16
// ...
termCSS: 'x-row {font-size:14px;}' So basically the x-row height - x-row font-size = padding between rows, AKA line-height. You'll have to let me know if that works with all your handsome prompt styles. |
@breachofmind the cursor node renders in the incorrect spot with this method |
Does anyone know what the status with this is? Is there an update coming soon, would be happy to fork and push a fix if not already in the works. |
@muyiwaolu I believe @dotcypress has been looking into this problem |
Any news on this? Thanks. |
I would like to know if there is a good solution for this as well, hyper is awesome btw. :D |
+1 😃 |
Thank you, that look cool. How can I modify all the glyphs at once? Like add some line height. |
@grafa I'm definitely not a font guru but what I did was add/remove the same amount from ascent/descent (hamburger menu -> font settings). |
100% will work.
|
{ line-height: 1.25; } specified as a pure number, which is interpreted as relative to the font size of the element. Read about it =>: Guide to using special characters in HTML: Line spacing problems |
I would love to see a solution for this as none of the things mentioned above really helped. I feel like line height is something a lot of people like to configure in terminals. |
@timneutkens The font trick (look at my prev post) works 100% cause it's font thing not the hyper term hack. |
Used hyper for the first time today and loving it... but definitely noticed the line-height. Was hoping to be able to add it to the config. |
Thought I fixed it with the above commit but ended up messing something else up. I think this is doing the trick for me now with no further issues, so maybe some other people are willing to confirm? Should work in 2.0.4: |
@Cygnusfear I just tested a few seconds ago.
Thank you :) |
Yes, I forgot to mention! It's only going to work with the new 2.0.4 release!! Glad it works! Enjoy! |
@Cygnusfear : What would it be if I use hyper on windows. Seem that config doesn't work on my box. |
Surprised this isn't a thing in |
@jesseleite |
I tried the examples in this thread above. For now I'm just going to use font-line to add line-height into the font file itself. That said, would still be nice if |
+1 on this.... Love hyper but it'd be great if I could set the lineheight without having to resort to some sort of hack. |
One year later. |
Hey everyone!!
|
I'm tracing this issue, having begun to use Fira Code with ligature support (so long Meslo, Input Mono), and changing fonts is not a valid solution for me. I suspect it's a limitation with features from |
Any solution for this? |
Sadly, no. Neither of the previous examples work, on latest canary at least. You can still change the font line-height directly to make it work, but I think thats a bit too much of a hack. |
@12luisalmeida Try to scroll this issue, just a bit ^^ |
This workaround will not work with our v2 anymore. |
What's the proper way to set line height? I see xterm 3.0 exposes an option at xtermjs/xterm.js#938 |
This should probably be closed in favor of #2850 since it targets the new Canvas renderer. |
Yes! Closed in favor of #2850 |
No description provided.
The text was updated successfully, but these errors were encountered: