_fonts.scss 1.47 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
$font-path: '../fonts';

$thin: 100, normal;
$light: 300, normal;
$lightItalic: 300, italic;
$regular: normal, normal;
$italic: normal, italic;
$bold: 700, bold;

$opensans: (
    OpenSansLight: $light,
    OpenSansLightItalic: $lightItalic,
    OpenSansRegular: $regular,
    OpenSansItalic: $italic,
    OpenSansBold: $bold
);

@each $fontname, $style in $opensans {
    @font-face {
        font-family: 'Open Sans';
        src: url('#{$font-path}/opensans/#{$fontname}.eot');
        src: url('#{$font-path}/opensans/#{$fontname}.eot') format('embedded-opentype'),
             url('#{$font-path}/opensans/#{$fontname}.woff2') format('woff2'),
             url('#{$font-path}/opensans/#{$fontname}.woff') format('woff'),
             url('#{$font-path}/opensans/#{$fontname}.ttf') format('truetype'),
             url('#{$font-path}/opensans/#{$fontname}.svg##{$fontname}') format('svg');
        font-weight: nth($style, 1);
        font-style:  nth($style, 2);
    }
}


@font-face {
    font-family: 'Bree Serif';
    src: url('#{$font-path}/breeserif/breeserif.eot');
    src: url('#{$font-path}/breeserif/breeserif.eot') format('embedded-opentype'),
         url('#{$font-path}/breeserif/breeserif.woff2') format('woff2'),
         url('#{$font-path}/breeserif/breeserif.woff') format('woff'),
         url('#{$font-path}/breeserif/breeserif.ttf') format('truetype'),
         url('#{$font-path}/breeserif/breeserif.svg#breeserif') format('svg');
    font-weight: normal;
    font-style:  normal;
43
}