EZwgl (12.13 Text)

## 12.13 Text

The EZwgl provides support for bitmap fonts and vector fonts. For `EZ_XIMAGE` back buffers, only the vector font is supported. The library also provides two methods to specify the location to render text strings: in modeling space and in screen space. To set the current font use

`void EZ_SetVectorFont(int vfont)`

This function sets the current vector font. Only two vector fonts are supported, a small vector font `EZ_SMALL_VECTOR_FONT` or a large vector font `EZ_LARGE_VECTOR_FONT`.

The next function sets the current bitmap font.

`void EZ_SetBitmapFont(char *fontName);`

To specify where to render text on the screen. Use the following set of functions.

    void EZ_CMove3f(float x, float y, float z);
    void EZ_CMove2f(float x, float y);
    void EZ_CMove3fv(float xyz[3]);
    void EZ_CMoveScreen3f(float x, float y, float z);
    void EZ_CMoveScreen2f(float x, float y);

These functions set the current character position.

To draw a string, use

`void EZ_DrawString(int whichFont, char *str);`

This function draws `str` using the current vector or bitmap font at the current character position.

If the current draw buffer is an `EZ_XIMAGE` back buffer, bitmap fonts defaults to the current vector font. There is no way to draw a bitmap font to an `EZ_XIMAGE` back buffer.

HTML Documentation Maintainance:`Arturo Espinosa <arturo@nuclecu.unam.mx>`