
How does the conversion work? There are four basic shape types, face silhouette, pair of eyes, nose and mouth. Each comes in 18 different styles, so I created a bunch of pixel pictures for that. The tool then combines each part into an overall face using transparency. To decide which specific style to choose for each part, the converter looks at the string entered in this way: e.g. character 1, 5, 9, 13... are added up by using their Unicode number (with thanks to Henri Sivonen’s utf8ToUnicode function), and then that number’s divided by 18 and whatever remains as remainder (i.e. modulo operation) will settle the specific face silhouette number. Then the same is repeated for the nose using character 2, 6, 10 and so on.
>> More posts
Advertisement
This site unofficially covers Google™ and more with some rights reserved. You can subscribe to the feed, email your tips and join our forum!