Hello!
I tried adding a couple of custom fonts to my site yesterday, and I’m not sure what I’m missing in the setup. I’m using the Vast theme, and the code looks like this:
/* @import url('http://example.com/example_style.css'); FONTS BELOW*/
/*Proxima Nova*/
@font-face {
font-family: 'proxima_novalight';
src: url('proximanova-light-webfont.woff2') format('woff2'),
url('proximanova-light-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'proxima_novaregular';
src: url('proximanova-reg-webfont.woff2') format('woff2'),
url('proximanova-reg-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'proxima_novaregular_italic';
src: url('proximanova-regit-webfont.woff2') format('woff2'),
url('proximanova-regit-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'proxima_novaextrabold';
src: url('proximanova-xbold-webfont.woff2') format('woff2'),
url('proximanova-xbold-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'proxima_novablack_italic';
src: url('proxima_nova_black_it-webfont.woff2') format('woff2'),
url('proxima_nova_black_it-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'proxima_novablack';
src: url('proxima_nova_black-webfont.woff2') format('woff2'),
url('proxima_nova_black-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'proxima_nova_rgbold_italic';
src: url('proxima_nova_bold_it-webfont.woff2') format('woff2'),
url('proxima_nova_bold_it-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'proxima_nova_rgbold';
src: url('proxima_nova_bold-webfont.woff2') format('woff2'),
url('proxima_nova_bold-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'proxima_novalight_italic';
src: url('proxima_nova_light_it-webfont.woff2') format('woff2'),
url('proxima_nova_light_it-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'proxima_novalight';
src: url('proxima_nova_light-webfont.woff2') format('woff2'),
url('proxima_nova_light-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'proxima_novaregular_italic';
src: url('proxima_nova_reg_it-webfont.woff2') format('woff2'),
url('proxima_nova_reg_it-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'proxima_novabold';
src: url('proximanova-bold-webfont.woff2') format('woff2'),
url('proximanova-bold-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'proxima_novalight';
src: url('proximanova-light-webfont.woff2') format('woff2'),
url('proximanova-light-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'proxima_novaregular';
src: url('proximanova-reg-webfont.woff2') format('woff2'),
url('proximanova-reg-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'proxima_novaregular_italic';
src: url('proximanova-regit-webfont.woff2') format('woff2'),
url('proximanova-regit-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'proxima_novaextrabold';
src: url('proximanova-xbold-webfont.woff2') format('woff2'),
url('proximanova-xbold-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
/***********************************************/
/* CSS @imports must be at the top of the file */
/* Add them above this section */
/***********************************************/
I placed it in its own folder, according to the Hubspot instructions here but the fonts aren’t showing up as options in the templated landing pages.
This is the folder location for the fonts:
The step that I think I might be missing has to do with importing the font URL into the regular stylesheet. I tried by copying the URL from the Actions menu, then placing it here: (bolded area w “figure this out” is my import attempt)
@import url(http://fonts.googleapis.com/css?family=Lato:300,400,300italic,400italic);
@import url(http://fonts.googleapis.com/css?family=Montserrat:700,400);
@import url(//designers.hubspot.com/hs-fs/hub/327485/file-2054199286-css/font-awesome.css);
/*figure this out: */
@import url({{ get_public_template_url('Vast/Fonts-EnSight.css') }})
/**
* CSS @imports must be at the top of the file.
* Add them above this section.
*/
/* ==========================================================================
HS COS Boilerplate v1.3.0
*/
/* This responsive framework is required for all styles.*/
{% include "Vast/Coded_Files/vast-modules.css" %}
If anyone knows where I went wrong/what I should be doing w the import URL, I’d really appreciate it.
Thank you,
Lena
