APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.badlogic.gdx.graphics.g2d.freetype

public Class FreeTypeFontGenerator

extends Object
implements Disposable
Class Inheritance
All Implemented Interfaces
com.badlogic.gdx.utils.Disposable
Imports
java.nio.ByteBuffer, com.badlogic.gdx.Gdx, com.badlogic.gdx.files.FileHandle, com.badlogic.gdx.graphics.Color, .Pixmap, .Pixmap.Blending, .Pixmap.Format, .Texture.TextureFilter, com.badlogic.gdx.graphics.g2d.BitmapFont, .BitmapFont.BitmapFontData, .BitmapFont.Glyph, .Gdx2DPixmap, .GlyphLayout.GlyphRun, .PixmapPacker, .PixmapPacker.GuillotineStrategy, .PixmapPacker.PackStrategy, .PixmapPacker.PixmapPackerRectangle, .PixmapPacker.SkylineStrategy, .TextureRegion, com.badlogic.gdx.graphics.g2d.freetype.FreeType.Bitmap, .FreeType.Face, .FreeType.GlyphMetrics, .FreeType.GlyphSlot, .FreeType.Library, .FreeType.SizeMetrics, .FreeType.Stroker, com.badlogic.gdx.math.MathUtils, com.badlogic.gdx.utils.Array, .Disposable, .GdxRuntimeException, .Null

Generates BitmapFont and BitmapFontData instances from TrueType, OTF, and other FreeType supported fonts.

Usage example:
FreeTypeFontGenerator gen = new FreeTypeFontGenerator(Gdx.files.internal("myfont.ttf"));
BitmapFont font = gen.generateFont(16);
gen.dispose(); // Don't dispose if doing incremental glyph generation.
The generator has to be disposed once it is no longer used. The returned BitmapFont instances are managed by the user and have to be disposed as usual.
Authors
mzechner, Nathan Sweet, Rob Rendell

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
FreeTypeFontGenerator.FreeTypeFontParameter

Parameter container class that helps configure how FreeTypeBitmapFontData and BitmapFont instances are generated.

public class
public static enum
FreeTypeFontGenerator.Hinting

Font smoothing algorithm.

Field Summary

Modifier and TypeField and Description
pack-priv boolean
public static final String
pack-priv final FreeType.Face
pack-priv final FreeType.Library
private static int
maxTextureSize

The maximum texture size allowed by generateData, when storing in a texture atlas.

pack-priv final String
public static final int
NO_MAXIMUM

A hint to scale the texture as needed, without capping it at any maximum size

private int
private int

Constructor Summary

AccessConstructor and Description
public
public
FreeTypeFontGenerator(FileHandle fontFile, int faceIndex)

Creates a new generator from the given font file.

Method Summary

Modifier and TypeMethod and Description
private boolean
protected BitmapFont.Glyph
createGlyph(char c, FreeTypeFontGenerator.FreeTypeBitmapFontData data, FreeTypeFontGenerator.FreeTypeFontParameter parameter, FreeType.Stroker stroker, float baseLine, PixmapPacker packer)

Returns: null if glyph was not found.

public void
dispose()

Implements com.badlogic.gdx.utils.Disposable.dispose.

Cleans up all resources of the generator.

public FreeTypeFontGenerator.FreeTypeBitmapFontData
generateData(int
the size in pixels
size
)

Generates a new BitmapFontData instance, expert usage only.

public FreeTypeFontGenerator.FreeTypeBitmapFontData
public FreeTypeFontGenerator.FreeTypeBitmapFontData
generateData(FreeTypeFontGenerator.FreeTypeFontParameter
configures how the font is generated
parameter
,
FreeTypeFontGenerator.FreeTypeBitmapFontData data)

Generates a new BitmapFontData instance, expert usage only.

public BitmapFont
public BitmapFont
generateFont(FreeTypeFontGenerator.FreeTypeFontParameter
configures how the font is generated
parameter
,
FreeTypeFontGenerator.FreeTypeBitmapFontData data)

Generates a new BitmapFont.

public FreeTypeFontGenerator.GlyphAndBitmap
generateGlyphAndBitmap(int c, int size, boolean flip)

