Font messes up alignment of numbers

sjbuysse picture sjbuysse · Aug 11, 2015 · Viewed 10.5k times · Source

I'm using the Raleway font, but this font doesn't align numbers properly with letters.

You can see this in this snippet:

Can I solve this easily? Or is this just a faulty font and should I chose another one?

Answer

fluidbrush picture fluidbrush · Apr 8, 2016

You can simply change with the help of CSS add font-feature-settings: 'lnum' 1; to your css file

so your new css will be:

h1 {
        font-family: Raleway;
        font-size: 2rem;
        border-bottom: 1px solid $text-color;
        border-top: 1px solid $text-color;
        padding: 2rem 0;
        font-feature-settings: 'lnum' 1;
    }

Check out this too http://clagnut.com/sandbox/css3/