
Description | Cautions | Example | Errors | Hints
Name: |
int fx_loadfont(chdev, fontfh, mode) | |
Inputs: |
int dev |
fax channel device handle |
|
int fontfh |
fax font file handle |
|
unsigned long mode |
mode flag |
Returns: |
0 if success (on invocation in asynchronous mode) | |
|
-1 if failure (on invocation in asynchronous mode) | |
Includes: |
srllib.h | |
|
dxxxlib.h | |
|
faxlib.h | |
Category: |
miscellaneous | |
Mode: |
synchronous/asynchronous | |
|
||
The fx_loadfont( ) function loads ASCII font to the VFX/40ESCplus board. This function allows an application to change the fonts used by the VFX/40ESCplus for ASCII to fax conversion and for the fax page header.
The VFX/40ESCplus supports the following ASCII font sizes:
The fax driver determines the font size (font ID #0 or ID #3) from the header in the font file.
If the font is successfully loaded on the specified board, the function returns TFX_LOADFONT.
You must issue this function on the first channel of the fax device and it will take effect on all channels of that device.
#include <windows.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <faxlib.h>
int dev; /* Fax channel device handle. */
int voxdev; /* Voice channel device handle. */
int rc;
int gerc;
int fontfh;
main( )
{
/*
* Open the channel using dx_open( ) to obtain the Dialogic
* voice channel device handle in voxdev.
*/
if ((voxdev = dx_open("dxxxB1C1", NULL)) == -1) {
/* Error opening device */
/* Perform system error processing */
exit(1);
}
/*
* Open the first channel on each board using fx_open( )
* to obtain the fax channel device handle in dev.
*/
if ((dev = fx_open("dxxxB1C1", NULL)) == -1) {
/* Error opening device */
/* Perform system error processing */
exit(1);
}
.
.
/*
* Open font file and call fx_loadfont( ) to
* load new font for all channels on this device.
*/
if((fontfh=dx_fileopen("default0.fnt",O_RDONLY | O_BINARY)) == 0) {
printf("Error opening default0.fnt \n");
/* Error processing. */
}
if (fx_loadfont(dev, fontfh, EV_SYNC) == -1 ) {
printf("Error - %s \n", ATDV_ERRMSGP(dev));
/* Error processing. */
.
.
}
.
.
dx_fileclose(fontfh);
ATDV_LASTERR( ) returns the following fax error codes for the following reasons:
|
|
|
EFX_INVALARG |
Invalid argument |
|
EFX_NOTIDLE |
Channel not idle |
EFX_INVALID_FONT |
Invalid font data file |
EFX_UNSUPPORTED |
Function or sub-function not supported by firmware |
For a complete list of fax errors, see Appendix D.
To determine the fonts currently loaded on a VFX/40ESCplus board or any VFX solution board, use the SCFAXDEM fax demo program to send the fonttest.txt file to a fax machine. The fonts currently loaded on the specified board will print. The SCFAXDEM demo program is installed by default in the samples subdirectory.
Click here to contact Dialogic Customer Engineering
Copyright 2002, Intel Corporation