Skip to content

Instantly share code, notes, and snippets.

@EJTH
Last active November 22, 2017 16:30
Show Gist options
  • Save EJTH/faf4aadba1a67f5b513efd48d991df87 to your computer and use it in GitHub Desktop.
Save EJTH/faf4aadba1a67f5b513efd48d991df87 to your computer and use it in GitHub Desktop.
For making vaporwave UTF8 text.
// Fonts: Either a string containing s single letter "A" from the utf code space you want to use or a number for one of these code spaces:
// 0 ๐€๐๐‚๐ƒ๐„๐…๐†๐‡๐ˆ๐‰๐Š๐‹๐Œ๐๐Ž๐๐๐‘๐’๐“๐”๐•๐—๐˜๐™
// 1 ๐ด๐ต๐ถ๐ท๐ธ๐น๐บ๐ป๐ผ๐ฝ๐พ๐ฟ๐‘€๐‘๐‘‚๐‘ƒ๐‘„๐‘…๐‘†๐‘‡๐‘ˆ๐‘‰๐‘‹๐‘Œ๐‘
// 2 ๐‘จ๐‘ฉ๐‘ช๐‘ซ๐‘ฌ๐‘ญ๐‘ฎ๐‘ฏ๐‘ฐ๐‘ฑ๐‘ฒ๐‘ณ๐‘ด๐‘ต๐‘ถ๐‘ท๐‘ธ๐‘น๐‘บ๐‘ป๐‘ผ๐‘ฝ๐‘ฟ๐’€๐’
// 3 ๐“๐“‘๐“’๐““๐“”๐“•๐“–๐“—๐“˜๐“™๐“š๐“›๐“œ๐“๐“ž๐“Ÿ๐“ ๐“ก๐“ข๐“ฃ๐“ค๐“ฅ๐“ง๐“จ๐“ฉ
// 4 ๐•ฌ๐•ญ๐•ฎ๐•ฏ๐•ฐ๐•ฑ๐•ฒ๐•ณ๐•ด๐•ต๐•ถ๐•ท๐•ธ๐•น๐•บ๐•ป๐•ผ๐•ฝ๐•พ๐•ฟ๐–€๐–๐–ƒ๐–„๐–…
// 5 ๐– ๐–ก๐–ข๐–ฃ๐–ค๐–ฅ๐–ฆ๐–ง๐–จ๐–ฉ๐–ช๐–ซ๐–ฌ๐–ญ๐–ฎ๐–ฏ๐–ฐ๐–ฑ๐–ฒ๐–ณ๐–ด๐–ต๐–ท๐–ธ๐–น
// 6 ๐—”๐—•๐—–๐——๐—˜๐—™๐—š๐—›๐—œ๐—๐—ž๐—Ÿ๐— ๐—ก๐—ข๐—ฃ๐—ค๐—ฅ๐—ฆ๐—ง๐—จ๐—ฉ๐—ซ๐—ฌ๐—ญ
// 7 ๐˜ˆ๐˜‰๐˜Š๐˜‹๐˜Œ๐˜๐˜Ž๐˜๐˜๐˜‘๐˜’๐˜“๐˜”๐˜•๐˜–๐˜—๐˜˜๐˜™๐˜š๐˜›๐˜œ๐˜๐˜Ÿ๐˜ ๐˜ก
// 8 ๐˜ผ๐˜ฝ๐˜พ๐˜ฟ๐™€๐™๐™‚๐™ƒ๐™„๐™…๐™†๐™‡๐™ˆ๐™‰๐™Š๐™‹๐™Œ๐™๐™Ž๐™๐™๐™‘๐™“๐™”๐™•
// 9 ๐™ฐ๐™ฑ๐™ฒ๐™ณ๐™ด๐™ต๐™ถ๐™ท๐™ธ๐™น๐™บ๐™ป๐™ผ๐™ฝ๐™พ๐™ฟ๐š€๐š๐š‚๐šƒ๐š„๐š…๐š‡๐šˆ๐š‰
// 10 ๏ฝ๏ฝ‚๏ฝƒ๏ฝ„๏ฝ…๏ฝ†๏ฝ‡๏ฝˆ๏ฝ‰๏ฝŠ๏ฝ‹๏ฝŒ๏ฝ๏ฝŽ๏ฝ๏ฝ๏ฝ‘๏ฝ’๏ฝ“๏ฝ”๏ฝ•๏ฝ–๏ฝ˜๏ฝ™๏ฝš
function coolType(font, string){
if(typeof font === "number"){
font = "๐€ ๐ด ๐‘จ ๐“ ๐•ฌ ๐–  ๐—” ๐˜ˆ ๐˜ผ ๐™ฐ ๏ฝ".split(" ")[font];
}
string = string.toUpperCase();
var cp = font.codePointAt(0);
var a = 65;
var s = "";
string.split("").forEach(function(c){
var cc = c.charCodeAt(0);
if(cc < 65 || cc > 65+26) s += c;
else s += String.fromCodePoint(cp + (c.charCodeAt(0) - a));
});
return s;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment