Skip to content

Instantly share code, notes, and snippets.

@rahatarmanahmed
rahatarmanahmed / gist:7394814
Created November 10, 2013 07:00
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);
}));
};