Closed
Description
When I set shadow parameters in FreeTypeFontParameter
the app crashes.
Here is a sample code:
private void createFonts() {
FreeTypeFontGenerator.setMaxTextureSize(1024);
FreeTypeFontGenerator fontGenerator = mAssetManager.get(mTextFontDesc);
FreeTypeFontGenerator.FreeTypeFontParameter fontParameter;
BitmapFont font;
fontParameter = new FreeTypeFontGenerator.FreeTypeFontParameter();
fontParameter.size = 64;
//fontParameter.shadowColor = Color.BLACK;
//fontParameter.shadowOffsetX = 6;
//fontParameter.shadowOffsetY = 6;
fontParameter.genMipMaps = true;
fontParameter.minFilter = Texture.TextureFilter.MipMapLinearNearest;
fontParameter.magFilter = Texture.TextureFilter.MipMapLinearNearest;
font = fontGenerator.generateFont(fontParameter);
font.setUseIntegerPositions(true);
mMainTitleFontStyle = new Label.LabelStyle(font, new Color(0xf9f901ff));
}
If I uncomment any of shadow
parameter GWT application crashes with the following error:
Error: java.lang.RuntimeException: java.lang.ClassCastException
.
I'm really confused about that.. what could be the cause?