public class DistanceFieldFont extends BitmapFont
createDistanceFieldShader()
shader.
Attention: The batch is flushed before and after each string is rendered.
BitmapFont.BitmapFontData, BitmapFont.Glyph
Constructor and Description |
---|
DistanceFieldFont(BitmapFont.BitmapFontData data,
Array<TextureRegion> pageRegions,
boolean integer) |
DistanceFieldFont(BitmapFont.BitmapFontData data,
TextureRegion region,
boolean integer) |
DistanceFieldFont(FileHandle fontFile) |
DistanceFieldFont(FileHandle fontFile,
boolean flip) |
DistanceFieldFont(FileHandle fontFile,
FileHandle imageFile,
boolean flip) |
DistanceFieldFont(FileHandle fontFile,
FileHandle imageFile,
boolean flip,
boolean integer) |
DistanceFieldFont(FileHandle fontFile,
TextureRegion region) |
DistanceFieldFont(FileHandle fontFile,
TextureRegion region,
boolean flip) |
Modifier and Type | Method and Description |
---|---|
static ShaderProgram |
createDistanceFieldShader()
Returns a new instance of the distance field shader, see https://github.com/libgdx/libgdx/wiki/Distance-field-fonts if the
u_smoothing uniform > 0.0.
|
float |
getDistanceFieldSmoothing() |
BitmapFontCache |
newFontCache()
Creates a new BitmapFontCache for this font.
|
void |
setDistanceFieldSmoothing(float distanceFieldSmoothing) |
dispose, draw, draw, draw, draw, draw, getAscent, getCache, getCapHeight, getColor, getData, getDescent, getLineHeight, getRegion, getRegion, getRegions, getScaleX, getScaleY, getSpaceWidth, getXHeight, isFlipped, ownsTexture, setColor, setColor, setFixedWidthGlyphs, setOwnsTexture, setUseIntegerPositions, toString, usesIntegerPositions
public DistanceFieldFont(BitmapFont.BitmapFontData data, Array<TextureRegion> pageRegions, boolean integer)
public DistanceFieldFont(BitmapFont.BitmapFontData data, TextureRegion region, boolean integer)
public DistanceFieldFont(FileHandle fontFile, boolean flip)
public DistanceFieldFont(FileHandle fontFile, FileHandle imageFile, boolean flip, boolean integer)
public DistanceFieldFont(FileHandle fontFile, FileHandle imageFile, boolean flip)
public DistanceFieldFont(FileHandle fontFile, TextureRegion region, boolean flip)
public DistanceFieldFont(FileHandle fontFile, TextureRegion region)
public DistanceFieldFont(FileHandle fontFile)
public BitmapFontCache newFontCache()
BitmapFont
Note this method is called by the BitmapFont constructors. If a subclass overrides this method, it will be called before the subclass constructors.
newFontCache
in class BitmapFont
public float getDistanceFieldSmoothing()
public void setDistanceFieldSmoothing(float distanceFieldSmoothing)
distanceFieldSmoothing
- Set the distance field smoothing factor for this font. SpriteBatch needs to have this shader
set for rendering distance field fonts.public static ShaderProgram createDistanceFieldShader()
Copyright © 2016. All rights reserved.