## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# iFontServer Struct Reference
[2D]

A font server interface. More...

`#include <ivideo/fontserv.h>`

Inheritance diagram for iFontServer:

[legend]
List of all members.

## Public Member Functions

virtual bool | GetWarnOnError ()=0
| Get status of warning emission on error.
virtual csPtr< iFont > | LoadFont (const char *filename, float size=10.0f)=0
| Load a font by name.
virtual void | SetWarnOnError (bool enable)=0
| Enable or disable error reporting.

## Detailed Description

A font server interface.

Font server can load fonts and create iFont objects. In fact user does not care whenever fonts are built-in the font server or are on disk; thus some font servers may contain the fonts hardcoded; in this case the font path is really a identifier.

Main creators of instances implementing this interface:

- Font Multiplexer plugin (crystalspace.font.server.multiplexer)
- Standard Font server plugin (crystalspace.font.server.default)
- FreeType2 Font server plugin (crystalspace.font.server.freetype2)

Main ways to get pointers to this interface:

- CS_QUERY_REGISTRY()

Main users of this interface:

- iGraphics3D implementations (3D renderers).

Definition at line 242 of file fontserv.h.

## Member Function Documentation

virtual bool iFontServer::GetWarnOnError | ( |  | ) | `[pure virtual]`

| Get status of warning emission on error.

virtual csPtr<iFont> iFontServer::LoadFont | ( | const char * | filename,
|  | float | size = `10.0f`
| ) | `[pure virtual]`

| Load a font by name. Returns a new iFont object or 0 on failure.

virtual void iFontServer::SetWarnOnError | ( | bool | enable | ) | `[pure virtual]`

| Enable or disable error reporting. By default, the font loaders emit a warning when a font could not loaded. Use this method to enable or disable that behaviour.

The documentation for this struct was generated from the following file:

- ivideo/fontserv.h