Warp icon indicating copy to clipboard operation
Warp copied to clipboard

Setting the line-height

Open dominiquevilain opened this issue 2 years ago ā€¢ 7 comments

Discord username (optional)

No response

Describe the solution you'd like?

Setting the font is a must of course, but some fonts have a large x-height and others a small one. Keeping the same line-height for every font can make it challenging to read especially with large x-heights. Lines look too close to each other and the whole display looks messy. 

Iā€™d like to be able to set the amount of space between two lines of text, by setting the line-height or better, by setting some top padding and some bottom padding like in sublime-text.

Is your feature request related to a problem? Please describe.

No response

Additional context

No response

Warp Internal (ignore) - linear-label:efcea52d-0ab4-4a92-a41b-93c3e244f0a0

No response

dominiquevilain avatar May 06 '22 08:05 dominiquevilain

Duplicate of #317

dev4joel avatar May 06 '22 11:05 dev4joel

I see this as slightly different from #317 - to me, #317 is about the default values being incorrect (bug), whereas this is more focused on configurability (feature request).

vorporeal avatar May 06 '22 19:05 vorporeal

Will use this as the line height issue!

elviskahoro avatar Jul 09 '22 05:07 elviskahoro

Hey @dominiquevilain @jamespearson @nicolasbinet šŸ‘‹!

Advait from Warp here - thanks for the feature request, happy to say that we've just released it in our latest release! Please download Warp v0.2022.09.07.14.56.stable_00 for this feature.

You can head over to Settings > Appearance to configure the line height (right beside the font customization). Note that this value represents the ratio of the line height to the font size (the default is 1.2).

image

You'll then see the changes applied instantly (in my case, changing it to be a more compact 1.0 below):

image

Let us know if you have any questions or feedback on the feature! šŸ˜„

Note that we've chosen to support line height for now since we felt it was most appropriate - if you'd still like individual top/bottom padding please open a separate issue on that front.

Advait-M avatar Sep 08 '22 23:09 Advait-M

@Advait-M Downloaded it. Tested it. Spacing makes me breath :) That said when I compare with my previous iTerm theme. In warp line-height seems to impact the upper part of the text, not equally. It's visible with background colors.

Here are two screenshots of Webpack outputs with Warp & iTerm.

Warp : CleanShot 2022-09-09 at 10 42 48@2x

iTerm : CleanShot 2022-09-09 at 10 42 22@2x

nicolasbinet avatar Sep 09 '22 08:09 nicolasbinet

Ah yep @nicolasbinet - thanks for bringing that up, you've got a sharp eye šŸ˜„. This was a conscious choice we made on text spacing: within the em-box for the line, we have 80% above the baseline and 20% below the baseline. We also match the spacing in the input editor with the block grid. http://www.dalaifelinto.com/?p=1343 goes into some of the discussion around baselines for text rendering, with respect to the font ascent/descent. If you think that we should instead be centering text - feel free to open a new issue for discussion, thanks!

Advait-M avatar Sep 09 '22 11:09 Advait-M

@Advait-M personally, I'd prefer the text to be centered vertically. That said, I'm no designer. I'd like to see others share their thoughts.

nicolasbinet avatar Sep 11 '22 16:09 nicolasbinet

I'm having an issue which I believe is related to the way text spacing is being computed, so this seems like the right place for this report, but let me know if I should open a new issue instead.

The text spacing configuration in Warp appears to be messing with ASCII box drawing. For example, here's some Neovim UI which uses box drawing characters in iTerm (see the borders on completion and signature popovers, and the box drawing characters used in the status line and file explorer): image

Here's the same UI in Warp, with line height set to the default 1.2: image

Even with the line height set to 1 (which makes for really cramped reading), gaps still exist, and it also creates misalignment in the status line: image

Aside from the noticeable vertical gaps, there's also some strange horizontal collisions, like this: image

Hope this helps, please let me know if I can provide further info!

colepeters avatar Oct 07 '22 17:10 colepeters

I'm having an issue which I believe is related to the way text spacing is being computed, so this seems like the right place for this report, but let me know if I should open a new issue instead. ... Hope this helps, please let me know if I can provide further info!

Hey @colepeters - thanks for bringing this up and providing the screenshots! Hmm, this sounds somewhat similar to https://github.com/warpdotdev/Warp/issues/317 which we'd tackled in May. Since this is a bit different from being able to configure custom line heights, could you please open a new issue for this, so we don't lose track of it? Thanks!

Advait-M avatar Oct 10 '22 03:10 Advait-M

and for tracking purposes - closing this issue, pertaining to custom line heights specifically, as we've launched the feature (noted above)!

Advait-M avatar Oct 10 '22 03:10 Advait-M

@colepeters Two questions about your issue:

  1. Which font are you using?
  2. Does this reproduce in iTerm if you turn off iTerm's custom box drawing logic? (search for "box" in iTerm's advanced preferences pane, select "Yes" to use the characters from the font, then restart iTerm and see what it looks like).

vorporeal avatar Oct 10 '22 17:10 vorporeal

New issue's been opened!

@vorporeal apologies, I just caught your questions after opening the new issue, however I've replied there!

colepeters avatar Oct 10 '22 23:10 colepeters

This was a conscious choice we made on text spacing: within the em-box for the line, we have 80% above the baseline and 20% below the baseline.

Any chance this will become configurable? Settings like this butcher TUI's ā˜¹ļø

iamjaredwalters avatar Jun 01 '24 22:06 iamjaredwalters