Skip to content

Instantly share code, notes, and snippets.

@rahatarmanahmed
Created November 10, 2013 07:00
Show Gist options
  • Save rahatarmanahmed/7394814 to your computer and use it in GitHub Desktop.
Save rahatarmanahmed/7394814 to your computer and use it in GitHub Desktop.
A function that converts text to fullwidth unicode
var fancyUnicode = function (a) {
return String.fromCharCode.apply(this, a.split('').map(function (b) {
return (b===' ') ? 12288 : ((b.charCodeAt(0) > 32 && b.charCodeAt(0) < 127) ? b.charCodeAt(0) + 65248 : b);
}));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment