Jump to content

Allow adjustment of search box text's line height


Zenn

Recommended Posts

Currently Alfred does not allow adjustment of line height, so for some font, the text cannot be vertically centered, as can be seen in the screenshot. I marked two red lines on the screenshot. The texts are sinked to the bottom. This gives me strong OCD issues 😅 I hope some how we can fix this!

CleanShot 2021-12-04 at 18.24.47@2x.png

Link to comment
Share on other sites

Welcome @Zenn,

 

Look at your caret (the vertical bar) and you’ll see the extra space you don’t want is taken by it. Line height is set in the font and Alfred shouldn’t interfere with it or other font features.


Alfred does allow changing the padding around that height, though not individually—it changes the top and bottom by the same amount. However, it also allows changing the spacing between the input and search results. Because your theme doesn’t visually differentiate between the two, changing this value is essentially the same as changing the bottom padding and will allow you the result you seek.

 

ZxGksOx.png

Link to comment
Share on other sites

@vitor First thank you answering my question.

 

I don't think line-height should be considered an intrinsic property of the font, as it is part of CSS as well as iOS font styling.

 

The Alfred screenshot alone might not be persuasive enough, let me compare the Alfred font line height, with the Spotlight font line height.

 

1850957288_CleanShot2021-12-10at23_55.16@2x.thumb.png.5c8d7a1b90925afecd16be9cc8226526.png581262630_CleanShot2021-12-10at23_52.23@2x.thumb.png.593c4a6c104ebe3fe96f2b7b7d3c1312.png

 

As you can see, Apple's Spotlight controls the line-height, such that the search box can look very compact.

 

Although adjusting the bottom spacing would Allow the search box to be vertically centered, it would make the box super tall, which is not visually pleasant either.

 

Edited by Zenn
Link to comment
Share on other sites

4 hours ago, Zenn said:

I don't think line-height should be considered an intrinsic property of the font, as it is part of CSS as well as iOS font styling.

 

I should’ve used the correct terminology before. Line height is formally known as leading. It controls the distance between lines, not the font’s height (which is what influences the caret). That you shouldn’t touch and you can’t mess with it with CSS unless you use scale to distort the characters. Font height is the purview of the typeface designer and has been an intrinsic part of typography from the times we manually arranged metal blocks and rolled them with ink.

 

But I agree your caret looks abnormally large. You’re using the System font, right? I tested it on my machine and the caret doesn’t look as tall as yours. Could you share your theme?

Link to comment
Share on other sites

 

6 hours ago, vitor said:

 

I should’ve used the correct terminology before. Line height is formally known as leading. It controls the distance between lines, not the font’s height (which is what influences the caret). That you shouldn’t touch and you can’t mess with it with CSS unless you use scale to distort the characters. Font height is the purview of the typeface designer and has been an intrinsic part of typography from the times we manually arranged metal blocks and rolled them with ink.

 

But I agree your caret looks abnormally large. You’re using the System font, right? I tested it on my machine and the caret doesn’t look as tall as yours. Could you share your theme?

 

Thanks for the explanation Victor! That make sense.

 

Interestingly, I was actually using the "SF Pro Display" from Apple, instead of "System", which has that problem (but it make sense since that font is used mostly for Headings). After using the "System" option, the issue is fixed! The caret is much smaller now and fits the text box well.

Link to comment
Share on other sites

@Zenn Could you please fill in your Powerpack email address in your forum profile before asking Powerpack-specific questions? This is only visible to me as administrator and allows us to confirm your registered address.

 

Any questions, just drop me a line.

 

Cheers,
Vero

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...