New topic Closed topic
avatar image
1
Include a font file in an endpoint with @font-face
By Created , last editted

Hi,

I try to use the Nimbus True Type font in an endpoint.

I uploaded the font file as a public file in BB and tried to include it with Liquid.

To rule out other errors, I also tried a Google font (see commented) ,which works fine. So it must be in the @font-face rule.

What am I doing wrong here? Does Liquid works for this purpose?

Thanks, Hans

<head>
<!-- <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro" rel="stylesheet"> -->
  
<style>
@font-face {
    font-family: 'nimbus';
    src: url("{% file_asset_url 'nimbussanl_regular' %}");
}
p {
font-family: 'nimbus', sans-serif;
font-size: 12px;  
}

Hi,

I try to use the Nimbus True Type font in an endpoint.

I uploaded the font file as a public file in BB and tried to include it with Liquid.

To rule out other errors, I also tried a Google font (see commented) ,which works fine. So it must be in the @font-face rule.

What am I doing wrong here? Does Liquid works for this purpose?

Thanks, Hans

<head>
<!-- <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro" rel="stylesheet"> -->
  
<style>
@font-face {
    font-family: 'nimbus';
    src: url("{% file_asset_url 'nimbussanl_regular' %}");
}
p {
font-family: 'nimbus', sans-serif;
font-size: 12px;  
}
Answers
Sort by:

This topic is closed.