• fullscreen
  • sketch30079.pde
  • PFont myFont;
    
    float t = 0;
    int page = 0;
    // Uncomment the following two lines to see the available fonts 
    String[] fontList = PFont.list();
      
    int numfonts = fontList.length;
    
    void setup(){
      size(400, 400);  
    
    }
    
    void draw() {
      
      background(200);
      
      t = t + .01;
      
      
      String fontName = "";
    
      int yPos = 10;
        
      text("page = " + page, width -200, 10);
      
      for(int i = ( page * 10 ) ; i < ((page * 10) + 10) ; i++){
        pushStyle();
        yPos += 30;  
        
        if(i < numfonts){
          
          fontName = fontList[i];
          myFont = createFont(fontName, 32);
          textFont(myFont);
          text(fontName, 10, 40 + yPos);
          
        }
        popStyle();
        
      }
      
      if(t > 100){
         exit(); 
      }
      
    }
    
    void mousePressed(){
     page++; 
    }

    code

    tweaks (0)

    about this sketch

    This sketch is running in HTML5 using Processingjs.

    license

    advertisement

    Joshua Albert

    List available fonts

    Add to Faves Me Likey@!
    You must login/register to add this sketch to your favorites.

    See what fonts are available on the system you are using.

    Brendan Flynn
    5 Apr 2013
    such a cool cool sketch, thank you for it.
    You need to login/register to comment.