Package arc.freetype
Class FreeTypeFontGenerator.FreeTypeFontParameter
java.lang.Object
arc.freetype.FreeTypeFontGenerator.FreeTypeFontParameter
- Enclosing class:
- FreeTypeFontGenerator
Parameter container class that helps configure how
FreeTypeFontGenerator.FreeTypeFontData
and Font
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 FreeTypeFontGenerator.FreeTypeFontData
will have a valid TextureRegion
which
can be used to construct a new Font
.
-
Field Summary
Modifier and TypeFieldDescriptionBorder color; only used if borderWidth > 0float
Values < 1 increase the border size.boolean
true for straight (mitered), false for rounded bordersfloat
Border width in pixels, 0 to disableThe characters the font should contain.Foreground color (required for non-black borders)boolean
Whether to flip the font verticallyfloat
Glyph gamma.boolean
Whether to generate mip maps for the resulting textureStrength of hintingboolean
When true, glyphs are rendered on the fly to the font's glyph page textures as they are needed.boolean
Whether the font should include kerningMagnification filterMinification filterboolean
If true, font smoothing is disabled.The optional PixmapPacker to use for packing multiple fonts into a single texture.int
Pixels to add to the glyph in the texture.int
Pixels to add to the glyph in the texture.int
Pixels to add to the glyph in the texture.int
Pixels to add to the glyph in the texture.int
Number of times to render the glyph.Shadow color; only used if shadowOffset > 0.int
Offset of text shadow on X axis in pixels, 0 to disableint
Offset of text shadow on Y axis in pixels, 0 to disableint
The size in pixelsint
Pixels to add to glyph spacing when text is rendered.int
Pixels to add to glyph spacing when text is rendered. -
Constructor Summary
-
Method Summary
-
Field Details
-
size
public int sizeThe size in pixels -
mono
public boolean monoIf true, font smoothing is disabled. -
hinting
Strength of hinting -
color
Foreground color (required for non-black borders) -
gamma
public float gammaGlyph gamma. Values > 1 reduce antialiasing. -
renderCount
public int renderCountNumber of times to render the glyph. Useful with a shadow or border, so it doesn't show through the glyph. -
borderWidth
public float borderWidthBorder width in pixels, 0 to disable -
borderColor
Border color; only used if borderWidth > 0 -
borderStraight
public boolean borderStraighttrue for straight (mitered), false for rounded borders -
borderGamma
public float borderGammaValues < 1 increase the border size. -
shadowOffsetX
public int shadowOffsetXOffset of text shadow on X axis in pixels, 0 to disable -
shadowOffsetY
public int shadowOffsetYOffset of text shadow on Y axis in pixels, 0 to disable -
shadowColor
Shadow color; only used if shadowOffset > 0. If alpha component is 0, no shadow is drawn but characters are still offset by shadowOffset. -
spaceX
public int spaceXPixels to add to glyph spacing when text is rendered. Can be negative. -
spaceY
public int spaceYPixels to add to glyph spacing when text is rendered. Can be negative. -
padTop
public int padTopPixels to add to the glyph in the texture. Can be negative. -
padLeft
public int padLeftPixels to add to the glyph in the texture. Can be negative. -
padBottom
public int padBottomPixels to add to the glyph in the texture. Can be negative. -
padRight
public int padRightPixels to add to the glyph in the texture. Can be negative. -
characters
The characters the font should contain. If '\0' is not included thenFont.FontData.missingGlyph
is not set. -
kerning
public boolean kerningWhether the font should include kerning -
packer
The optional PixmapPacker to use for packing multiple fonts into a single texture. -
flip
public boolean flipWhether to flip the font vertically -
genMipMaps
public boolean genMipMapsWhether to generate mip maps for the resulting texture -
minFilter
Minification filter -
magFilter
Magnification filter -
incremental
public boolean incrementalWhen 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 useFreeTypeFontGenerator.getMaxTextureSize()
.
-
-
Constructor Details
-
FreeTypeFontParameter
public FreeTypeFontParameter()
-