return fontCharacter;
}
public static FontCharacter getDistanceFieldChar(FontCharacter fontCharacter, Font font, int newPtSize, float smoothAmount) {
DistanceField distanceField = DistanceField.calculate(
fontCharacter.getBytes(),
fontCharacter.getWidth(),
fontCharacter.getHeight(),
(int) Math.ceil(smoothAmount*font.getSize2D()*0.336f), // smooth pixels length
newPtSize / font.getSize2D() // new font size
);
float resizedPerc = (distanceField.getHeight() - 2 * distanceField.getBorder()) / (float) fontCharacter.getHeight();
return new FontCharacter(
distanceField.getBytes(),
distanceField.getWidth(),
distanceField.getHeight(),
fontCharacter.getBaseline() * resizedPerc - distanceField.getBorder(),
fontCharacter.getAdvanceBefore() * resizedPerc + distanceField.getBorder(),
fontCharacter.getAdvanceAfter() * resizedPerc - distanceField.getBorder()
);
}