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
Terminal not showing specified fontFamily
#10112
Comments
Has anyone actually gotten this to work with a user installed font? Does anyone have any suggestions of how to debug this? |
xref: #6657 |
I'm not sure running the container as root had any effect however what did work was installing the I'm not sure if there's a better way? Since this works though, I'll go ahead and close this... |
@dhirschfeld Dumb question: did you try setting "fontFamily": "Fira Code" ? I've run into similar trouble in the past, and in my case it was always about using the wrong font-family name. I just now tested this, this value: "fontFamily": "FiraCode" or any nonsense value: "fontFamily": "foobarlas89yu3" gives the strange double spaced font shown in the OP, while: "fontFamily": "Fira Code" and "fontFamily": "fira code" both correctly display Fira Code. I think the caps thing is because my apple filesystem is case insensitive |
I think I tried all possible ways of specifying the Fira Code font name. I can double check... |
I assumed. But the alternative explanation seems to be that your container runtime is leaking font config. Which sounds both fantastical and awful |
Yeah - just tested all combos from a desktop without the Fira Code font installed and no joy. |
In case it matters, it's actually the Fira Code Nerd Font: Which (IIUC) is a patched version of Fira Code to include symbols used by the https://starship.rs/ prompt.
😆 It seems strange to me that I have to install a font locally. It's a bit of a hassle, but I'm glad found a workaround. If someone figures out a better solution I'm all ears. AFAIK my container is just an ordinary Ubuntu container with Python/JupyterLab installed. The relevant config: RUN mkdir -p /usr/share/fonts/truetype/firacode \
&& curl -sSL https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/FiraCode.zip -o ~/FiraCode.zip \
&& unzip ~/FiraCode.zip -d /usr/share/fonts/truetype/firacode/ \
&& find /usr/share/fonts/truetype/firacode/ -type f -name '*Windows*' -delete \
&& find /usr/share/fonts/truetype/firacode/ -type f -name '*otf' -delete \
&& fc-cache -fv \
&& chown -Rv 1000:1000 /usr/share/fonts/truetype/firacode \
&& rm -f ~/FiraCode.zip |
Description
I've installed
Fira Code
in my Ubuntu 18.04 container and am trying to use it for the JupyterLab terminal with no success..The font is recognised by
fc-list
:...but when I specify it in my terminal config:
It results in something that looks like double-spaced Times New Roman:
...which seems to be what happens when JupyterLab doesn't recognise the specified font (e.g. if you specify
"dsfafds"
you get the same result.)If I specify
consolas
(or a fallback toconsolas
) the font renders correctly:I've pretty exhaustively tried all ways of specifying the name, including quotes and no quote with no joy.
The text was updated successfully, but these errors were encountered: