_fonts.scss 1.92 KB
Newer Older
1
$font-path: '../../raw/fonts';
2

3
4
5
6
7
8
$thin: 100, normal;
$light: 300, normal;
$lightItalic: 300, italic;
$regular: normal, normal;
$italic: normal, italic;
$bold: 700, bold;
Pat Kira's avatar
Pat Kira committed
9

10
11
12
13
14
15
16
$opensans: (
    OpenSansLight: $light,
    OpenSansLightItalic: $lightItalic,
    OpenSansRegular: $regular,
    OpenSansItalic: $italic,
    OpenSansBold: $bold
);
Pat Kira's avatar
Pat Kira committed
17

18
$robotoslab: (
19
20
21
22
    robotoslab-thin: $thin,
    robotoslab-light: $light,
    robotoslab-regular: $regular,
    robotoslab-bold: $bold
23
);
Pat Kira's avatar
Pat Kira committed
24
25


26
27
28
@each $fontname, $style in $opensans {
    @font-face {
        font-family: 'Open Sans';
29
        src: url('#{$font-path}/opensans/#{$fontname}.eot');
30
        src: url('#{$font-path}/opensans/#{$fontname}.eot?#iefix') format('embedded-opentype'),
31
             url('#{$font-path}/opensans/#{$fontname}.woff2') format('woff2'),
32
33
             url('#{$font-path}/opensans/#{$fontname}.svg##{$fontname}') format('svg'),
             url('#{$font-path}/opensans/#{$fontname}.otf') format('opentype'),
34
             url('#{$font-path}/opensans/#{$fontname}.ttf') format('truetype'),
35
             url('#{$font-path}/opensans/#{$fontname}.woff') format('woff');
36
37
38
        font-weight: nth($style, 1);
        font-style:  nth($style, 2);
    }
Pat Kira's avatar
Pat Kira committed
39
40
}

41
42
43
@each $fontname, $style in $robotoslab {
    @font-face {
        font-family: 'Roboto Slab';
44
45
46
47
48
49
50
        src: url('#{$font-path}/robotoslab/#{$fontname}.eot');
        src: url('#{$font-path}/robotoslab/#{$fontname}.eot?#iefix') format('embedded-opentype'),
             url('#{$font-path}/robotoslab/#{$fontname}.woff2') format('woff2'),
             url('#{$font-path}/robotoslab/#{$fontname}.svg##{$fontname}') format('svg'),
             url('#{$font-path}/robotoslab/#{$fontname}.otf') format('opentype'),
             url('#{$font-path}/robotoslab/#{$fontname}.ttf') format('truetype'),
             url('#{$font-path}/robotoslab/#{$fontname}.woff') format('woff');
51
52
53
        font-weight: nth($style, 1);
        font-style:  nth($style, 2);
    }
Pat Kira's avatar
Pat Kira committed
54
}