Returns null if glyph was not found in the font.

private int
public static int

Returns:

the power-of-two max texture size
getMaxTextureSize
()

Returns the maximum texture size that will be used by generateData() when creating a texture atlas for the glyphs.

public boolean
hasGlyph(int charCode)

check the font glyph exists for single UTF-32 code point

private boolean
loadChar(int c)

private boolean
loadChar(int c, int flags)

protected BitmapFont
newBitmapFont(BitmapFont.BitmapFontData data, Array<TextureRegion> pageRegions, boolean integer)

Called by generateFont to create a new BitmapFont instance.

public int
scaleForPixelHeight(int height)

Uses ascender and descender of font to calculate real height that makes all glyphs to fit in given pixel size.

public int
scaleForPixelWidth(int
the max width to fit (in pixels)
width
,
int
max number of characters that to fill width
numChars
)

Uses max advance, ascender and descender of font to calculate real height that makes any n glyphs to fit in given pixel width.

public int
scaleToFitSquare(int
the max width to fit (in pixels)
width
,
int
the max height to fit (in pixels)
height
,
int
max number of characters that to fill width
numChars
)

Uses max advance, ascender and descender of font to calculate real height that makes any n glyphs to fit in given pixel width and height.

public static void
setMaxTextureSize(int
the maximum texture size for one page of glyphs
texSize
)

Sets the maximum size that will be used when generating texture atlases for glyphs with generateData().

pack-priv void
setPixelSizes(int pixelWidth, int pixelHeight)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

bitmappedback to summary
pack-priv boolean bitmapped
DEFAULT_CHARSback to summary
public static final String DEFAULT_CHARS
faceback to summary
pack-priv final FreeType.Face face
libraryback to summary
pack-priv final FreeType.Library library
maxTextureSizeback to summary
private static int maxTextureSize

The maximum texture size allowed by generateData, when storing in a texture atlas. Multiple texture pages will be created if necessary. Default is 1024.

See Also
setMaxTextureSize(int)
nameback to summary
pack-priv final String name
NO_MAXIMUMback to summary
public static final int NO_MAXIMUM

A hint to scale the texture as needed, without capping it at any maximum size

pixelHeightback to summary
private int pixelHeight
pixelWidthback to summary
private int pixelWidth

Constructor Detail

FreeTypeFontGeneratorback to summary
public FreeTypeFontGenerator(FileHandle fontFile)

FreeTypeFontGenerator(FileHandle, int)

FreeTypeFontGeneratorback to summary
public FreeTypeFontGenerator(FileHandle fontFile, int faceIndex)

Creates a new generator from the given font file. Uses FileHandle#length() to determine the file size. If the file length could not be determined (it was 0), an extra copy of the font bytes is performed. Throws a GdxRuntimeException if loading did not succeed.

Method Detail

checkForBitmapFontback to summary
private boolean checkForBitmapFont()
createGlyphback to summary
protected BitmapFont.Glyph createGlyph(char c, FreeTypeFontGenerator.FreeTypeBitmapFontData data, FreeTypeFontGenerator.FreeTypeFontParameter parameter, FreeType.Stroker stroker, float baseLine, PixmapPacker packer)
Returns:BitmapFont.Glyph

null if glyph was not found.

Annotations
@Null
disposeback to summary
public void dispose()

Implements com.badlogic.gdx.utils.Disposable.dispose.

Cleans up all resources of the generator. Call this if you no longer use the generator.

Annotations
@Override
generateDataback to summary
public FreeTypeFontGenerator.FreeTypeBitmapFontData generateData(int size)

Generates a new BitmapFontData instance, expert usage only. Throws a GdxRuntimeException if something went wrong.

Parameters
size:int

the size in pixels

generateDataback to summary
public FreeTypeFontGenerator.FreeTypeBitmapFontData generateData(FreeTypeFontGenerator.FreeTypeFontParameter parameter)
generateDataback to summary
public FreeTypeFontGenerator.FreeTypeBitmapFontData generateData(FreeTypeFontGenerator.FreeTypeFontParameter parameter, FreeTypeFontGenerator.FreeTypeBitmapFontData data)

Generates a new BitmapFontData instance, expert usage only. Throws a GdxRuntimeException if something went wrong.

Parameters
parameter:FreeTypeFontGenerator.FreeTypeFontParameter

configures how the font is generated

generateFontback to summary
public BitmapFont generateFont(FreeTypeFontGenerator.FreeTypeFontParameter parameter)
generateFontback to summary
public BitmapFont generateFont(FreeTypeFontGenerator.FreeTypeFontParameter parameter, FreeTypeFontGenerator.FreeTypeBitmapFontData data)

Generates a new BitmapFont. The size is expressed in pixels. Throws a GdxRuntimeException if the font could not be generated. Using big sizes might cause such an exception.

Parameters
parameter:FreeTypeFontGenerator.FreeTypeFontParameter

configures how the font is generated

generateGlyphAndBitmapback to summary
public FreeTypeFontGenerator.GlyphAndBitmap generateGlyphAndBitmap(int c, int size, boolean flip)

Returns null if glyph was not found in the font. If there is nothing to render, for example with various space characters, then GlyphAndBitmap#bitmap will be null.

Annotations
@Null
getLoadingFlagsback to summary
private int getLoadingFlags(FreeTypeFontGenerator.FreeTypeFontParameter parameter)
getMaxTextureSizeback to summary
public static int getMaxTextureSize()

Returns the maximum texture size that will be used by generateData() when creating a texture atlas for the glyphs.

Returns:int

the power-of-two max texture size

hasGlyphback to summary
public boolean hasGlyph(int charCode)

check the font glyph exists for single UTF-32 code point

loadCharback to summary
private boolean loadChar(int c)
loadCharback to summary
private boolean loadChar(int c, int flags)
newBitmapFontback to summary
protected BitmapFont newBitmapFont(BitmapFont.BitmapFontData data, Array<TextureRegion> pageRegions, boolean integer)

Called by generateFont to create a new BitmapFont instance. This allows injecting a customized BitmapFont, eg for a RTL font.

See Also
BitmapFont#BitmapFont(BitmapFontData, Array, boolean)
scaleForPixelHeightback to summary
public int scaleForPixelHeight(int height)

Uses ascender and descender of font to calculate real height that makes all glyphs to fit in given pixel size. Source: http://nothings.org/stb/stb_truetype.h / stbtt_ScaleForPixelHeight

scaleForPixelWidthback to summary
public int scaleForPixelWidth(int width, int numChars)

Uses max advance, ascender and descender of font to calculate real height that makes any n glyphs to fit in given pixel width.

Parameters
width:int

the max width to fit (in pixels)

numChars:int

max number of characters that to fill width

scaleToFitSquareback to summary
public int scaleToFitSquare(int width, int height, int numChars)

Uses max advance, ascender and descender of font to calculate real height that makes any n glyphs to fit in given pixel width and height.

Parameters
width:int

the max width to fit (in pixels)

height:int

the max height to fit (in pixels)

numChars:int

max number of characters that to fill width

setMaxTextureSizeback to summary
public static void setMaxTextureSize(int texSize)

Sets the maximum size that will be used when generating texture atlases for glyphs with generateData(). The default is 1024. By specifying NO_MAXIMUM, the texture atlas will scale as needed. The power-of-two square texture size will be capped to the given texSize. It's recommended that a power-of-two value be used here. Multiple pages may be used to fit all the generated glyphs. You can query the resulting number of pages by calling bitmapFont.getRegions().length or freeTypeBitmapFontData.getTextureRegions().length. If PixmapPacker is specified when calling generateData, this parameter is ignored.

Parameters
texSize:int

the maximum texture size for one page of glyphs

setPixelSizesback to summary
pack-priv void setPixelSizes(int pixelWidth, int pixelHeight)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

com.badlogic.gdx.graphics.g2d.freetype back to summary

public Class FreeTypeFontGenerator.FreeTypeBitmapFontData

extends BitmapFontData
implements Disposable
Class Inheritance
All Implemented Interfaces
com.badlogic.gdx.utils.Disposable

BitmapFontData used for fonts generated via the FreeTypeFontGenerator. The texture storing the glyphs is held in memory, thus the getImagePaths() and getFontFile() methods will return null.
Authors
mzechner, Nathan Sweet

Field Summary

Modifier and TypeField and Description
private boolean
pack-priv FreeTypeFontGenerator
pack-priv Array<BitmapFont.Glyph>
pack-priv PixmapPacker
pack-priv FreeTypeFontGenerator.FreeTypeFontParameter
public Array<TextureRegion>
pack-priv FreeType.Stroker
Inherited from com.badlogic.gdx.graphics.g2d.BitmapFont.BitmapFontData:
ascentblankLineScalebreakCharscapCharscapHeightcursorXdescentdownflippedfontFileimagePathslineHeightmarkupEnabledmissingGlyphnamepadBottompadLeftpadRightpadTopscaleXscaleYspaceXadvancexCharsxHeight

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
dispose()

Implements com.badlogic.gdx.utils.Disposable.dispose.

Releases all resources of this object.

public BitmapFont.Glyph
getGlyph(char ch)

Overrides com.badlogic.gdx.graphics.g2d.BitmapFont.BitmapFontData.getGlyph.

Returns the glyph for the specified character, or null if no such glyph exists.

public void
getGlyphs(GlyphLayout.GlyphRun run, CharSequence str, int start, int end, BitmapFont.Glyph lastGlyph)

Overrides com.badlogic.gdx.graphics.g2d.BitmapFont.BitmapFontData.getGlyphs.

Using the specified string, populates the glyphs and positions of the specified glyph run.

Inherited from com.badlogic.gdx.graphics.g2d.BitmapFont.BitmapFontData:
getFirstGlyphgetFontFilegetImagePathgetImagePathsgetWrapIndexhasGlyphisBreakCharisWhitespaceloadscalesetGlyphsetGlyphRegionsetLineHeightsetScalesetScaletoString

Field Detail

dirtyback to summary
private boolean dirty
generatorback to summary
pack-priv FreeTypeFontGenerator generator
glyphsback to summary
pack-priv Array<BitmapFont.Glyph> glyphs

Hides com.badlogic.gdx.graphics.g2d.BitmapFont.BitmapFontData.glyphs.

packerback to summary
pack-priv PixmapPacker packer
parameterback to summary
pack-priv FreeTypeFontGenerator.FreeTypeFontParameter parameter
regionsback to summary
public Array<TextureRegion> regions
strokerback to summary
pack-priv FreeType.Stroker stroker

Constructor Detail

FreeTypeBitmapFontDataback to summary
public FreeTypeBitmapFontData()

Method Detail

disposeback to summary
public void dispose()

Implements com.badlogic.gdx.utils.Disposable.dispose.

Doc from com.badlogic.gdx.utils.Disposable.dispose.

Releases all resources of this object.

Annotations
@Override
getGlyphback to summary
public BitmapFont.Glyph getGlyph(char ch)

Overrides com.badlogic.gdx.graphics.g2d.BitmapFont.BitmapFontData.getGlyph.

Doc from com.badlogic.gdx.graphics.g2d.BitmapFont.BitmapFontData.getGlyph.

Returns the glyph for the specified character, or null if no such glyph exists. Note that getGlyphs(GlyphRun, CharSequence, int, int, Glyph) should be be used to shape a string of characters into a list of glyphs.

Annotations
@Override
getGlyphsback to summary
public void getGlyphs(GlyphLayout.GlyphRun run, CharSequence str, int start, int end, BitmapFont.Glyph lastGlyph)

Overrides com.badlogic.gdx.graphics.g2d.BitmapFont.BitmapFontData.getGlyphs.

Doc from com.badlogic.gdx.graphics.g2d.BitmapFont.BitmapFontData.getGlyphs.

Using the specified string, populates the glyphs and positions of the specified glyph run.

com.badlogic.gdx.graphics.g2d.freetype back to summary

public Class FreeTypeFontGenerator.FreeTypeFontParameter

extends Object
Class Inheritance
  • java.lang.Object
  • com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator.FreeTypeFontParameter

