/***************************************************************************** | This is a demonstration program for Microcosm Fonts for the Borland Graphics | Library (BGI). | | (C) Copyright 1992-1995 Tom Wright, Microcosm, 619-488-4462 | internet e-mail wright@siggraph.org | | This program is legally protected. See the README file for details. *****************************************************************************/ #include #include // for your own use, uncomment the following line and adjust as needed // #define BGI_DIRECTORY "c:\\borlandc\\bgi" int main() { int gdriver = DETECT, gmode; int fontHandle; #ifdef BGI_DIRECTORY initgraph(&gdriver, &gmode, BGI_DIRECTORY); #else // use of linked driver allows demo to run without knowing BGI location if (registerbgidriver(EGAVGA_driver)<0) return fprintf(stderr, "registerbgidriver failed\n")!=0; initgraph(&gdriver, &gmode, ""); #endif if (graphresult()!=grOk) return fprintf(stderr, "initgraph failed\n")!=0; fontHandle = installuserfont("HB-A"); settextstyle(fontHandle, HORIZ_DIR, 0); setusercharsize(1, 1, 1, 1); outtextxy(10, 120, "This is a sample of HB-A, a 10 pixel high bold font."); getch(); closegraph(); return 0; }