/* free fonts from http://www.blambot.com/ */and some js:
@font-face {font-family: Ashcan; src: url(fonts/ashcanbb_reg.ttf);}
@font-face {font-family: Nightwatcher; src: url(fonts/NightwatcherBB.ttf);}
@font-face {font-family: sundaycomics; src: url(fonts/sundaycomicsbb_reg.ttf);}
body {font-size: 20pt; margin: 16px;}
.a { font-family: Ashcan, sans-serif; }
.b { font-family: Nightwatcher, sans-serif; }
.c { font-family: sundaycomics, sans-serif; }
var vstr=document.getElementById('mixed').firstChild.textContent.split('');So there's a way to make it work, but this isn't the way to make it pretty.
var newstr='';
var font_class_set=['a','b','c'];
for(j=0; j<vstr.length; j++) {
newstr += '<span class="'+font_class_set[Math.floor(Math.random()*3)]+'">'+vstr[j]+'</span>';
}
document.getElementById('mixed').innerHTML = newstr;
« Older Bob Dylan is 70 today.... | "It's completely unethical for... Newer »
This thread has been archived and is closed to new comments
Papyrus makes me hungry for Thai food.
posted by 2bucksplus at 5:00 PM on May 24, 2011 [4 favorites]