SHARE
TWEET

Untitled

a guest Nov 15th, 2016 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. FileHandle fontPngPath = Gdx.files.internal("font/verdana39distancefield.png");
  2. FileHandle fontFntPath = Gdx.files.internal("font/verdana39distancefield.fnt");
  3. Texture texture = new Texture(fontPngPath);
  4. texture.setFilter(TextureFilter.Linear, TextureFilter.Linear);
  5. DistanceFieldFont font = new DistanceFieldFont(fontFntPath, new TextureRegion(texture), false);
  6. font.getData().setScale(3f);
  7. // font.setDistanceFieldSmoothing(1f);
  8. skin = new Skin();
  9. skin.addRegions(new TextureAtlas(Gdx.files.internal("uiskin.atlas")));
  10. skin.add("default-font", font, BitmapFont.class);
  11. skin.load(Gdx.files.internal("uiskin.json"));
  12.        
  13. stage = new Stage(new ScreenViewport(), new SpriteBatch(5460, DistanceFieldFont.createDistanceFieldShader()));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top