1

I am customizing rwd theme, i have removed railway font from the theme using local.xml file and i have verified it checking inspect element in browser below is my local.xml code.

<?xml version="1.0" encoding="UTF-8"?>
<!--
Local.xml
Local Layout Modifications For Our Local Theme
-->
<layout version="0.1.0">
<default>
    <reference name="head">
            <action method="addItem"><type>skin_css</type><name>css/bootstrap.css</name></action>
            <action method="removeItem"><type>skin_css</type><name>css/madisonisland.css</name></action>
            <action method="removeItem"><type>skin_css</type><name>css/styles.css</name></action>
            <action method="addItem"><type>skin_css</type><name>css/styles.css</name></action>
            <action method="addItem"><type>skin_css</type><name>css/font-awesome.min.css</name></action>
            <action method="addItem"><type>skin_css</type><name>css/custom.css</name></action>
            <action method="removeItem"><type>link_rel</type><name>//fonts.googleapis.com/css?family=Raleway:300,400,500,700,600</name></action>
    </reference>
</default>
</layout>

And then i am loading google fonts in my scss file. Below is my code

@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,300,600|Allerta);

$black: #000;
$white: #fff;
$red: #d22629;
$orange: #f57f20;
$gray: #f2f3f5;
$opensans: 'Open Sans';
$allerta: 'Allerta';

body {background:$gray; font-family:$opensans !important;}

But still it is loading the default railway font. I don't understand where it is coming from.

1

Browsers doesn't support some fonts.And instead of using google links, You just give this a try.

1.Download the font family you want.

2.Create a folder named 'fonts' inside skin/frontend/package/theme/css/ (I used only css to style my site. so I created inside css folder.If it didnt work try creating it under scss folder)

3.Copy the font files which you have downloaded into the folder you created.

4.Then in your stylesheet call the font like this:

@font-face {
font-family: 'MuliRegular';
src: url('fonts/muli-regular.eot');
src: url('fonts/muli-regular.eot') format('embedded-opentype'),
     url('fonts/muli-regular.woff2') format('woff2'),
     url('fonts/muli-regular.woff') format('woff'),
     url('fonts/muli-regular.ttf') format('truetype'),
     url('fonts/muli-regular.svg#MuliRegular') format('svg');
      }

In my case It was 'Muliregular'. You should specify the font you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.