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

public Class FreetypeFontLoader

extends AsynchronousAssetLoader<BitmapFont, FreetypeFontLoader.FreeTypeFontLoaderParameter>
Class Inheritance
Imports
com.badlogic.gdx.assets.AssetDescriptor, .AssetLoaderParameters, .AssetManager, com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader, .FileHandleResolver, com.badlogic.gdx.files.FileHandle, com.badlogic.gdx.graphics.g2d.BitmapFont, com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator.FreeTypeFontParameter, com.badlogic.gdx.utils.Array

Creates BitmapFont instances from FreeType font files. Requires a FreeTypeFontLoaderParameter to be passed to AssetManager#load(String, Class, AssetLoaderParameters) which specifies the name of the TTF file as well the parameters used to generate the BitmapFont (size, characters, etc.)

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Array<AssetDescriptor<T>>
getDependencies(String fileName, FileHandle file, FreetypeFontLoader.FreeTypeFontLoaderParameter parameter)

Implements abstract com.badlogic.gdx.assets.loaders.AssetLoader.getDependencies.

Returns the assets this asset requires to be loaded first.

public void
loadAsync(AssetManager manager, String fileName, FileHandle file, FreetypeFontLoader.FreeTypeFontLoaderParameter parameter)

Implements abstract com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader.loadAsync.

Loads the non-OpenGL part of the asset and injects any dependencies of the asset into the AssetManager.

public BitmapFont
loadSync(AssetManager manager, String fileName, FileHandle file, FreetypeFontLoader.FreeTypeFontLoaderParameter parameter)

Implements abstract com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader.loadSync.

Loads the OpenGL part of the asset.

Inherited from com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader:
unloadAsync

Constructor Detail

FreetypeFontLoaderback to summary
public FreetypeFontLoader(FileHandleResolver resolver)

Method Detail

getDependenciesback to summary
public Array<AssetDescriptor<T>> getDependencies(String fileName, FileHandle file, FreetypeFontLoader.FreeTypeFontLoaderParameter parameter)

Implements abstract com.badlogic.gdx.assets.loaders.AssetLoader.getDependencies.

Doc from com.badlogic.gdx.assets.loaders.AssetLoader.getDependencies.

Returns the assets this asset requires to be loaded first. This method may be called on a thread other than the GL thread.

Annotations
@Override
loadAsyncback to summary
public void loadAsync(AssetManager manager, String fileName, FileHandle file, FreetypeFontLoader.FreeTypeFontLoaderParameter parameter)

Implements abstract com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader.loadAsync.

Doc from com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader.loadAsync.

Loads the non-OpenGL part of the asset and injects any dependencies of the asset into the AssetManager.

Annotations
@Override
loadSyncback to summary
public BitmapFont loadSync(AssetManager manager, String fileName, FileHandle file, FreetypeFontLoader.FreeTypeFontLoaderParameter parameter)

Implements abstract com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader.loadSync.

Doc from com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader.loadSync.

Loads the OpenGL part of the asset.

Annotations
@Override
com.badlogic.gdx.graphics.g2d.freetype back to summary

public Class FreetypeFontLoader.FreeTypeFontLoaderParameter

extends AssetLoaderParameters<BitmapFont>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public String
fontFileName

the name of the TTF file to be used to load the font

public FreeTypeFontGenerator.FreeTypeFontParameter
fontParameters

the parameters used to generate the font, e.g. size, characters, etc.

Inherited from com.badlogic.gdx.assets.AssetLoaderParameters:
loadedCallback

Constructor Summary

AccessConstructor and Description
public

Field Detail

fontFileNameback to summary
public String fontFileName

the name of the TTF file to be used to load the font

fontParametersback to summary
public FreeTypeFontGenerator.FreeTypeFontParameter fontParameters

the parameters used to generate the font, e.g. size, characters, etc.

Constructor Detail

FreeTypeFontLoaderParameterback to summary
public FreeTypeFontLoaderParameter()