# dmxfont.c File Reference

`#include "dmx.h"`
`#include "dmxsync.h"`
`#include "dmxfont.h"`
`#include "dmxlog.h"`
`#include <X11/fonts/fontstruct.h>`
`#include "dixfont.h"`
`#include "dixstruct.h"`

## Defines

#define | DMX_FONTPATH_DEBUG 0

## Functions

static int | dmxFontErrorHandler (Display *dpy, XErrorEvent *ev)
static char ** | dmxGetFontPath (int *npaths)
static void | dmxFreeFontPath (char **fp)
static Bool | dmxCheckFontPathElement (DMXScreenInfo *dmxScreen, char *fp)
static int | dmxSetFontPath (DMXScreenInfo *dmxScreen)
static int | dmxCheckFontPath (DMXScreenInfo *dmxScreen, int *error)
static int | dmxProcSetFontPath (ClientPtr client)
void | dmxInitFonts (void)
void | dmxResetFonts (void)
Bool | dmxBELoadFont (ScreenPtr pScreen, FontPtr pFont)
Bool | dmxRealizeFont (ScreenPtr pScreen, FontPtr pFont)
Bool | dmxBEFreeFont (ScreenPtr pScreen, FontPtr pFont)
Bool | dmxUnrealizeFont (ScreenPtr pScreen, FontPtr pFont)

## Variables

static int(* | dmxSaveProcVector [256])(ClientPtr)
static int | dmxFontLastError

## Detailed Description

This file provides support for fonts.

## Define Documentation

#define DMX_FONTPATH_DEBUG 0

## Function Documentation

Bool dmxBEFreeFont | ( | ScreenPtr | pScreen,
|  | FontPtr | pFont |
| ) |  |  |

Free pFont on the back-end associated with pScreen.

References _DMXScreenInfo::beDisplay, dmxFontPrivateIndex, dmxScreens, and _dmxFontPriv::font.

Referenced by dmxBEDestroyResources(), and dmxUnrealizeFont().

Bool dmxBELoadFont | ( | ScreenPtr | pScreen,
|  | FontPtr | pFont |
| ) |  |  |

Load the font, pFont, on the back-end server associated with pScreen. When a font is loaded, the font path on back-end server is first initialized to that specified on the command line with the -fontpath options, and then the font is loaded.

References _DMXScreenInfo::beDisplay, dmxCheckFontPathElement(), dmxError, dmxFontPath, dmxFontPrivateIndex, dmxFreeFontPath(), dmxGetFontPath(), dmxIgnoreBadFontPaths, dmxLog(), dmxScreens, dmxSetFontPath(), dmxSync(), dmxWarning, and _dmxFontPriv::font.

Referenced by dmxAttachScreen(), dmxBECreateResources(), and dmxRealizeFont().

static int dmxCheckFontPath | ( | DMXScreenInfo * | dmxScreen,
|  | int * | error |
| ) |  |  | `[static]`

References _DMXScreenInfo::beDisplay, dmxSetFontPath(), and dmxSync().

Referenced by dmxProcSetFontPath().

static Bool dmxCheckFontPathElement | ( | DMXScreenInfo * | dmxScreen,
|  | char * | fp |
| ) |  |  | `[static]`

References _DMXScreenInfo::beDisplay, dmxFontErrorHandler(), dmxFontLastError, and dmxSync().

Referenced by dmxBELoadFont().

static int dmxFontErrorHandler | ( | Display * | dpy,
|  | XErrorEvent * | ev |
| ) |  |  | `[static]`

References dmxFontLastError.

Referenced by dmxCheckFontPathElement(), and dmxSetFontPath().

static void dmxFreeFontPath | ( | char ** | fp | ) | `[static]`

Referenced by dmxBELoadFont(), and dmxSetFontPath().

static char** dmxGetFontPath | ( | int * | npaths | ) | `[static]`

References dmxDebug, and dmxLog().

Referenced by dmxBELoadFont(), and dmxSetFontPath().

void dmxInitFonts | ( | void |  | ) |

Initialize font support. In addition to the screen function call pointers, DMX also hooks in at the ProcVector[] level. Here the old ProcVector function pointers are saved and the new ProcVector function pointers are initialized.

References dmxSaveProcVector.

Referenced by InitOutput().

static int dmxProcSetFontPath | ( | ClientPtr | client | ) | `[static]`

References dmxCheckFontPath(), dmxNumScreens, and dmxScreens.

Bool dmxRealizeFont | ( | ScreenPtr | pScreen,
|  | FontPtr | pFont |
| ) |  |  |

Realize the font, pFont, on the back-end server associated with pScreen.

References _DMXScreenInfo::beDisplay, dmxBELoadFont(), dmxFontPrivateIndex, dmxScreens, _dmxFontPriv::font, and _dmxFontPriv::refcnt.

Referenced by dmxScreenInit().

void dmxResetFonts | ( | void |  | ) |

Reset font support by restoring the original ProcVector function pointers.

References dmxSaveProcVector.

Referenced by dmxCloseScreen().

static int dmxSetFontPath | ( | DMXScreenInfo * | dmxScreen | ) | `[static]`

References _DMXScreenInfo::beDisplay, dmxFontErrorHandler(), dmxFontLastError, dmxFreeFontPath(), dmxGetFontPath(), and dmxSync().

Referenced by dmxBELoadFont(), and dmxCheckFontPath().

Bool dmxUnrealizeFont | ( | ScreenPtr | pScreen,
|  | FontPtr | pFont |
| ) |  |  |

Unrealize the font, pFont, on the back-end server associated with pScreen.

References _DMXScreenInfo::beDisplay, dmxBEFreeFont(), dmxFontPrivateIndex, dmxScreens, _dmxFontPriv::font, and _dmxFontPriv::refcnt.

Referenced by dmxScreenInit().

## Variable Documentation

int dmxFontLastError `[static]`

Referenced by dmxCheckFontPathElement(), dmxFontErrorHandler(), and dmxSetFontPath().

int(* dmxSaveProcVector[256])(ClientPtr)`[static]`

Referenced by dmxInitFonts(), and dmxResetFonts().

Generated June 29, 2004 for Distributed Multihead X by doxygen 1.3.4. </addres>