Attach to a font server
#include <photon/Pf.h> struct _Pf_ctrl *PfAttach( const char *device, long size ); #include <font_api.h> struct _Pf_ctrl* PfAttachCx( const char *device, long size );
These functions attach to the font server.
PhAttach() calls PfAttach() as part of the standard Photon initialization sequence. The font library automatically invokes PfAttach() when the library detects that the font server has been restarted. The font control structure pointer is stored in the global Photon control structure.
If you simply want to override the default font context, you can set the two environment variables (PHFONT and PHFONTMEM) to new values before performing standard Photon initialization, instead of calling this function directly.
If you want to use multiple font contexts, open them with PfAttachCx(), and then use the Cx versions of the font functions. PfAttachCx() allocates and returns a font context, and requests a font server connection. You need the font context returned by PfAttachCx() or PfAttachDllCx() to pass as the first argument to other font library Cx functions.
To detach from the font server, call the corresponding function PfDetach() or PfDetachCx().
A pointer to an internal control structure if successful; NULL otherwise.
PfAttachCx(): See the examples for PfConvertFontIDCx() and PfRenderCx().
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | Yes |
PfAttachDllCx(), PfAttachLocalDll(), PfDetach(), PfDetachCx(), PfExtentCx(), PfExtentTextCharPositionsCx(), PfGenerateFontNameCx(), PfGetOutlineCx(), PfRenderCx()
Fonts chapter of the Photon Programmer's Guide