murtazakramer
murtazakramer

Reputation: 35

Changing font type of Jupyter Notebook output in VSCode

I need help with changing the font of output in Jupyter Notebook. Sometime ago VSCode was updated and I saw the output font was changed from Consolas to Segoe UI. How can I revert this back?

Upvotes: 2

Views: 7058

Answers (4)

Adam Smith
Adam Smith

Reputation: 33

There is a setting that does exactly what you want.

  1. From the File Menu, choose Preferences, then Settings.

  2. Search for "Notebook > Output Font Size".

I've set mine to 12.

Upvotes: 0

Owieczka
Owieczka

Reputation: 51

Just insert at the beginig of your code

# Fix for Visual Studio Code
from IPython.core.display import HTML
HTML(r"""
<style>
    * {
        #color: red;
        #font-family: ‘Cascadia Code PL’;#,‘Courier New’, Courier, monospace; 
        font-family: ‘Courier New’, Courier, monospace; 
        font-size: 10px !important;
        line-height: 1.1 !important;
    }
    .output-plaintext, .output-stream, .output {
        font-family: ‘Courier New’, Courier, monospace; # Any monospaced font should work
        line-height: 1.3 !important;
        font-size: 12px !important;
    }
</style>
""")

Upvotes: 5

Maxime Dion
Maxime Dion

Reputation: 54

It looks like this is the fault of the new renderer of version 1.65 (link).

One work around is to go back to 1.64.2. The Jupyter extension need to be downgraded as well.

Upvotes: 3

sidverma
sidverma

Reputation: 1185

Press command + shift+ p and then VScode bar will open add > and search "Open settings(UI)"

For quick: directly type "font" in "search setting" and scroll down to see the "Font Family" for editor and there you can add your desired font family.

Upvotes: 2

Related Questions