#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int n,size;
char line[20];
int gd=DETECT,gm;
initgraph(&gd,&gm,"c:\\tc\\bgi");
printf("Enter the line of text : ");
fflush(stdin);
gets(line);
printf("\nFONT MENU : ");
printf("\n0 -> DEFAULT_FONT ");
printf("\n1 -> TRIPLEX_FONT ");
printf("\n2 -> SMALL_FONT ");
printf("\n3 -> SANS_SERIF_FONT ");
printf("\n4 -> GOTHIC_FONT ");
printf("\nEnter the font required : ");
scanf("%d",&n);
printf("\nEnter font size(1-4) : ");
scanf("%d",&size);
settextstyle(n,HORIZ_DIR, size);
outtextxy(300,300,line);
getch();
closegraph();
}
|
|
| To demonstrate the operation of set file style ( ) function. |
|
| |
|
|
|
|