olipowell Posted December 10, 2019 Share Posted December 10, 2019 Hi, I've decided to update my site with custom fonts, but the fonts don't work on headings only <p>, and then I read the York template has "no <h> tag". Great! I've implemented it on another template just to make sure my fonts work correctly and they do. So any ideas on how I get around this using York or should I just cut my losses and change to a template that has H tags? Link to comment
tuanphan Posted December 10, 2019 Share Posted December 10, 2019 10 minutes ago, olipowell said: Hi, I've decided to update my site with custom fonts, but the fonts don't work on headings only <p>, and then I read the York template has "no <h> tag". Great! I've implemented it on another template just to make sure my fonts work correctly and they do. So any ideas on how I get around this using York or should I just cut my losses and change to a template that has H tags? h * {font-family: font name;} eg h1 * {font-family: font name;} h2 * {font-family: font name;} Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
olipowell Posted December 11, 2019 Author Share Posted December 11, 2019 15 hours ago, tuanphan said: h * {font-family: font name;} eg h1 * {font-family: font name;} h2 * {font-family: font name;} Thanks! But that didn't seem to work. Here's my code body {-webkit-font-smoothing: antialiased !important;} h1 * {font-family: TTFirsNeue-DemiBold;} @font-face { font-family: 'TTFirsNeue-DemiBold'; src: url(https://static1.squarespace.com/static/574234079f7266bf7c216219/t/5defc261a4abea7e73c1c086/1575993957527/TTFirsNeue-DemiBold.ttf), url(https://static1.squarespace.com/static/574234079f7266bf7c216219/t/5defc26d0b22ef461c186eb8/1575993967915/TTFirsNeue-DemiBold.woff), url(https://static1.squarespace.com/static/574234079f7266bf7c216219/t/5defc276bdfdf024df398b3c/1575993975215/TTFirsNeue-DemiBold.woff2); } Link to comment
tuanphan Posted December 11, 2019 Share Posted December 11, 2019 Can you share link to your site? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
tuanphan Posted December 11, 2019 Share Posted December 11, 2019 9 minutes ago, olipowell said: Here you go use h1 { font-family: 'TTFirsNeue-DemiBold' !important; } or h1 { font-family: 'TTFirsNeue-Regular' !important; } Font in h1 and font in font-face need to be same, include ' and ' Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
olipowell Posted December 11, 2019 Author Share Posted December 11, 2019 Great! That's working. Out of interest, how would I go about targeting other elements other than the headings. I.e. Site Navigation or Page Descriptions? Also, not sure if you can help on this one, but on a mobile (not Desktop in mobile mode) the letter spacing of the Headings is noticeably different for some reason. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.