Zulip Chat Archive
Stream: general
Topic: Loogle: font
Stuart Presnell (Nov 10 2023 at 10:10):
Could the font on loogle.lean-lang.org
be changed so that I
and l
look more distinct?
Martin Dvořák (Nov 10 2023 at 10:13):
Speaking of font, I recommend this one: https://www.jetbrains.com/lp/mono/
Joachim Breitner (Nov 10 2023 at 10:13):
Any suggestion for a good font? The docs page uses Source Code Prop. That would require switching to a mono-font, though.
Notification Bot (Nov 10 2023 at 10:13):
3 messages were moved here from #general > Loogle is live! by Joachim Breitner.
Joachim Breitner (Nov 10 2023 at 10:14):
Probably using the same as the doc page is the most reasonable choice that also side-steps possible bikeshedding :-)
Martin Dvořák (Nov 10 2023 at 10:16):
My suggestion is to use JetBrains Mono in all Lean tools.
Joachim Breitner (Nov 10 2023 at 10:17):
I’ll promise to change loogle when the doc page changes, so you only have one hill to fight on :-)
Richard Copley (Nov 10 2023 at 10:41):
I'll just mention that JuliaMono has better unicode coverage.
gif
Joachim Breitner (Nov 10 2023 at 10:48):
@Stuart Presnell , https://loogle.lean-lang.org/ now uses Source Code Pro for the type (but not the theorem name). I’m not sure it’s prettier, but probably more legible. Does that work for you?
Thomas Murrills (Nov 10 2023 at 13:59):
Here's a website that's useful for comparing unicode support, by the way (which is mentioned on the Julia Mono page), and also links to some other useful font comparators
Thomas Murrills (Nov 10 2023 at 14:01):
The only thing I miss in Julia Mono are the nice ligatures of e.g. Fira Code or JetBrains...it has a few, but far fewer! (Fira Code and JetBrains also take pains to make alignment and whitespace nice via subtle ligatures for e.g. :=
.)
loki der quaeler (Nov 10 2023 at 16:08):
perhaps https://monaspace.githubnext.com/
Joachim Breitner (Nov 10 2023 at 16:28):
Fancy stuff
Henrik Böving (Nov 10 2023 at 16:40):
Thomas Murrills said:
Here's a website that's useful for comparing unicode support, by the way (which is mentioned on the Julia Mono page), and also links to some other useful font comparators
I use Julia mono in all of my stuff so I would be very inclined to change the docs page to this if people like it better :D the only reason for the current font is that I copied it from the lean 3 variant
Henrik Böving (Nov 10 2023 at 16:41):
loki der quaeler said:
I also saw this this morning, I was planning into checking if they support all of my Unicode needs. Although I am indecisive as to which of the 5 variants I like. I'm currently stick between neon and krypton
Joachim Breitner (Nov 10 2023 at 16:50):
I would be very inclined to change the docs page to this if people like it better :D
If you like it better, just do it, and see if people complain :-)
Shreyas Srinivas (Nov 10 2023 at 17:12):
Risky move. It could annoy too many people. Providing an option might avoid trouble
Joachim Breitner (Nov 10 2023 at 17:33):
If it annoys too many people, you can easily revert. I doubt it will, though.
Joachim Breitner (Nov 10 2023 at 17:34):
Providing options is often the worst option. It just increases complexity, adds distraction, and disappoints those who expect good defaults. Avoid options if possible :)
Henrik Böving (Nov 10 2023 at 18:45):
Shreyas Srinivas said:
Risky move. It could annoy too many people. Providing an option might avoid trouble
i have a feeling 90% of people wouldn't even notice at all or after a week
Henrik Böving (Nov 10 2023 at 19:03):
Oh and if you really despise a font you can always just inject custom CSS to overwrite it of course.
Eric Wieser (Nov 10 2023 at 22:56):
It would be cool if we could have the vscode extension offer a pop up to make the same font change; there's value in having the same font in the editor and documentation
Shreyas Srinivas (Nov 10 2023 at 22:59):
We can. It is not too much effort.
Shreyas Srinivas (Nov 10 2023 at 23:00):
You don't necessarily want the same font in different environments.
Shreyas Srinivas (Nov 10 2023 at 23:00):
About adding a recommendation: For one thing it isn't clear whether the mathlib docs are planned for vscode viewing
Shreyas Srinivas (Nov 10 2023 at 23:01):
I asked Marc a few days ago and haven't heard back.
Shreyas Srinivas (Nov 10 2023 at 23:02):
The other thing is if we do offer mathlib4 docs inside vscode, and if a webview is used which just loads the webpage, then we don't need to do anything. In the main editor area, it is possible to offer recommended settings, but nothing stops this being overridden.
Shreyas Srinivas (Nov 10 2023 at 23:13):
For the how, see : https://code.visualstudio.com/docs/getstarted/settings#_language-specific-editor-settings
Eric Wieser (Nov 11 2023 at 07:21):
Shreyas Srinivas said:
About adding a recommendation: For one thing it isn't clear whether the mathlib docs are planned for vscode viewing
I never intended to suggest reading the docs from within vscode; the recommendation I was suggesting was to switch the font for lean code. I just think it's helpful if the symbols in notation look the same between editor and docs
Martin Dvořák (Nov 11 2023 at 08:06):
loki der quaeler said:
Texture healing is a complete new concept to me. My first impression is positive, but I don't know how ergonomic it will feel once I start staring at the text for 8 hours a day.
Eric Wieser (Nov 11 2023 at 08:30):
How's the unicode coverage?
Joachim Breitner (Nov 11 2023 at 10:20):
As someone who finds monospace typographically very unaesthetic, to the point that I use proportional fonts with manually crafted indentation in my papers (using the package polytable that's used by lhs2tex), I find the prospect of texture healing intriguing.
Henrik Böving (Nov 11 2023 at 11:40):
Eric Wieser said:
How's the unicode coverage?
I'll investigate this today!
Henrik Böving (Nov 11 2023 at 12:25):
Neon failure with unicode:
image.png
Argon failure:
image.png
(I'll leave out xenon and radon as they seem to be geared more towards prose writing)
krypton failure:
image.png
and this is just from a brief scroll through the abbreviations.json until I found something that looks weird, there is probably more that i didnt catch first sight
in JuliaMono all of these stay at least within the quotation marks. I also find basic things to be more distinguished in JuliaMono, for example or vs v (or is on top):
image.png
and we have things like this in neon:
so I'm probably gonna look into maybe changing the monospace font to JuliaMono and see how it looks later today.
eyelash (Nov 11 2023 at 13:46):
Since JetBrains Mono Source Code Pro is an open source project, if the only problem with that font is the Unicode coverage, you could also open a bug report with them and see if they're interested in fixing the coverage.
eyelash (Nov 11 2023 at 13:54):
The same is also true for JetBrains Mono and probably other fonts mentioned in this thread. In general I feel it would be a good idea to open bug reports for these fonts so that the coverage can be improved and Lean users have more fonts available that work well with Lean.
Julian Berman (Nov 11 2023 at 13:56):
There's https://github.com/adobe-fonts/source-code-pro/issues/49 and https://github.com/JetBrains/JetBrainsMono/issues/561 it seems for the two of those respectively already.
Henrik Böving (Nov 11 2023 at 14:34):
I mean both of those have been open for a while and are still not finished yet so I'm not going to hold my breath on that.
I have a local change that does two things now:
- Change the code font to JuliaMono
- Change the non code font to Lato Medium, this is the same font that the Julia docs use for their non code stuff so I decided to give it a go as well.
My subjective perception is: The JuliaMono one definitely looks better but that is probably because I use it myself. I do like the more ...minimalist? Way that Lato Medium looks although I am not yet fully sold on it.
Either way I'll now just push the changes and given the fact that initially everyone does of course dislike change I'll leave it be there for a week or something like that. If complaints die down by then I'll leave it be and otherwise we can always revert one or both back.
Joachim Breitner (Nov 11 2023 at 14:53):
I like the commit message :-D
Joachim Breitner (Nov 11 2023 at 14:55):
Loogle is following suite
Yaël Dillies (Nov 11 2023 at 14:57):
@Henrik Böving, while we're at it, could we revert the font in the search results to be the one we had in docs3# ? The monospacing is unnecessary there and having a non-monospace font makes you read a (significantly) greater portion of each name.
mathlib
mathlib4
Yaël Dillies (Nov 11 2023 at 14:59):
This has been bothering me for several months.
Joachim Breitner (Nov 11 2023 at 15:01):
Is Julia a wider font than Source Pro? My eyes seem to desire something more condensed.
Henrik Böving (Nov 11 2023 at 15:01):
Yaël Dillies said:
This has been bothering me for several months.
Yes I can do that let me figure out the CSS incarnation
Henrik Böving (Nov 11 2023 at 15:03):
Joachim Breitner said:
Is Julia a wider font than Source Pro? My eyes seem to desire something more condensed.
Hm, I don't really know.
Joachim Breitner (Nov 11 2023 at 15:03):
Anyways, as you say, let’s use it for a week before jumping to conclusions :-)
Joachim Breitner (Nov 11 2023 at 15:05):
Although would it be heretic to consider a non-monospace font for docs and loogle? There is no vertical alignment that would call for one, and I find proportional fonts to be more readable, if only because they take less space. (A good unicode coverage and distinctive letters are of course still the primary goal.)
Yaël Dillies (Nov 11 2023 at 15:07):
I think it's useful-ish to distinguish code from docstrings, but actually the code font needn't be monospace for that purpose.
Joachim Breitner (Nov 11 2023 at 15:10):
paper.png
This is from a paper of mine, where I tried to choose a proportional font for the code that looks just distinct enough from the main body to be recognizable, and has distinct l
and I
. In this case the font is Ubuntu, but of course for a paper on Haskell I don’t need particularly high Unicode coverage (none actually beyond ASCII), so this is not a concrete recommendation.
Henrik Böving (Nov 11 2023 at 15:18):
I don't really like that view personally but if we find something that enough of the interested people can agree on and it has enough unicode sure.
To throw yet another data point in. Rustdoc uses:
- Source Code Pro for Code
- Source Serif 4 for prose
- Fira Sans in a bunch of special locations like headlines etc.
Henrik Böving (Nov 11 2023 at 15:24):
@Yaël Dillies
image.png
yay or nay?
Yaël Dillies (Nov 11 2023 at 15:24):
Oooh, yeah this is quite good.
Yaël Dillies (Nov 11 2023 at 15:25):
although I would expect the search box to have the same font as the results
Henrik Böving (Nov 11 2023 at 15:32):
Yaël Dillies said:
although I would expect the search box to have the same font as the results
Hmmm, that is supposed to be the same font according to my CSS... let's see
Eric Wieser (Nov 11 2023 at 15:40):
@Joachim Breitner, I thought that opinion on proportional fonts for code died with the final release of the Plan 9 OS and its acme editor!
Henrik Böving (Nov 11 2023 at 15:50):
No I can't figure this one out, maybe a CSS wizard here can tell me whats up: According to my CSS style it should be using Lato Medium for the thing in the box but:
image.png
it obviously isn't (the text below is Lato Medium, the most clear difference is at the J)
Joachim Breitner (Nov 11 2023 at 16:13):
I thought that opinion on proportional fonts for code died with the final release of the Plan 9 OS and its acme editor!
There is a German saying, “Totgesagte leben länger”.
But it’s probably telling that only my single-author papers use that style :-D
Joachim Breitner (Nov 11 2023 at 16:14):
@Henrik Böving , might be this: https://stackoverflow.com/a/6080482/946226
Henrik Böving (Nov 11 2023 at 16:18):
Aha that's indeed it, why would you make these semantics consistent anyways mhm..
Schrodinger ZHU Yifan (Nov 12 2023 at 07:08):
There is another font https://commitmono.com/ designed for cleaness.
Trebor Huang (Nov 12 2023 at 08:02):
Agda papers often use proportional fonts too with automatically generated alignments. See the docs for how they did it. But do we really need than much alignment except at the left boundary?
Eric Wieser (Nov 12 2023 at 21:25):
Can you link to the docs you're thinking of?
Trebor Huang (Nov 13 2023 at 03:39):
https://agda.readthedocs.io/en/v2.6.4/tools/generating-latex.html#alignment
Eric Wieser (Nov 13 2023 at 09:25):
Thanks! I thought you were describing in-editor support, but I see it's only about LaTeX output. Is there an example pdf anywhere?
Trebor Huang (Nov 13 2023 at 09:33):
For example https://arxiv.org/abs/2001.11001
Trebor Huang (Nov 13 2023 at 09:42):
I have also typeset stuff with the same package https://arxiv.org/pdf/2310.02051.pdf
The grey part and green parts use proportional font with no alignment except on the left
Trebor Huang (Nov 13 2023 at 09:42):
I think they still look pretty decent
Eric Rodriguez (Nov 13 2023 at 12:37):
On the font conversation, the font for the playground is bad too:
Last updated: Dec 20 2023 at 11:08 UTC