JuliaMono font on Windows 10

Tried JuliaMono font on Windows 10 with vscode/julia (1.0.0).

In all cases, I set font to JuliaMono:

Julia Manual: image

Copied to Word: image

Copied to file in vscode: image

Copied to REPL in cmd window: image

Copied to REPL in vscode (PowerShell): image

Since the letter displays correctly in Word, the font itself seems to be o.k. for this letter.

Can anyone give advice how to at least display the letter correctly in the REPL.

@cormullion, @davidanthoff

Hi Martin.

This works OK in VSCode REPL on Mac

Screenshot 2020-07-31 at 20.39.08

(It has to be the worst letter to choose - so narrow…!)

I expect it’s beyond PowerShell, but not sure what cmd window is.

but not sure what cmd window is.

A very old command window (from Windows 7 and before).

The really important point would be that in the REPL of vscode it is displayed correctly. Since vscode is using PowerShell and the letter is not correctly displayed in PowerShell, vscode can probably not do anything (or does someone knows some hack)?

I’m not sure what that refers to? If you start a Julia REPL in VS Code with the extension command, no PowerShell is involved anywhere.

It works for me on VS Code on Windows 10. I installed the fonts, then set the font in the settings (screenshot below) and then reloaded the window, and it showed up in both the terminal in VS Code and in the main part of the window.

2 Likes

Those two are probably the source of the problem. You should use a modern terminal like Windows Terminal (which nicely wraps both cmd and PowerShell, as well as other shells).

Last time I looked at this I had to type JSON strings - is this the new less nerdy version?

Yep! It’s “Settings (UI)” in the command palette. I think it’s been there for awhile, but I’m not sure how long. Some of the settings just send you to the JSON version though.

1 Like

I’m not sure what that refers to? If you start a Julia REPL in VS Code with the extension command, no PowerShell is involved anywhere.

Sorry, this was a misunderstanding from my side.

Just to make it clear: I start vscode (with Julia extension), then type in “julia” in the terminal window to start julia and then write “\biM” with tab completion or copy it from the web-browser (Julia manual). The letter is not shown.

Those two are probably the source of the problem. You should use a modern terminal like Windows Terminal (which nicely wraps both cmd and PowerShell, as well as other shells).

Thanks for this hint. Just tried, but got the error message, that Windows terminal requires a newer build version of Windows 10, as I have.

This is what I did:

image

Then got (note, on the right “powershell” is stated):

image

Typing julia results in:

image

@MartinOtter so in general you’ll get a much nicer integrated experience if you start Julia via the Julia: Start REPL command, rather than starting it from PowerShell.

Having said that, I don’t think this would make any difference for this copy paste issue. I think this sounds mostly like the integrated terminal in VS Code here has a problem…

1 Like

Can ligatures combine two characters into the space of one? If so, it might be kind of cool if this package had ligatures for .+, .*, etc… which were squashed together to take up the space of only one character, making broadcast expresssion take up less space / easier to read. This would be a pretty uniquely Julia thing and would really only make sense in the context of this Julia-specific font.

Hi Marius that’s a cool idea! Yes, it’s possible to replace any number of characters with a single glyph. So this is possible:

Screenshot 2020-08-01 at 07.52.59

You say “take up less space”/“easier to read” - but I don’t think those are the same thing. It’s true, you do save a space. But I’m not so sure it’s easier to read… It looks good on a high-res screen enlarged, true, but at 10 point on a non-HD device I think you might easily mistake that for a smudgy +.

Also worth pointing out that not all text environments render these alternate glyphs: true terminals and editors might do, but Juno/VS Code terminals and Github won’t, for example.

Although I’m not a big fan of them myself, I could add them if there was sufficient demand. Perhaps open an issue and see.

2 Likes

I can see the justification for the .+ space saving. It would help with understanding code.
But please, a plea from someone with older eyes. Make sure it is clear.
I use a 17 point font when editing with visual editors anyway, so my plea does not apply to those ninjas who edit with an 8 point font. (*)

(*) I am exaggerating for effect. No one does that. Right?

4 Likes

Here’s a plea from someone with younger eyes too :smiley:

Visual Studio (the IDE) has all fonts set to 9 by default. Close enough…

1 Like

Are you sure that’s the wrong font? It’s hard for me to tell. My test is

julia> using REPL

julia> REPL.REPLCompletions.latex_symbols["\\julialogo"] = "\ue800"
"\ue800"

julia> î €

and seeing the three dots of the Julia logo. (I just did that in powershell via VS Code and it worked fine). Note in the last line I typed \julialogo and then tab to complete it, resulting in the unicode character (which probably just shows up as an empty box in the browser!). Alternatively, just copy that character to the terminal and see if you see the 3 dots.

1 Like

I’m concerned this would break alignments in source files when viewed/edited with another font, which would suck for collaboration. I’m OK with using fancy Unicode characters that need a font with good Unicode support (hopefully widespread one day), but changing the positions of characters in a monospace font seems wrong.

1 Like

It’s a good revenge if your collaborator used \Equal or \eqeqeq to confuse you with single character equal signs (like 1 ⩵ 1 and 1 ⩶ 1) that do not work…

3 Likes

My impression of how ligatures work is that they squash characters together, but increase the outside spacing. So they shouldn’t change alignment at all.