Jump to content

ttf letter-spacing


Recommended Posts

  • 9 months later...

I know this is an old post but it's still relevant, so here is a little trick I came with if you want something simpler. What I'm doing is taking my original text string and adding hair spaces in between the letters. It might not work for all fonts but it works great with the one I'm using. You can make the letters move further apart by using more hair spaces, em spaces, or another type of space. I copied and pasted from https://www.cs.tut.fi/~jkorpela/chars/spaces.html.

var charCopy = '';for (var c = 0; c < chars.length; c++) {	charCopy += chars.charAt(c) + ' '; // hair space}chars = charCopy.substr(0, charCopy.length - 1);
Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...