C# Class SFML.Graphics.Font

Font is the low-level class for loading and manipulating character fonts. This class is meant to be used by String2D
Inheritance: ObjectBase
Afficher le fichier Open project: SFML/SFML.Net Class Usage Examples

Méthodes publiques

Méthode Description
Font ( Font copy ) : System

Construct the font from another font

Font ( Stream stream ) : System

Construct the font from a custom stream

Font ( byte bytes ) : System

Construct the font from a file in memory

Font ( string filename ) : System

Construct the font from a file

GetGlyph ( uint codePoint, uint characterSize, bool bold, float outlineThickness ) : Glyph

Get a glyph in the font

GetInfo ( ) : Info

Get the font information

GetKerning ( uint first, uint second, uint characterSize ) : float

Get the kerning offset between two glyphs

GetLineSpacing ( uint characterSize ) : float

Get spacing between two consecutive lines

GetTexture ( uint characterSize ) : Texture

Get the texture containing the glyphs of a given size

GetUnderlinePosition ( uint characterSize ) : float

Get the position of the underline

GetUnderlineThickness ( uint characterSize ) : float

Get the thickness of the underline

ToString ( ) : string

Provide a string describing the object

Méthodes protégées

Méthode Description
Destroy ( bool disposing ) : void

Handle the destruction of the object

Private Methods

Méthode Description
Font ( IntPtr cPointer ) : System

Internal constructor

sfFont_copy ( IntPtr Font ) : IntPtr
sfFont_createFromFile ( string Filename ) : IntPtr
sfFont_createFromMemory ( IntPtr data, ulong size ) : IntPtr
sfFont_createFromStream ( IntPtr stream ) : IntPtr
sfFont_destroy ( IntPtr CPointer ) : void
sfFont_getGlyph ( IntPtr CPointer, uint codePoint, uint characterSize, bool bold, float outlineThickness ) : Glyph
sfFont_getInfo ( IntPtr CPointer ) : InfoMarshalData
sfFont_getKerning ( IntPtr CPointer, uint first, uint second, uint characterSize ) : float
sfFont_getLineSpacing ( IntPtr CPointer, uint characterSize ) : float
sfFont_getTexture ( IntPtr CPointer, uint characterSize ) : IntPtr
sfFont_getUnderlinePosition ( IntPtr CPointer, uint characterSize ) : float
sfFont_getUnderlineThickness ( IntPtr CPointer, uint characterSize ) : float

Method Details

Destroy() protected méthode

Handle the destruction of the object
protected Destroy ( bool disposing ) : void
disposing bool Is the GC disposing the object, or is it an explicit call?
Résultat void

Font() public méthode

Construct the font from another font
public Font ( Font copy ) : System
copy Font Font to copy
Résultat System

Font() public méthode

Construct the font from a custom stream
public Font ( Stream stream ) : System
stream Stream Source stream to read from
Résultat System

Font() public méthode

Construct the font from a file in memory
public Font ( byte bytes ) : System
bytes byte Byte array containing the file contents
Résultat System

Font() public méthode

Construct the font from a file
public Font ( string filename ) : System
filename string Font file to load
Résultat System

GetGlyph() public méthode

Get a glyph in the font
public GetGlyph ( uint codePoint, uint characterSize, bool bold, float outlineThickness ) : Glyph
codePoint uint Unicode code point of the character to get
characterSize uint Character size
bold bool Retrieve the bold version or the regular one?
outlineThickness float Thickness of outline (when != 0 the glyph will not be filled)
Résultat Glyph

GetInfo() public méthode

Get the font information
public GetInfo ( ) : Info
Résultat Info

GetKerning() public méthode

Get the kerning offset between two glyphs
public GetKerning ( uint first, uint second, uint characterSize ) : float
first uint Unicode code point of the first character
second uint Unicode code point of the second character
characterSize uint Character size
Résultat float

GetLineSpacing() public méthode

Get spacing between two consecutive lines
public GetLineSpacing ( uint characterSize ) : float
characterSize uint Character size
Résultat float

GetTexture() public méthode

Get the texture containing the glyphs of a given size
public GetTexture ( uint characterSize ) : Texture
characterSize uint Character size
Résultat Texture

GetUnderlinePosition() public méthode

Get the position of the underline
public GetUnderlinePosition ( uint characterSize ) : float
characterSize uint Character size
Résultat float

GetUnderlineThickness() public méthode

Get the thickness of the underline
public GetUnderlineThickness ( uint characterSize ) : float
characterSize uint Character size
Résultat float

ToString() public méthode

Provide a string describing the object
public ToString ( ) : string
Résultat string