Changing font type of Jupyter Notebook output in VSCode

Question:

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?

Asked By: murtazakramer

||

Answers:

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.

Answered By: sidverma

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.

Answered By: Maxime Dion

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>
""")
Answered By: Owieczka