org.ogre4j
Interface IFont

All Superinterfaces:
IAllocatedObject<IResourceAllocPolicy>, IManualResourceLoader, INativeObject, IResource, IResourceAllocatedObject, IStringInterface
All Known Implementing Classes:
Font

public interface IFont
extends INativeObject, IResource, IManualResourceLoader


Nested Class Summary
static interface IFont.ICmdCodePoints
           
static interface IFont.ICmdResolution
           
static interface IFont.ICmdSize
           
static interface IFont.ICmdSource
           
static interface IFont.ICmdType
           
static interface IFont.ICodePointMap
           
static interface IFont.ICodePointRange
           
static interface IFont.ICodePointRangeList
           
static interface IFont.IGlyphInfo
           
 
Nested classes/interfaces inherited from interface org.ogre4j.IResource
IResource.IListener, IResource.IListenerList
 
Method Summary
 void addCodePointRange(IFont.ICodePointRange range)
          Adds a range of code points to the list of code point ranges to generate glyphs for, if this is a truetype based font.
 void clearCodePointRanges()
          Clear the list of code point ranges.
 boolean getAntialiasColour()
          Gets whether or not the colour of this font is antialiased as it is generated from a true type font.
 IFont.ICodePointRangeList getCodePointRangeList()
          Get a const reference to the list of code point ranges to be used to generate glyphs from a truetype font.
 float getGlyphAspectRatio(long id)
          Gets the aspect ratio (width / height) of this character.
 IFont.IGlyphInfo getGlyphInfo(long id)
          Gets the information available for a glyph corresponding to a given code point, or throws an exception if it doesn't exist;
 IFloatRect getGlyphTexCoords(long id)
          Returns the texture coordinates of the associated glyph.
 IMaterialPtr getMaterial_const()
           
 IMaterialPtr getMaterial()
          Gets the material generated for this font, as a weak reference.
 java.lang.String getSource()
          Gets the source this font (either an image or a truetype font).
 int getTrueTypeMaxBearingY()
          Gets the maximum baseline distance of all glyphs used in the texture.
 long getTrueTypeResolution()
          Gets the resolution (dpi) of the font used to generate the texture.
 float getTrueTypeSize()
          Gets the point size of the font used to generate the texture.
 FontType getType()
          Gets the type of font.
 void loadResource(IResource resource)
          Implementation of , called when the that this font creates needs to (re)load.
 void setAntialiasColour(boolean enabled)
          Sets whether or not the colour of this font is antialiased as it is generated from a true type font.
 void setGlyphAspectRatio(long id, float ratio)
          Sets the aspect ratio (width / height) of this character.
 void setGlyphTexCoords(long id, float u1, float v1, float u2, float v2, float textureAspect)
          Sets the texture coordinates of a glyph.
 void setSource(java.lang.String source)
          Sets the source of the font.
 void setTrueTypeResolution(long ttfResolution)
          Gets the resolution (dpi) of the font used to generate the texture (only required for FT_TRUETYPE).
 void setTrueTypeSize(float ttfSize)
          Sets the size of a truetype font (only required for FT_TRUETYPE).
 void setType(FontType ftype)
          Sets the type of font.
 
Methods inherited from interface org.ogre4j.IResource
_dirtyState, _fireBackgroundLoadingComplete, _fireBackgroundPreparingComplete, _notifyOrigin, addListener, changeGroupOwnership, escalateLoading, getCreator, getGroup, getHandle, getLoadingState, getName, getOrigin, getSize, getStateCount, isBackgroundLoaded, isLoaded, isLoading, isManuallyLoaded, isPrepared, isReloadable, load, prepare, reload, removeListener, setBackgroundLoaded, touch, unload
 
Methods inherited from interface org.ogre4j.IStringInterface
copyParametersTo, getParamDictionary_const, getParamDictionary, getParameter, getParameters, setParameter, setParameterList
 
Methods inherited from interface org.xbig.base.INativeObject
delete, disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 
Methods inherited from interface org.ogre4j.IManualResourceLoader
prepareResource
 

Method Detail

setType

void setType(FontType ftype)
Sets the type of font. Must be set before loading.


getType

FontType getType()
Gets the type of font.


setSource

void setSource(java.lang.String source)
Sets the source of the font.


getSource

java.lang.String getSource()
Gets the source this font (either an image or a truetype font).


setTrueTypeSize

void setTrueTypeSize(float ttfSize)
Sets the size of a truetype font (only required for FT_TRUETYPE).


setTrueTypeResolution

void setTrueTypeResolution(long ttfResolution)
Gets the resolution (dpi) of the font used to generate the texture (only required for FT_TRUETYPE).


getTrueTypeSize

float getTrueTypeSize()
Gets the point size of the font used to generate the texture.


getTrueTypeResolution

long getTrueTypeResolution()
Gets the resolution (dpi) of the font used to generate the texture.


getTrueTypeMaxBearingY

int getTrueTypeMaxBearingY()
Gets the maximum baseline distance of all glyphs used in the texture.


getGlyphTexCoords

IFloatRect getGlyphTexCoords(long id)
Returns the texture coordinates of the associated glyph.


setGlyphTexCoords

void setGlyphTexCoords(long id,
                       float u1,
                       float v1,
                       float u2,
                       float v2,
                       float textureAspect)
Sets the texture coordinates of a glyph.


getGlyphAspectRatio

float getGlyphAspectRatio(long id)
Gets the aspect ratio (width / height) of this character.


setGlyphAspectRatio

void setGlyphAspectRatio(long id,
                         float ratio)
Sets the aspect ratio (width / height) of this character.


getGlyphInfo

IFont.IGlyphInfo getGlyphInfo(long id)
Gets the information available for a glyph corresponding to a given code point, or throws an exception if it doesn't exist;


addCodePointRange

void addCodePointRange(IFont.ICodePointRange range)
Adds a range of code points to the list of code point ranges to generate glyphs for, if this is a truetype based font.


clearCodePointRanges

void clearCodePointRanges()
Clear the list of code point ranges.


getCodePointRangeList

IFont.ICodePointRangeList getCodePointRangeList()
Get a const reference to the list of code point ranges to be used to generate glyphs from a truetype font.


getMaterial_const

IMaterialPtr getMaterial_const()

getMaterial

IMaterialPtr getMaterial()
Gets the material generated for this font, as a weak reference.


setAntialiasColour

void setAntialiasColour(boolean enabled)
Sets whether or not the colour of this font is antialiased as it is generated from a true type font.


getAntialiasColour

boolean getAntialiasColour()
Gets whether or not the colour of this font is antialiased as it is generated from a true type font.


loadResource

void loadResource(IResource resource)
Implementation of , called when the that this font creates needs to (re)load.

Specified by:
loadResource in interface IManualResourceLoader


Copyright © 2007 netAllied GmbH. All Rights Reserved.