Www.julialang.org: Add JuliaMono webfonts to /assets/ ?

Created on 16 Apr 2021  路  8Comments  路  Source: JuliaLang/www.julialang.org

We could add the JuliaMono webfonts to the julialang.org website. They could live in, say, www.julialang.org/assets/fonts/JuliaMono/webfonts/ as the files:

JuliaMono-Black.woff2
JuliaMono-Bold.woff2
JuliaMono-BoldLatin.woff2
JuliaMono-ExtraBold.woff2
JuliaMono-Light.woff2
JuliaMono-Medium.woff2
JuliaMono-Regular.woff2
JuliaMono-RegularLatin.woff2
JuliaMono-SemiBold.woff2

The total size of this new directory would be about 5MB. People would then be able to use the fonts for package documentation, blog posts, etc.. To do this, they would add something like this to a CSS file:

@font-face {
    font-family: JuliaMono;
    src:
        local('JuliaMono-Regular'),
        url("https://www.julialang.org/assets/fonts/JuliaMono/webfonts/JuliaMono-Regular.woff2");
}

I've no idea what the bandwidth would be, or whether that would be a cost/pricing issue? At present, the actual OpenType fonts are stored on github, but the webfonts (WOFF) are served from there via the NPM/JavaScript-focussed https://www.jsdelivr.com CDN. It works fine (but I have no more information than that).

There would be no visible changes to this website. (And I'm not saying that people should start using the fonts anywhere, unless they want to. 馃槃)

I don't know whether you would want a disclaimer in the directory somewhere to the effect that the fonts aren't "official"? Although it does promote Julia, in a way...

Most helpful comment

Wasn't too difficult:

Screenshot 2021-04-21 at 14 04 02

All 8 comments

There would be no visible changes to this website.

Obviously code on the website should use it!

So is the benefit here that users don't have to use jsdelivr but can instead use julialang.org? It's not that I am afraid of the extra traffic, (Fastly is quite generous with us so it should be fine) but more that I'm not sure if it's much benefit so I'd prefer to keep it being served on other people's bills than ours as long as makes sense. :P

Well I don't know anything about these CDNs - which ones are good, which aren't, whether two are better than one, how much downloads cost, etc - so I can't put any numbers on the benefits of using "julialang.org" or another. Might as well leave everything as it is for now... 馃榾

I thought I'd just chime in from the Documenter perspective: Documenter sites currently use two CDNs: Google Fonts and CDNJS, for fonts and JS deps, respectively. I am quite hesitant to add another CDN to that list (whether that is jsDelivr or julialang.org/Fastly). The reason is that once _any_ CDN fails, the Documenter sites will fail to load.

That is because the browsers will block the site load until they are able to fetch the dependencies _or_ they get some sort of an error response. However, if the there is e.g. a true network issue, the CDN will never respond and the browsers will wait at least until the TCP 300s timeout expires (IIRC). We had an incident a few years ago when the various docs across the ecosystem were not loading properly for about 12 or so hours just because of this.

So, to switch Documenter over to Julia Mono (which we should totally do), the easiest option from my perspective is to get Julia Mono onto Google Fonts. That said, we could also possibly look into switching everything over the jsDelivr, but that would mean making sure that we can fetch the other deps from there as well.

We had an incident a few years ago when the various docs across the ecosystem were not loading properly

Ha, yes, I remember that. I now wonder why the docs didn't all just load with Times and Courier fallback fonts instead...

JuliaMono won't be joining Google Fonts any time soon - there's a lot of work involved adapting to their processes, and there's no guarantee of being accepted anyway.

Looks like people are happy using jsdelivr to serve fonts for their Documenter-made documents, so let's leave things as they are.

What about CDNJS though? I discovered we could get Lato from there. It looks like it's a matter of dropping a JSON file into a repo?

What about CDNJS though?

I'll give it a go.

Wasn't too difficult:

Screenshot 2021-04-21 at 14 04 02

Was this page helpful?
0 / 5 - 0 ratings

Related issues

essenciary picture essenciary  路  8Comments

ViralBShah picture ViralBShah  路  4Comments

essenciary picture essenciary  路  6Comments

00vareladavid picture 00vareladavid  路  5Comments

logankilpatrick picture logankilpatrick  路  7Comments