Exemplo n.º 1
0
  /**
   * Create a new font based on a font definition from AngelCode's tool and the font image generated
   * from the tool.
   *
   * @param name The name to assign to the font image in the image store
   * @param fntFile The stream of the font defnition file
   * @param imgFile The stream of the font image
   * @param caching True if this font should use display list caching
   * @throws SlickException Indicates a failure to load either file
   */
  public AngelCodeFont(String name, InputStream fntFile, InputStream imgFile, boolean caching)
      throws SlickException {
    fontImage = new Image(imgFile, name, false);

    displayListCaching = caching;
    parseFnt(fntFile);
  }
Exemplo n.º 2
0
  /**
   * Create a new font based on a font definition from AngelCode's tool and the font image generated
   * from the tool.
   *
   * @param fntFile The location of the font defnition file
   * @param imgFile The location of the font image
   * @throws SlickException Indicates a failure to load either file
   */
  public AngelCodeFont(String fntFile, String imgFile) throws SlickException {
    fontImage = new Image(imgFile);

    parseFnt(ResourceLoader.getResourceAsStream(fntFile));
  }
Exemplo n.º 3
0
  /**
   * Create a new font based on a font definition from AngelCode's tool and the font image generated
   * from the tool.
   *
   * @param fntFile The location of the font defnition file
   * @param image The image to use for the font
   * @throws SlickException Indicates a failure to load either file
   */
  public AngelCodeFont(String fntFile, Image image) throws SlickException {
    fontImage = image;

    parseFnt(ResourceLoader.getResourceAsStream(fntFile));
  }
Exemplo n.º 4
0
  /**
   * Create a new font based on a font definition from AngelCode's tool and the font image generated
   * from the tool.
   *
   * @param name The name to assign to the font image in the image store
   * @param fntFile The stream of the font defnition file
   * @param imgFile The stream of the font image
   * @throws SlickException Indicates a failure to load either file
   */
  public AngelCodeFont(String name, InputStream fntFile, InputStream imgFile)
      throws SlickException {
    fontImage = new Image(imgFile, name, false);

    parseFnt(fntFile);
  }
Exemplo n.º 5
0
 /**
  * Create a new font based on a font definition from AngelCode's tool and the font image generated
  * from the tool.
  *
  * @param fntFile The location of the font defnition file
  * @param imgFile The location of the font image
  * @param caching True if this font should use display list caching
  * @throws SlickException Indicates a failure to load either file
  */
 public AngelCodeFont(String fntFile, String imgFile, boolean caching) throws SlickException {
   fontImage = new Image(imgFile);
   displayListCaching = caching;
   parseFnt(ResourceLoader.getResourceAsStream(fntFile));
 }