Skip to content
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

kerning lost #66

Open
alejandromizraji opened this issue Mar 17, 2021 · 4 comments
Open

kerning lost #66

alejandromizraji opened this issue Mar 17, 2021 · 4 comments

Comments

@alejandromizraji
Copy link

Hi, I noticed that kerning is lost when the words are split into characters. is there any way to address that?

Thank you!

@sahejsahni
Copy link

I'm noticing this too. Are we doing something wrong?

@lukethacoder
Copy link

Kerning should be maintained, but may need to be set again if its not playing nice

<h2 id="get-started" class="words chars splitting" style="--word-total: 3; --char-total: 11" data-scroll="in">
  <span class="word" data-word="Get" style="--word-index: 1">
    <span class="char" data-char="G" style="--char-index: 1">G</span>
    <span class="char" data-char="e" style="--char-index: 2">e</span>
    <span class="char" data-char="t" style="--char-index: 3">t</span>
  </span>
  <span class="whitespace"></span>
  <span class="word" data-word="Started" style="--word-index: 2">
    <span class="char" data-char="S" style="--char-index: 4">S</span>
    <span class="char" data-char="t" style="--char-index: 5">t</span>
    <span class="char" data-char="a" style="--char-index: 6">a</span>
    <span class="char" data-char="r" style="--char-index: 7">r</span>
    <span class="char" data-char="t" style="--char-index: 8">t</span>
    <span class="char" data-char="e" style="--char-index: 9">e</span>
    <span class="char" data-char="d" style="--char-index: 10">d</span>
  </span>
</h2>

above taken from the Splitting docs site. Adjusting the letter-spacing via the browser inspector seems to do the trick.

#get-started {
    letter-spacing: 4px;
}

@qinyiyao
Copy link

qinyiyao commented May 8, 2021

Adjusting letter spacing didn’t work. The kerning issue is visible in all demos on CodePen, or anywhere, if you use the more problematic letter pairings.

This issue is also observable in GreenSocks SplitText. I guess there’s no way around this other than just use a monospaced font or use word splitting, which still will not deal with the space between words.

Screen Shot

https://codepen.io/qinyiyao/pen/mdWyvJX

@MonliH
Copy link

MonliH commented Oct 23, 2022

Yes, I cannot emphasize how much of a dealbreaker this is!
For anyone running into the same problem, I found https://codepen.io/rachsmith/post/how-to-animate-individual-letters-with-the-correct-kerning to be very helpful! It kind of sucks for performance though :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants