Add JuliaMono as default font in VSCode
The idea is to download JuliaMono from: https://github.com/cormullion/juliamono/blob/master/juliamono-ttf.zip and add the .ttfs to packages\fonts.
Then before any VSCode launch, the following code can be adapted and run to ensure all fonts are temporary available to the system https://gist.github.com/Jaykul/d53a16ce5e7d50b13530acb4f98aaabd , for eg bin/activate-juliawin-fonts.ps1 with content:
add-type -name Session -namespace "" -member @"
[DllImport("gdi32.dll")]
public static extern int AddFontResource(string filePath);
"@
$null = foreach($font in Get-ChildItem -Path "$juliawin_packages\fonts" -Recurse -Include *.ttf, *.otg) {
[Session]::AddFontResource($font.FullName)
}
On the VSCode side we should add JuliaMono in the font setting, (over here, https://github.com/heetbeet/juliawin/blob/main/userdata/.vscode/data/user-data/User/settings.json ), similarly to this guide https://dev.to/thegeoffstevens/vs-code-settings-you-should-customize-5e75 but replacing Fira with Juliamono:
"editor.fontFamily": "Fira Code"
"editor.fontLigatures": true
Does it mean the Font will be added only for the session of VS Code? What happens if VS Code crashes? Or is it added for as long as the kernel (Windows Kernel) session is a live?
This .ps1 script allows the fonts to be added to Windows's font cache without installing it. It is accessible by any program until the next reboot (for the duration of the current Windows Kernel).
Ideally I would have have wanted the font to only be active for the duration of the VSCode session and only accessible to VSCode. This, however, it not possible as far as I know.
Hmm it seems like the font is added permanantly to the user's fonts. This is a bit rude and not ideal.
Is the attachment a solution for this or the permanent addition?
The attachment is a solution for portably adding the fonts to the current windows session. I'm still not sure if it's a good idea since every Windows app will reflect the fonts until the next reboot.
Maybe have a documented option for Opt In?
Yes, like maybe an env variable (that can now be set in startup.cmd).
Like set JULIAWIN_JULIAMONO_FONTS=true
Yep, that would be great. Once it is there, let me know, I will document it in the Wiki page.
Any chance to have this in the 1.9.x version?