• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 package com.badlogic.gdx.tests;
3 
4 import com.badlogic.gdx.Gdx;
5 import com.badlogic.gdx.graphics.GL20;
6 import com.badlogic.gdx.graphics.g2d.BitmapFont;
7 import com.badlogic.gdx.graphics.g2d.SpriteBatch;
8 import com.badlogic.gdx.tests.utils.GdxTest;
9 
10 /** See <a href="https://github.com/libgdx/libgdx/issues/1315">#1315</a>
11  * @author badlogic */
12 public class UtfFontTest extends GdxTest {
13 	BitmapFont font;
14 	SpriteBatch batch;
15 
16 	@Override
create()17 	public void create () {
18 		batch = new SpriteBatch();
19 		font = new BitmapFont(Gdx.files.internal("data/utf-font.fnt"));
20 	}
21 
22 	@Override
render()23 	public void render () {
24 		Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
25 		batch.begin();
26 		font.draw(batch, "test ⌘", 29, 20);
27 		batch.end();
28 	}
29 }
30