3 /// Generates an `@font-face` declaration. You can choose the specific file
4 /// formats you need to output; the mixin supports `eot`, `ttf`, `svg`, `woff2`
5 /// and `woff`. The mixin also supports usage with the Rails Asset Pipeline,
6 /// which you can enable per use, or globally in the `$bourbon()` settings.
8 /// @argument {string} $font-family
10 /// @argument {string} $file-path
12 /// @argument {string} $asset-pipeline [false]
13 /// Set to `true` if you’re using the Rails Asset Pipeline (place the fonts
14 /// in `app/assets/fonts/`). Can also be set globally using the
15 /// `rails-asset-pipeline` key in the Bourbon settings.
17 /// @argument {string | list} $file-formats [("ttf", "woff2", "woff")]
18 /// List of the font file formats to include. Can also be set globally using
19 /// the `global-font-file-formats` key in the Bourbon settings.
22 /// Any additional CSS properties that are included in the `@include`
23 /// directive will be output within the `@font-face` declaration, e.g. you can
24 /// pass in `font-weight`, `font-style` and/or `unicode-range`.
27 /// @include font-face(
28 /// "source-sans-pro",
29 /// "fonts/source-sans-pro-regular",
32 /// font-style: normal;
38 /// font-family: "source-sans-pro";
39 /// src: url("fonts/source-sans-pro-regular.woff2") format("woff2"),
40 /// url("fonts/source-sans-pro-regular.woff") format("woff");
41 /// font-style: normal;
45 /// @require {function} _font-source-declaration
47 /// @require {function} _fetch-bourbon-setting
52 $file-formats: _fetch-bourbon-setting("global-font-file-formats"),
53 $asset-pipeline: _fetch-bourbon-setting("rails-asset-pipeline")
56 font-family: $font-family;
57 src: _font-source-declaration(