Parameter container class that helps configure how FreeTypeBitmapFontData and BitmapFont instances are generated. The packer field is for advanced usage, where it is necessary to pack multiple BitmapFonts (i.e. styles, sizes, families) into a single Texture atlas. If no packer is specified, the generator will use its own PixmapPacker to pack the glyphs into a power-of-two sized texture, and the resulting FreeTypeBitmapFontData will have a valid TextureRegion which can be used to construct a new BitmapFont.
Authors
siondream, Nathan Sweet

Field Summary

Modifier and TypeField and Description
public Color
borderColor

Border color; only used if borderWidth > 0

public float
borderGamma

Values < 1 increase the border size.

public boolean
borderStraight

true for straight (mitered), false for rounded borders

public float
borderWidth

Border width in pixels, 0 to disable

public String
characters

The characters the font should contain.

public Color
color

Foreground color (required for non-black borders)

public boolean
flip

Whether to flip the font vertically

public float
gamma

Glyph gamma.

public boolean
genMipMaps

Whether to generate mip maps for the resulting texture

public FreeTypeFontGenerator.Hinting
hinting

Strength of hinting

public boolean
incremental

When true, glyphs are rendered on the fly to the font's glyph page textures as they are needed.

public boolean
kerning

Whether the font should include kerning

public Texture.TextureFilter
magFilter

Magnification filter

public Texture.TextureFilter
minFilter

Minification filter

public boolean
mono

If true, font smoothing is disabled.

public PixmapPacker
packer

The optional PixmapPacker to use for packing multiple fonts into a single texture.

public int
padBottom

Pixels to add to the glyph in the texture.

public int
padLeft

Pixels to add to the glyph in the texture.

public int
padRight

Pixels to add to the glyph in the texture.

public int
padTop

Pixels to add to the glyph in the texture.

public int
renderCount

Number of times to render the glyph.

public Color
shadowColor

Shadow color; only used if shadowOffset > 0.

public int
shadowOffsetX

Offset of text shadow on X axis in pixels, 0 to disable

public int
shadowOffsetY

Offset of text shadow on Y axis in pixels, 0 to disable

public int
size

The size in pixels

public int
spaceX

Pixels to add to glyph spacing when text is rendered.

public int
spaceY

Pixels to add to glyph spacing when text is rendered.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

borderColorback to summary
public Color borderColor

Border color; only used if borderWidth > 0

borderGammaback to summary
public float borderGamma

Values < 1 increase the border size.

borderStraightback to summary
public boolean borderStraight

true for straight (mitered), false for rounded borders

borderWidthback to summary
public float borderWidth

Border width in pixels, 0 to disable

charactersback to summary
public String characters

The characters the font should contain. If '\0' is not included then BitmapFontData#missingGlyph is not set.

colorback to summary
public Color color

Foreground color (required for non-black borders)

flipback to summary
public boolean flip

Whether to flip the font vertically

gammaback to summary
public float gamma

Glyph gamma. Values > 1 reduce antialiasing.

genMipMapsback to summary
public boolean genMipMaps

Whether to generate mip maps for the resulting texture

hintingback to summary
public FreeTypeFontGenerator.Hinting hinting

Strength of hinting

incrementalback to summary
public boolean incremental

When true, glyphs are rendered on the fly to the font's glyph page textures as they are needed. The FreeTypeFontGenerator must not be disposed until the font is no longer needed. The FreeTypeBitmapFontData must be disposed (separately from the generator) when the font is no longer needed. The FreeTypeFontParameter should not be modified after creating a font. If a PixmapPacker is not specified, the font glyph page textures will use FreeTypeFontGenerator#getMaxTextureSize().

kerningback to summary
public boolean kerning

Whether the font should include kerning

magFilterback to summary
public Texture.TextureFilter magFilter

Magnification filter

minFilterback to summary
public Texture.TextureFilter minFilter

Minification filter

monoback to summary
public boolean mono

If true, font smoothing is disabled.

packerback to summary
public PixmapPacker packer

The optional PixmapPacker to use for packing multiple fonts into a single texture.

See Also
FreeTypeFontParameter
padBottomback to summary
public int padBottom

Pixels to add to the glyph in the texture. Cannot be negative.

padLeftback to summary
public int padLeft

Pixels to add to the glyph in the texture. Cannot be negative.

