-
Notifications
You must be signed in to change notification settings - Fork 30.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Independent font setting for notebook output #123149
Comments
(Experimental duplicate detection)
|
Something to mention related here. Non-monospaced fonts can look really bad in dataframe output in particular. microsoft/vscode-jupyter#6546 |
Starting from today, for whatever reason, in all of my vscode notebooks, the output is no longer rendered as monospace; rather, it's the default browser font (some sans): I've triple-checked all of my user/workspace settings, and there's nothing related to this. What could have cause this and how does one change it back to monospace?.. (It makes it extremely hard to work with any notebooks) |
For anyone else affected, you can temporarily set styles in your notebooks sort of like so: from IPython.core.display import HTML
HTML(r"""
<style>
.output-plaintext, .output-stream, .output {
font-family: Monaco, Menlo, monospace !important;
line-height: 1.2 !important;
font-size: 12px !important;
}
</style>
""") But this is an ugly hack, works for one notebook only, and I hope someone can answer what's the current story with notebook output fonts? |
PLEASE change the font behaviour back to what it was in the previous version. And may I please ask the team to see if they can improve their QA procedures before releasing a new version as I instantly picked up this issue the second I had to re-open VS Code, so in my view, this is not acceptable. It might seem like a minor nuisance to some, but when you have been working for weeks on a series of notebooks and suddenly your work looks messed up for no logical reason at all, it becomes a major annoyance. |
Since it would need to be fixed anyway, the best way to go would be to move 2 steps forward and finally allow users to set IIUC, if it can be done via a triivial CSS hack, it should also be trivial to add it to the settings? (and keep the default font-family the same as the terminal font / editor font / whichever - most importantly, monospace) |
You might be right, and I might just be confused, but I am not sure it is quite the same as the trivial hack. For example, compare the .show() output of a PySpark vs a Pandas DataFrame .head() in 1.64.2. The one needs monospace, the other doesn't use (or need) it. And then more subtle things, like if you show your spark session with simply The trivial CSS hack just forces everything to monospace and equally makes it "ugly" but at least everything is aligned. Things were perfect (in my opinion) before, so for now I just went back to the old version, and if this font issue stays I guess I will be stuck on this version until some fancy new feature arrives I just have to have. |
There's separate CSS classes, e.g. DataFrames and the like are more like overrides (their custom reprs output HTML, for dataframes it's |
@aldanor Thanks for the hack. Is there any way to make the monospaced font sans-serif? I tried a couple of different fonts, but they are all serif. |
verification steps: |
@chungmoklee commented on Wed May 05 2021
As far as know, there is no separate setting for notebook output font setting now.
(Correct me if I am mistaken about this)
I often want to reduce the font size and line space in the notebook output so that condensed information can be displayed.
Thanks in advance!
@DonJayamanne commented on Thu May 06 2021
Thanks for filing this issue, I don't think we have plans on supporting this at our end.
With the new Native Notebooks VS Code owns the output and the font settings.
Transferring issue to VS Code.
The text was updated successfully, but these errors were encountered: