Afficher la liste des polices disponible sur une machine

Author:

 list, list, java, awt
{filelink=9439}


import java.awt.*;

public class PoliceList
{
  public static void main(String[] args)
  	{
    Font[] polices;
    polices =GraphicsEnvironment.getLocalGraphicsEnvironment(  ).getAllFonts( );
    for (int i = 0; i < polices.length; i++) {
      System.out.print(polices[i].getFontName( ) + " : ");
      System.out.print(polices[i].getFamily( ) + " : ");
      System.out.print(polices[i].getName( ));
      System.out.println(  );
    }
  }
}

Leave a Reply

Your email address will not be published. Required fields are marked *