Does anybody know of a simple script-detection algorithm (or heuristic) for font switching?
This came up with one of my clients. Suppose you have a guest book on your web site, and seven visitors left you the following inspiring messages:
Now suppose you are so touched that you want to lay out all seven messages in a PDF file, and print it out as a booklet. You have a beautiful layout template, and various complementary fonts: Latin script, Japanese, Korean, simplified Chinese, Traditional Chinese, and Greek script.
Which font to you apply to each message? More importantly, is there a simple heuristic by which software can make the choice? (More after the jump.)