The rendering type of the of the Font
instance.
Values
BitmapFont
A simple raster bitmap font.
SignedDistanceField(channel:SDFChannel, alphaCutoff:Float, smoothing:Float)
A Signed Distance Field font data. Each glyph pixel contains the distance to the closest glyph edge instead of actual color.
To render an SDF font, Text
utilizes h3d.shader.SignedDistanceField
shader to produce smoothed and scalable text.
Because shader expects texture to use bilinear filtering, Text automatically enables Drawable.smooth
on itself.
See Text manual and libgdx wiki for more details.
Parameters:
channel | The channel that serves as distance data source. |
---|---|
alphaCutoff | The distance value that is considered to be the edge. Usually should be 0.5. |
smoothing | The smoothing of edge. Lower value lead to sharper edges. Value of -1 sets it to automatic. |