September 15, 201313 yr Hi This is the CSS code in my CSS file @font-face { font-family:'Raleway'; src:url('fonts/Raleway-Regular.eot'); src:url('fonts/Raleway-Regular.eot?#iefix') format('embedded-opentype'), url('fonts/Raleway-Regular.woff') format('woff'), url('fonts/Raleway-Regular.ttf') format('truetype'), url('fonts/Raleway-Regular.svg#font-name') format('svg'); font-weight:normal; font-style:normal; } @font-face { font-family:'Arvo'; src:url('fonts/Arvo-Regular.eot'); src:url('fonts/Arvo-Regular.eot?#iefix') format('embedded-opentype'), url('fonts/Arvo-Regular.woff') format('woff'), url('fonts/Arvo-Regular.ttf') format('truetype'), url('fonts/Arvo-Regular.svg#font-name') format('svg'); font-weight:normal; font-style:normal; } The names of my Fonts are Arvo-Regular.ttf and Raleway-Regular.otf I have uploaded the fonts in this path of my server.... (fonts folder) public_html/wp-content/themes/theme-name/fonts Still its not working. What I am doing wrong? Will I have to rename Raleway-Regular.ttf to Raleway-Regular.otf in url('fonts/Raleway-Regular.ttf') format('truetype'), Thank you
September 18, 201313 yr Is your CSS file located in the same folder as your fonts? The links to the fonts are relative, ie: If your css file is in public_html/wp-content/themes/themename/ and you refer to a font in fonts/font_name.tff Then you path you're targeting public_html/wp-content/themes/themename/fonts/font_name.tff Make sure your paths follow logically, remembering the font path is relative to your CSS file.
September 18, 201313 yr Author OK I will try. Yes Css file is in Root Folder public_html/wp-content/themes/themename/style.css And Fonts are in fonts folder. public_html/wp-content/themes/themename/fonts/font_name.tff So do I need to include public_html in the beginning? Thank you
Create an account or sign in to comment