padRightback to summary
public int padRight

Pixels to add to the glyph in the texture. Cannot be negative.

padTopback to summary
public int padTop

Pixels to add to the glyph in the texture. Cannot be negative.

renderCountback to summary
public int renderCount

Number of times to render the glyph. Useful with a shadow or border, so it doesn't show through the glyph.

shadowColorback to summary
public Color shadowColor

Shadow color; only used if shadowOffset > 0. If alpha component is 0, no shadow is drawn but characters are still offset by shadowOffset.

shadowOffsetXback to summary
public int shadowOffsetX

Offset of text shadow on X axis in pixels, 0 to disable

shadowOffsetYback to summary
public int shadowOffsetY

Offset of text shadow on Y axis in pixels, 0 to disable

sizeback to summary
public int size

The size in pixels

spaceXback to summary
public int spaceX

Pixels to add to glyph spacing when text is rendered. Can be negative.

spaceYback to summary
public int spaceY

Pixels to add to glyph spacing when text is rendered. Can be negative.

Constructor Detail

FreeTypeFontParameterback to summary
public FreeTypeFontParameter()
com.badlogic.gdx.graphics.g2d.freetype back to summary

public Class FreeTypeFontGenerator.GlyphAndBitmap

extends Object
Class Inheritance
  • java.lang.Object
  • com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator.GlyphAndBitmap

Field Summary

Modifier and TypeField and Description
public FreeType.Bitmap
public BitmapFont.Glyph

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bitmapback to summary
public FreeType.Bitmap bitmap
Annotations
@Null
glyphback to summary
public BitmapFont.Glyph glyph

Constructor Detail

GlyphAndBitmapback to summary
public GlyphAndBitmap()
com.badlogic.gdx.graphics.g2d.freetype back to summary

public final Enum FreeTypeFontGenerator.Hinting

extends Enum<FreeTypeFontGenerator.Hinting>
Class Inheritance

Font smoothing algorithm.

Field Summary

Modifier and TypeField and Description
public static final FreeTypeFontGenerator.Hinting
AutoFull

Strong hinting with crisp edges at the expense of shape fidelity.

public static final FreeTypeFontGenerator.Hinting
AutoMedium

Average hinting.

public static final FreeTypeFontGenerator.Hinting
AutoSlight

Light hinting with fuzzy edges, but close to the original shape.

public static final FreeTypeFontGenerator.Hinting
Full

Strong hinting with crisp edges at the expense of shape fidelity

public static final FreeTypeFontGenerator.Hinting
Medium

Average hinting

public static final FreeTypeFontGenerator.Hinting
None

Disable hinting.

public static final FreeTypeFontGenerator.Hinting
Slight

Light hinting with fuzzy edges, but close to the original shape

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static FreeTypeFontGenerator.Hinting
public static FreeTypeFontGenerator.Hinting[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

AutoFullback to summary
public static final FreeTypeFontGenerator.Hinting AutoFull

Strong hinting with crisp edges at the expense of shape fidelity. Uses the FreeType auto-hinter.

AutoMediumback to summary
public static final FreeTypeFontGenerator.Hinting AutoMedium

Average hinting. Uses the FreeType auto-hinter.

AutoSlightback to summary
public static final FreeTypeFontGenerator.Hinting AutoSlight

Light hinting with fuzzy edges, but close to the original shape. Uses the FreeType auto-hinter.

Fullback to summary
public static final FreeTypeFontGenerator.Hinting Full

Strong hinting with crisp edges at the expense of shape fidelity

Mediumback to summary
public static final FreeTypeFontGenerator.Hinting Medium

Average hinting

Noneback to summary
public static final FreeTypeFontGenerator.Hinting None

Disable hinting. Generated glyphs will look blurry.

Slightback to summary
public static final FreeTypeFontGenerator.Hinting Slight

Light hinting with fuzzy edges, but close to the original shape

Constructor Detail

Hintingback to summary
private Hinting()

Method Detail

valueOfback to summary
public static FreeTypeFontGenerator.Hinting valueOf(String name)
valuesback to summary
public static FreeTypeFontGenerator.Hinting[] values()