Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>installuserfont() install a user font</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 installuserfont()       Install a User Font

 #include   <graphics.h>

 int far installuserfont(fname);
 char far *fname;       Name of the file containing the stroked font.

        This function may be used to load a .CHR file that is not a
        built in part of the C++ graphics system. The maximum nuber of
        fonts that can be loaded is twenty.

    Returns:    The font ID number corresponding to the new font.
                if an error occurred, grERROR (-11) is returned.

   -------------------------------- Example ---------------------------------
        This example installs a .CHR file called MY_FILE.CHR.

           #include <graphics.h>

           int gdriver = DETECT;
           int gmode;

           main()
           {
               int myfont;

               initgraph(&gdriver,&gmode,"");
               myfont = installuserfont("MY_FILE.CHR");
               getch();
               closegraph();
           }


See Also: settextstyle()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson