VOOZH about

URL: https://www.geeksforgeeks.org/c/settextstyle-function-c/

⇱ settextstyle function in C - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

settextstyle function in C

Last Updated : 1 Dec, 2021

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. 
Syntax : 
 

void settextstyle(int font, int direction, int font_size);

where,
font argument specifies the font of text,
Direction can be HORIZ_DIR (Left to right) 
or VERT_DIR (Bottom to top).


Examples : 
 

Input : font = 8, direction = 0, font_size = 5
Output : 
👁 Image
Input : font = 3, direction = 0, font_size = 5
Output : 
👁 Image

The table below shows the fonts with their INT values and appearance:

👁 Image


Below is the implementation of settextstyle() function : 
 

Output: 
 

👁 Image
Comment