Text size in C

This is a discussion on Text size in C within the C Programming forums, part of the General Programming Boards category; Hi Friends, I wanted to increase the font or text size in a C program. I am using turbo C ...

  1. #1
    Registered User
    Join Date
    Jul 2006
    Posts
    3

    Text size in C

    Hi Friends,

    I wanted to increase the font or text size in a C program. I am using turbo C v2.01. I am using textcolor() for giving color to my text but I am not being able to increase the size of text. Please tell me about some way so that I can increase the size of font or text in a C program.


    Thanks
    Ravi Verma

  2. #2
    Registered User
    Join Date
    Jun 2004
    Posts
    277
    Quote Originally Posted by adminravi
    Hi Friends,

    I wanted to increase the font or text size in a C program. I am using turbo C v2.01. I am using textcolor() for giving color to my text but I am not being able to increase the size of text. Please tell me about some way so that I can increase the size of font or text in a C program.


    Thanks
    Ravi Verma
    Standart C doesn't care about it, you will need to find a lib or maybe pass some envoirment variables if you are using *nix.

  3. #3
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    I'd suggest one of those $.99 magnifying glasses you can get at your local 5 and dime. I guess there aren't any of those stores left. Try Wal-mart.

    While you're there, buy a real compiler.


    Quzah.
    Hope is the first step on the road to disappointment.

  4. #4
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    As far as I know the text on the console is a fixed size.

  5. #5
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,638
    Windows comes with a magnifier. It's in Start -> Acessories -> Accessibility.
    If you want your application to be portable, or even if you don't, try not to mess with console settings too much.

  6. #6
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,163
    Quote Originally Posted by citizen
    Windows comes with a magnifier.
    But considering the OP's compiler, he's probably using DOS 5.0
    If you understand what you're doing, you're not learning anything.

  7. #7
    Registered User
    Join Date
    Jul 2006
    Posts
    3

    Thnx for your reply

    Thanks very much but most of you are not getting me. I have no problem with my eyes. I don't need a magnifying glass maybe it cost 5 dime or free of cost.

    Yes, I am using dos based compiler turbo C v2.01, and I am looking for a few codes to that I can decorate my output program a little. Like I am using textcolor() to give colour to my text in the same way, is there any function for outputting the text in a larger size, like in html we can use <h1></h1> or <font size=5> etc.

    If it is not possible in Turbo C then can you tell me how to do it in bloodshed dev-c++, but unfortunately textcolor() is not supported in bloodshed dev-c++.

    Waiting for some expert comments.

    Regards,
    Ravi Verma

  8. #8
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,163
    You can't change a font in the console window without changing the font that the console uses for everything. Back when tubo C v2.01 was new, that was common knowledge (I thought that it still was, but I guess I was just denying the power of ignorance).

    If you want pretty things then you'll need to learn how to write GUI programs.
    If you understand what you're doing, you're not learning anything.

  9. #9
    Registered User
    Join Date
    Aug 2001
    Posts
    244
    loool... magnifying glasses... rooofl

    anyway, i would have said you can't scale the text-output (so what is printed to the console).

    but now i also suggest magnifying glasses

    or use some graphics library.
    signature under construction

  10. #10
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    Figlets. Haw haw.

    http://www.google.com/search?&q=figlet

    Even text color is non-portable. But many major OSs made the decision to provide the ability to change console text color. But I do not know of any who provided a way to change text size.

    With Dev C++, you can change the text color by using the system's color.exe command, or the WinAPI's SetConsoleTextAttribute function. But you can not change the text size without going around and finding a console compatible font and replacing it.

  11. #11
    Registered User
    Join Date
    Aug 2001
    Posts
    244
    uh for text color: use ansi escape codes - they are pretty portable.

    http://en.wikipedia.org/wiki/ANSI_escape_code


    edit: oh.. windows in the "newer" versions does not support that anymore... lol microsoft really sucks... since they had the support....
    signature under construction

  12. #12
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,046
    You might want to look at the FAQ titled "How do I color my text?"
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  13. #13
    Registered User
    Join Date
    Mar 2006
    Posts
    725
    Decrease your terminal resolution?
    Code:
    #include <stdio.h>
    
    void J(char*a){int f,i=0,c='1';for(;a[i]!='0';++i)if(i==81){
    puts(a);return;}for(;c<='9';++c){for(f=0;f<9;++f)if(a[i-i%27+i%9
    /3*3+f/3*9+f%3]==c||a[i%9+f*9]==c||a[i-i%9+f]==c)goto e;a[i]=c;J(a);a[i]
    ='0';e:;}}int main(int c,char**v){int t=0;if(c>1){for(;v[1][
    t];++t);if(t==81){J(v[1]);return 0;}}puts("sudoku [0-9]{81}");return 1;}

  14. #14
    Registered User
    Join Date
    Jul 2006
    Posts
    4
    dear ravi

    this is chaitenya yadav and dear frd u can change the font size of the text but for that you have to use the graphic.h header file. In graphic.h you get a function using that u can change the font size as well as look of the font.

    at present i m not remind the function name but u can search it in graphics.h.

    just go in help->contents->header Files-> Graphics.h and search the function. in turboc3

  15. #15
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    If you check out lynx, it's a complete text browser and it doesn't change the font size either. It uses colouring instead.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. char Handling, probably typical newbie stuff
    By Neolyth in forum C Programming
    Replies: 16
    Last Post: 06-21-2009, 04:05 AM
  2. Replies: 16
    Last Post: 11-23-2007, 12:48 PM
  3. How to Change Text File Font Size
    By space in forum Windows Programming
    Replies: 3
    Last Post: 08-07-2006, 11:42 PM
  4. Changing text size in a program
    By RedTroja in forum C++ Programming
    Replies: 3
    Last Post: 10-12-2003, 03:53 AM
  5. How can I extend the text size limit of TMemo from C++ Builder?
    By Unregistered in forum Windows Programming
    Replies: 5
    Last Post: 06-27-2002, 02:24 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21