fontsWithGlyphs.frink

Download or view fontsWithGlyphs.frink in plain text format

/** Locates all of the fonts that have all of the specified glyphs in the
    strings specified on the command-line. */


glyphs = "\u{12029}"   // CUNEIFORM SIGN ALAN

// Read command-line arguments if they exist instead
if length[ARGS] > 0
    glyphs = join[" ", ARGS]

ge = callJava["java.awt.GraphicsEnvironment", "getLocalGraphicsEnvironment"]
fonts = ge.getAllFonts[]

FONT:
for f = fonts
{
   for c = chars[glyphs]
      if ! f.canDisplay[c]
         next FONT
   
   println[f.getFontName[]]
}


Download or view fontsWithGlyphs.frink in plain text format


This is a program written in the programming language Frink.
For more information, view the Frink Documentation or see More Sample Frink Programs.

Alan Eliasen was born 20143 days, 11 hours, 14 minutes ago.