lukePeavey / SplitType

Javascript utility that splits text into lines, words, characters for animation
https://lukepeavey.github.io/SplitType/
545 stars 39 forks source link

Option to keep certain groups of letters from splitting? (specialChars in SplitText) #79

Open chigggsy opened 5 months ago

chigggsy commented 5 months ago

If you're using ligatures and want to split by characters, an issue pops up where since each character is an individual, it won't recognise the character beside and won't be able to show in its ligature form. I've recreated the problem in a CodePen below. The solution with GSAP's SplitText plugin are prop where you can prevent certain combinations of letters from being split individually. Is there something in the Split Type library that does something similar? I couldn't find it in the docs but wondering if I've accidentally glossed over it?

Edit: Sorry forgot to post a link to the CodePen: https://codepen.io/chigggsy/pen/GRLpLRG