122
Views
2
Comments
Importing a font in CSS does not work
Question
Hi All,

I tried to import one of Google's fonts in a css ... no luck.
Now I added the link, via HTTPHeader extension, in the header of the HTML and it works.
Any ideas why ?

/* ubuntu lettertype */
@import url("https://fonts.googleapis.com/css?family=Ubuntu:400,500,700,400italic,500italic,700italic");
2026-06-08 21-00-15
Nuno Rolo
 
MVP
Hi Joop,

I'm using like this  @import url("//fonts.googleapis.com/css?family=PT+Sans");
2022-11-12 11-28-30
Gonçalo Martins
Staff
Hi Joop,

You can also do something different, using font-face, like:

@font-face
{
    font-family: <Your Font Name>;
    src: url('<Path to your font>');   //this url can also be a path to a resource in your eSpace
}

After this you can simply use the font-family name that you gave in other css classes.
Hope this helps.

Kind Regards,
GM
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.