• We just upgraded the platform on which this website runs! Please inform @Jaxel of any issues.

Custom Fonts

Jaxel

Administrator
Sure. You can do it right in your HTML... For instance, if you wanted to use Google's Roboto Font:


You would simply need to add the link relationship in your HTML:

Code:
<link href="https://fonts.googleapis.com/css?family=Roboto&display=swap" rel="stylesheet">

Then you can use the font-family in your CSS:

Code:
.myclass
{
    font-family: 'Roboto';
}
 

Velyks

New member
That's great if your fonts are hosted at Google, but trying to do this or @font-face for personally hosted fonts comes up with "access-control-allow-origin" errors.

I am however not much of a web dev, so I might be missing something here.

Edit: I'm the dumb. Access-control-allow-origin is a header I need to set on my end. Working now.
 
Last edited:

Jaxel

Administrator
access-control-allow-origin is related to cross site scripting. It's how you protect YOUR files from being accessed from other servers.