Package org.newdawn.slick

Examples of org.newdawn.slick.UnicodeFont.loadGlyphs()


      f.getEffects().add(new ColorEffect());
        if (rule == 2) f.getEffects().add(new OutlineEffect(size/50, java.awt.Color.black));
        else if (rule == 1) f.getEffects().add(new ShadowEffect(java.awt.Color.gray, size/90, size/90, 0.52f));
      f.addAsciiGlyphs();
      f.setPaddingTop(f.getAscent()/2);
      f.loadGlyphs();
    } catch (SlickException e) {}
    font_index.put(size+rule+"", f);
    return f;
  }
View Full Code Here


    Log.debug(formatLoadMsg("Unicode font", key, ttfFile));
    UnicodeFont unicodeFont = new UnicodeFont(baseDir + ttfFile, fontSize,
        false, false);
    unicodeFont.getEffects().add(new ColorEffect());
    unicodeFont.addAsciiGlyphs();
    unicodeFont.loadGlyphs();
    unicodeFont.setDisplayListCaching(true);
    ResourceManager.addFont(key, unicodeFont);
  }

  private void loadSpriteSheetFont(Element element) {
View Full Code Here

        //police.getEffects().add(new ColorEffect(Color.BLACK));
        //police.getEffects().add(new ShadowEffect(Color.WHITE, 1, 1, 1));
        police.getEffects().add(new ColorEffect(Color.WHITE));
        police.getEffects().add(new OutlineEffect(1, Color.BLACK));
        police.addAsciiGlyphs();
        police.loadGlyphs();
        polices.add(police);
    }

    private static Police getInstance() throws SlickException {
        if (instance == null) {
View Full Code Here

      throws SlickException {
    String key = getKey(name, color, size);
    UnicodeFont font = new UnicodeFont(name, size, false, false);
    font.addAsciiGlyphs();
    font.getEffects().add(new ColorEffect(color));
    font.loadGlyphs();
    cache.put(key, font);
  }

  public static UnicodeFont getDefaultFont() throws SlickException {
    return getFont(DROID);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.