Font.Font

Module Font :: Class Font |
[show private | hide private]
[frames | no frames]

## Class Font

A texture-mapped font.

Method Summary
| `__init__(self, fileName, size, bold, italic, underline, outline, scale, reversed, systemFont)`
| ``getGlyph`(self, ch)` Get the `Texture` for a given character.
| ``getHeight`(self)` Return the height of this font
| ``getLineSpacing`(self)` Return the line spacing of this font
| ``getStringSize`(self, s, scale)` Get the dimensions of a string when rendered with this font.
| ``render`(self, text, pos, direction, scale)` Draw some text.
| ``setCustomGlyph`(self, character, texture)` Replace a character with a texture.

Method Details

### getGlyph(self, ch) Get the `Texture` for a given character. Parameters: `ch` - Character Returns: `Texture` instance

### getHeight(self) Returns: The height of this font

### getLineSpacing(self) Returns: The line spacing of this font

### getStringSize(self, s, scale=0.002) Get the dimensions of a string when rendered with this font. Parameters: `s` - String `scale` - Scale factor Returns: (width, height) tuple

### render(self, text, pos=(0, 0), direction=(1, 0, 0), scale=0.002) Draw some text. Parameters: `text` - Text to draw `pos` - Text coordinate tuple (x, y) `direction` - Text direction vector (x, y, z) `scale` - Scale factor

### setCustomGlyph(self, character, texture) Replace a character with a texture. Parameters: `character` - Character to replace `texture` - `Texture` instance

Generated by Epydoc 2.1 on Thu Nov 23 23:40:43 2006 | http://epydoc.sf.net