settextstyle function in C
The header file graphics.h contains settextstyle() function which is used to change the way in which text appears. Using it we can modify the size of text, change direction of text and change the font of text.
void settextstyle(int font, int direction, int font_size);
font argument specifies the font of text,
Direction can be HORIZ_DIR (Left to right)
or VERT_DIR (Bottom to top).
Input : font = 8, direction = 0, font_size = 5
Input : font = 3, direction = 0, font_size = 5
The table below shows the fonts with their INT values and appearance:
Below is the implementation of settextstyle() function :
gd = DETECT, gm;
x = 150;
y = 150;
font = 8;
direction = 0;
font_size = 5;
settextstyle(font, direction, font_size);
"Geeks For Geeks"
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses
are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!