showFonts.frink

View or download showFonts.frink in plain text format


/** This program lists all of the fonts available and displays a sample of
    them as a graphic. */

g = new graphics
ge=callJava["java.awt.GraphicsEnvironment", "getLocalGraphicsEnvironment"]

y = 0
for fontname = ge.getAvailableFontFamilyNames[]
{
   g.font[fontname,1]
   g.text[fontname, 0, y]
   y = y + 1
}

g.show[]


View or download showFonts.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 17835 days, 15 hours, 40 minutes ago.