!752 sS fontID = "#1004569"; // "Ticketing" static float fontSize = 30f; static int tooLong = 60; // << glyphs with that many unicode chars assigned are usually just empty boxes sclass Glyph { BWImage img; new StringBuilder chars; } static Map map = litorderedmap(); // key = md5 static BWImage img; p { setConsoleDelay(2000); // saves time, 14 instead of 21s long time = now(); for (int uc = 0; uc <= 0xFFFF; uc++) { print(intToHex(uc) + " " + l(map)); BufferedImage bufImg = renderText(fontID, fontSize, str((char) uc)); if (bufImg == null) continue; BWImage img = new BWImage(bufImg); S md5 = md5OfBWImage(img); Glyph g = map.get(md5); if (g == null) { map.put(md5, g = new Glyph); g.img = img; } g.chars.append((char) uc); } done_always(time, "Got " + l(map) + " different glyphs!"); time = now(); /*Glyph longest = (Glyph) highest(makeMap( func(Glyph g) { l(g.chars) }, values(map)));*/ new L images; for (Glyph g : values(map)) { //S title = g == longest ? "the rest" S title = l(g.chars) > tooLong ? "...." : formatCharRange(str(g.chars)); print(title); images.add(subtitle(g.img, title)); } img = clusterImages(images); done_always(time, "Making glyph image (" + img.getWidth() + "/" + img.getHeight() + ")"); final S title = "Glyph Sheet For Font " + quote(getSnippetTitle(fontID)) + " (" + fsi(fontID) + ") Size " + fontSize; addToWindow(showBWImage(title, img), jbutton("Upload", r { messageBox(uploadImage(title, toPNG(img.getBufferedImage()))); })); }