We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue details
Freetype font kerning works just fine when I run my code as desktop app, I can set kerning to true or false.
But on android device setting kerning true of false makes no difference, kerning is not there either way.
Tested with 3 different phones with different Android versions, issue is always present.
Below is an example. I downloaded the latest libGDX setup App and added some freetype font words to a newly generated default project.
The font I used is OpenSans-Bold.ttf, downloaded from Google Fonts, but I have tried other fonts too.
Reproduction steps/code
package com.mygdx.game; import com.badlogic.gdx.ApplicationAdapter; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.GL20; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.BitmapFont; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator; public class MyGdxGame extends ApplicationAdapter { SpriteBatch batch; Texture img; BitmapFont font; @Override public void create () { FreeTypeFontGenerator generator = new FreeTypeFontGenerator(Gdx.files.internal("OpenSans-Bold.ttf")); FreeTypeFontGenerator.FreeTypeFontParameter parameter = new FreeTypeFontGenerator.FreeTypeFontParameter(); parameter.size = 50; parameter.color = Color.WHITE; parameter.kerning = true; font = generator.generateFont(parameter); // font size 12 pixels generator.dispose(); // don't forget to dispose to avoid memory leaks! batch = new SpriteBatch(); img = new Texture("badlogic.jpg"); } @Override public void render () { Gdx.gl.glClearColor(1, 0, 0, 1); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); batch.begin(); batch.draw(img, 0, 0); font.draw(batch, "START Yawn", 50, 460); batch.end(); } @Override public void dispose () { batch.dispose(); img.dispose(); } }
Version of LibGDX and/or relevant dependencies
Please select the affected platforms
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Issue details
Freetype font kerning works just fine when I run my code as desktop app, I can set kerning to true or false.
But on android device setting kerning true of false makes no difference, kerning is not there either way.
Tested with 3 different phones with different Android versions, issue is always present.
Below is an example. I downloaded the latest libGDX setup App and added some freetype font words to a newly generated default project.
The font I used is OpenSans-Bold.ttf, downloaded from Google Fonts, but I have tried other fonts too.
Reproduction steps/code
Version of LibGDX and/or relevant dependencies
Please select the affected platforms
The text was updated successfully, but these errors were encountered: