Jump to content

Can you fake line height, but close the gap?


simona6

Recommended Posts

We are using a font called Coolvetica.  A wonderful Helvetica like font, but it has an enormous lineheight when the font is large, around 80px+.

On some cases it's fine, and the text will close in over each other, but sometimes, such as with transparency to create a gradient background, you have to increase lineheight to see all the text, with tails, such as p and and g.

Is there a way to fake the line height, but 'close in' the gap it creates?

Link to comment
Share on other sites

First photo - this is "close in", so it is tighter together, and looks better, but check out the bottom of 'g' in Design.

The second photo is how much line height I have to add, so it doesn't do it - but doesn't look as good.

So I am looking for a way around this.

Doesn't happen quite as much if there is no gradient, but it still can.  Specially on a phone.

 

1271020571_Screenshot2023-01-24at08_21_33.thumb.png.30263784f18df77df17e3265b1d6638c.png1362306131_Screenshot2023-01-24at08_21_50.thumb.png.425d768f22c02772274dee442d08c5d5.png

Link to comment
Share on other sites

Here's a great example.  I changed the 'boundaries' letter to a 'p' instead of a 'd' to show you.

The issue seems to be only even on the final line, as it sort of "cuts it off".  I think it is because I am using the gradient CSS. 

.ripple {
    background: -webkit-linear-gradient(0deg,#7521ff 20%,#33b6f1 50%,#b8ff21 80%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

If I take that off, and make it white, it all shows.  Any ideas?

ss.jpg

Link to comment
Share on other sites

try the magical span 'shroom. It works for me in edge/chrome and ff:

	<style>
.ripple {
    background: -webkit-linear-gradient(0deg,#7521ff 20%,#33b6f1 50%,#b8ff21 80%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.see { width: 400px; font-family: coolvetica; font-size: 6em; line-height: 0.8em; box-sizing: content-box; }
</style>
<div class="see"><span class="ripple">Big time hosting<wbr> Low cost design</span></div>
<br>
<div>
<div class="see"><span class="ripple">Big time hosting</span></div>
<div class="see"><span class="ripple">Low cost design</span></div>
</div>
	

and you should still be able to adjust the line height

*warning: calculated line-height adjustments may also need to be added to parent elements in certain cases

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.