8

Can the font size be controlled from inside a NodeJS app when logging with console.log()?

I'm only interested in changing it at runtime and not changing it in the terminal settings.

4
  • Pardon? Terminal uses fixed font. There are some ways for some terminals to change font for entire terminal, but I doubt that it's what you want. Commented Oct 23, 2014 at 7:10
  • @AlexeyTen What if the fond is changed twice? Will the sizes be maintained or all the text will be reset at the same size? Commented Oct 23, 2014 at 7:37
  • Changing the terminal font-size is out of scope of a node.js app. You can only control the color and style (underline etc) with this npmjs.org/package/colors. Commented Oct 23, 2014 at 7:46
  • @laggingreflex That's what I wanted to know. Please add an answer with an explanation. And keep in mind I'm not interested in colors anything else. Commented Oct 23, 2014 at 7:50

1 Answer 1

13

The way console.log works is that the output is sent to stdout or stderr, which are the standard stream provided by the OS to the application (nodejs) where it writes its output data. You can only pass text and ANSI escape codes to control the formatting of the text.

There's no option to control the font-size of the terminal text from within your node.js app.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.