com.badlogic.gdx.graphics.g2d
Class BitmapFont.BitmapFontData

java.lang.Object
  extended by com.badlogic.gdx.graphics.g2d.BitmapFont.BitmapFontData
Enclosing class:
BitmapFont

public static class BitmapFont.BitmapFontData
extends Object

Backing data for a BitmapFont.


Field Summary
 float ascent
           
 float capHeight
           
 float descent
           
 float down
           
 boolean flipped
           
 FileHandle fontFile
           
 BitmapFont.Glyph[][] glyphs
           
 String imagePath
          Deprecated. use imagePaths[0] instead
 String[] imagePaths
          An array of the image paths, i.e.
 float lineHeight
           
 float scaleX
           
 float scaleY
           
 float spaceWidth
           
 float xHeight
           
 
Constructor Summary
BitmapFont.BitmapFontData()
          Use this if you want to create BitmapFontData yourself, e.g.
BitmapFont.BitmapFontData(FileHandle fontFile, boolean flip)
           
 
Method Summary
 BitmapFont.Glyph getFirstGlyph()
           
 FileHandle getFontFile()
           
 BitmapFont.Glyph getGlyph(char ch)
          Returns the glyph for the specified character, or null if no such glyph exists.
 String getImagePath()
          Deprecated. use getImagePath(int index) instead
 String getImagePath(int index)
          Returns the image path for the texture page at the given index.
 String[] getImagePaths()
           
 void setGlyph(int ch, BitmapFont.Glyph glyph)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

imagePath

@Deprecated
public String imagePath
Deprecated. use imagePaths[0] instead
The first discovered image path; included for backwards-compatibility This is the same as imagePaths[0].


imagePaths

public String[] imagePaths
An array of the image paths, i.e. for multiple texture pages


fontFile

public FileHandle fontFile

flipped

public boolean flipped

lineHeight

public float lineHeight

capHeight

public float capHeight

ascent

public float ascent

descent

public float descent

down

public float down

scaleX

public float scaleX

scaleY

public float scaleY

glyphs

public final BitmapFont.Glyph[][] glyphs

spaceWidth

public float spaceWidth

xHeight

public float xHeight
Constructor Detail

BitmapFont.BitmapFontData

public BitmapFont.BitmapFontData()
Use this if you want to create BitmapFontData yourself, e.g. from stb-truetype of FreeType.


BitmapFont.BitmapFontData

public BitmapFont.BitmapFontData(FileHandle fontFile,
                                 boolean flip)
Method Detail

setGlyph

public void setGlyph(int ch,
                     BitmapFont.Glyph glyph)

getFirstGlyph

public BitmapFont.Glyph getFirstGlyph()

getGlyph

public BitmapFont.Glyph getGlyph(char ch)
Returns the glyph for the specified character, or null if no such glyph exists.


getImagePath

@Deprecated
public String getImagePath()
Deprecated. use getImagePath(int index) instead

Returns the first image path; included for backwards-compatibility. Use getImagePath(int) instead.

Returns:
the first image path in the array

getImagePath

public String getImagePath(int index)
Returns the image path for the texture page at the given index.

Parameters:
index - the index of the page, AKA the "id" in the BMFont file
Returns:
the texture page

getImagePaths

public String[] getImagePaths()

getFontFile

public FileHandle getFontFile()


Copyright © 2014. All Rights Reserved.