Forum Moderators: open

Message Too Old, No Replies

Inline Code For Google Font?

         

Jennnnn

2:39 am on Jan 31, 2018 (gmt 0)

5+ Year Member Top Contributors Of The Month



Someone gave me this code to use inline instead of a Google font http request:

<style> @font-face{font-family:'Raleway';font-style:normal;font-weight:200;src:local('Raleway ExtraLight'),local('Raleway-ExtraLight'),url(https://fonts.gstatic.com/s/raleway/v12/cbAbzEjxTdN5KKmS-gA0tSEAvth_LlrfE80CYdSH47w.woff2) format('woff2');unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+20A0-20AB,U+20AD-20CF,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Raleway';font-style:normal;font-weight:200;src:local('Raleway ExtraLight'),local('Raleway-ExtraLight'),url(https://fonts.gstatic.com/s/raleway/v12/8KhZd3VQBtXTAznvKjw-k_k_vArhqVIZ0nv9q090hN8.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2212,U+2215}</style>

I'd like to get the 300 weight version for Raleway. How can I get this code? I've downloaded the ttf. file for Raleway and looked at woff2 file generators but when I try to generate a woff2 file it doesn't look like the above code. Thanks for your help!

not2easy

4:02 am on Jan 31, 2018 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



The first line of your <style> has
font-weight:200;
so that is the weight you'll see. Not all Google fonts are available in a complete range of weights, have you visited the Google Fonts site to make sure that "Raleway-ExtraLight" is available in 300 weight in your local set? If it is, just change the "font-weight:200;" to "font-weight:300;" in the inline style you've posted.

Jennnnn

3:43 pm on Jan 31, 2018 (gmt 0)

5+ Year Member Top Contributors Of The Month



Raleway-Light is available in a 300 font weight. I'll try that. Thanks!