-
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 config option #2858
Conversation
Awesome! Thank you! I'll merge it ASAP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me 👍
lib/components/term.js
Outdated
const fontSizeChanged = this.props.fontSize !== nextProps.fontSize; | ||
const fontFamilyChanged = this.props.fontFamily !== nextProps.fontFamily; | ||
const lineHeightChanged = this.props.lineHeight !== nextProps.lineHeight; | ||
if (fontSizeChanged || fontFamilyChanged || lineHeightChanged) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that storing comparison result in temp vars is not necessary.
These comparisons don't need some explanation with explicit variable names. And without these temporary variables, comparisons will be done only if previous one is invalid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome thank you
I've built the canary build and this is working really well. Thanks for the hard work @bdougherty! |
@chabou I prefer to keep the cursor size unchanged. Do you think it's reasonable to make it configurable? |
Love the cursor size, how lines look like with background highlighting, etc. Great implementation! I can stop using my line height patched font now 😬Thank you! ❤️ |
Line height is awesome!!! |
Yall crazy, love the tall cursor. Wouldn't a shorter cursor look funny next to background highlighted text? |
we could default cursorHeight to be the same as lineHeight @jesseleite 👍 |
So has this been fixed yet, I still don't see an option to adjust line height anywhere in the latest 2.0.0 Stable build. Everything is so close together by default, and it looks terrible and makes things more difficult to read. |
No, it's not in stable yet @Azzhoe https://github.com/zeit/hyper/releases/tag/2.1.0-canary.1 |
Any update on this? When will 2.1.0 be stable? |
I tried canary.2 but I was not able to set a lineHeight below 1.0. Is this a bug or a technical limitation? I want to reduce line height because my favourite font has too much spacing. In iTerm2 I have set line height to 85% and it looks perfect. |
Add a
lineHeight
configuration parameter. Not sure if what I did is the appropriate way to check that the type is correct, so please let me know if there is a different way that it's normally done and I will update it.This will fix #75 and fix #2850.