// Program to draw and print all Unicode characters, // skipping those that are undefined or missing glyphs. g = new graphics fontname = "SansSerif" g.font[fontname, 1] pc = staticJava["java.awt.Font", "PLAIN"] jf = newJava["java.awt.Font", [fontname, 10, pc]] vis = new array for u = 0 to 0x1FFFF if jf.canDisplay[u] and callJava["java.lang.Character", "isDefined", u] vis.push[u] n = length[vis] println["$n glyphs found."] pagesWide = 1 pagesHigh = 6 // Find characters per row to support the specified spacing w = int[sqrt[n * (8.5 / 11) * (pagesWide/pagesHigh)]] s = 11/10 // Intercharacter spacing for c = 0 to n-1 g.text[char[vis@c], s (c mod w), s (c div w)] g.show[] g.printTiled[pagesWide, pagesHigh]