An introduction. My teacher from university is kind of weird. She wants all essays handwritten by students and this is is a bit exaggerated given the fact the we live in computers era. I created a font family that resembles my handwriting and saved is as .ttf and installed it on windows and use it in word. It doesn’t seem convincing, so I was wondering: If I create 100 ttf each with slight variations of a letter, is there a way in word, when you type a letter, to chose randomly from those 100 ttf files to make the writing seem more organic, because I’m not a callighraphist, I can’t write a letter twice exactly the same way, so a slight variation would make it more convincing.
If it is not possible I have a way using HTML + JS:
document.getElementById("randomize").disabled=true;
function setupFonts(){
var handwritten = document.getElementsByTagName("handwritten")[0];
var raw_text = handwritten.innerHTML; //no tags in handwritten tag body
var taggedText = "";
var fontTag = "</font><font>";
for(var i = 0; i < raw_text.length;i++){
if((/[a-zA-Z]/).test(raw_text.charAt(i))){
taggedText = taggedText.concat("<font>", raw_text.charAt(i), "</font>");
}
else{
taggedText = taggedText.concat(raw_text.charAt(i));
}
}
handwritten.innerHTML = taggedText;
document.getElementById("randomize").disabled=false;
}
function randomizeFonts(){
var fontNames = ['Arial', 'Verdana', 'Consolas']; //here will be listed the variations
var fontsArray = document.getElementsByTagName("font");
for(var i = 0; i < fontsArray.length;i++){
fontsArray[i].setAttribute("face", fontNames[Math.floor(Math.random()*fontNames.length)]);
}
}
<html>
<body>
<!-- Just 1 handwritten tag allowen on a page -->
<handwritten>
This is a sentence handwritten.
</handwritten>
<br>
<button id="setup" onclick="setupFonts()">Setup Fonts</button>
<button id="randomize" onclick="randomizeFonts()">Randomize Fonts</button>
</body>
<html>
It works, however if this is possible in word it would be better.