-
Notifications
You must be signed in to change notification settings - Fork 19
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
fonts not working on Linux #138
Comments
I have a same problem when using httpgd in a remote vscode server, |
Thanks for trying out httpgd and opening the issue! Fonts are not embedded in the SVG so they have to be installed both on the server as well as locally. If they are and it still does not work let us know |
How can I find out what's the font that is missing? 🙈 |
You can look it up in the .SVG if you open it in a text editor. Otherwise you can attach it here then I will have a look. |
I should maybe open a separate issue for this, but given I'm running a workshop using a VSCode dev container that will run in Codespaces, and I'd love to be able to supply a font that works as well in |
The container I have set up is here: https://github.com/jimjam-slam/icuc11-workshop-dataviz/tree/main (you can launch it in Codespaces here). The fonts are kept in I find that font support is unchanged even if I manually call |
I'm running the VSCode R extension, which uses httpgd, and e.g:
This doesn't happen when running the same line from a non-attached R repl. This is macOS Sonoma, but I guess it's the same issue. |
This works, to be clear, you have to go to the URL (in vscode there's an icon with a square and an arrow pointing to the top right above the plot), then inspect the page or otherwise access the SVG that you see displayed there. Open it in a text editor, you'll see a bunch of My setup: MacBook running VSCode, remote server with R extension running on remote with latest httpgd. @nx10 I do not know if you are involved with the VS Code integration, but it would be nice to somehow expose the |
I'm coming here to second @agilly's comment, which somehow was written in a way such that I finally understood... I tried for many hours to do all sorts of fancy things with system fonts, VS-Code settings, etc. In the end the solution for me was simple:
I am utilizing a CodeServer instance via Open OnDemand. The job is handled via a slurm scheduler, the OS is Rocky9. My laptop/local computer is an Apple M1 operating under the Monterey OS. |
Hello,
I have been testing out R in VSCode and the fonts don't appear to be working properly (and appear to be a serifed font). I have seen #85, but unlike in that post, it does appear that the fonts are installed on the machine. The exported plots (I checked pdf and png) have the correct font, but Vscode/R/httpgd plot display does not. The problem occurs in both a "normal" R environment and a conda environment in Linux.
I have been through the httpgd documents, the svglite documentation, and systemfonts documentation (like the commenter in #85), but I'm not really sure where to start with this issue. Do you have any suggestions?
Editing to add that the plots are working properly locally (Mac), and that when I don't use httpgd when I'm working remotely (linux) the X window also displays the proper font.
Thanks!
Jen
The text was updated successfully, but these errors were encountered: