Output all default font-face declarations for the current brand.
all fonts for the current brand (core, internal, whitelabel).
@include oFonts();
a limited set of recommended fonts for the current brand (core, internal, whitelabel).
@include oFonts($opts: ('recommended': true));
a limited set of recommended fonts for the current brand, plus an extra FinancierDisplayWeb font.
@include oFonts($opts: (
'recommended': true,
'financier-display': (
(weight: regular, style: normal)
)
));
only regular and semibold MetricWeb font faces.
@include oFonts($opts: ('metric': (
(weight: regular, style: normal),
(weight: semibold, style: normal),
)));
only regular and bold FinancierDisplayWeb font faces.
@include oFonts($opts: ('financier-display': (
(weight: regular, style: normal),
(weight: semibold, style: normal),
)));
only regular font faces for MetricWeb and FinancierDisplayWeb.
@include oFonts($opts: (
'metric': ((weight: regular, style: normal)),
'financier-display': ((weight: regular, style: normal))
));
only black weighted font faces for MetricWeb, FinancierDisplayWeb, and FinancierTextWeb.
@include oFonts($opts: (
'metric': ((weight: 'black', style: normal)),
'financier-display': ((weight: 'black', style: normal)),
'financier-text': ((weight: 'black', style: normal))
));
Check if a font variant exists for a family.
Check if a font variant has been included
in your project with the oFonts
mixin.
Get a font-family stack with the appropriate fallbacks
font-family: oFontsGetFontFamilyWithFallbacks(FinancierDisplayWeb);
Removes a fonts fallbacks.
$family: oFontsGetFontFamilyWithoutFallbacks('FinancierDisplayWeb, sans'); //FinancierDisplayWeb
Machine-readable CSS font-weight.
font-weight: oFontsWeight(lighter);
Output custom Font-face declarations and register the family and variants with o-fonts.
If the font family is not a system font, output the font-face for the custom font in the mixin content.
example shows registering a custom font "MyFont" with "sans" fallback. The font allows regular or bold variants.
@include oFontsDefineCustomFont('MyFont, sans', (
(weight: regular, style: normal),
(weight: bold, style: normal)
)) {
@font-face {
src: url('MyFont-Thin.woff2') format('woff2'), url('MyFont-Thin.woff') format('woff');
font-family: MyFont;
font-weight: 100;
font-style: normal;
}
@font-face{
src: url('MyFont-Bold.woff2') format('woff2'), url('MyFont-Bold.woff') format('woff');
font-family: MyFont;
font-weight: 700;
font-style: normal;
}
};
Register which fonts have been output by already for your project.
This mixin is useful if a project calls the oFonts
mixin is in a different
entry point.
all fonts for the current brand (core, internal, whitelabel).
@include oFontsVariantsIncluded();
a limited set of recommended fonts for the current brand (core, internal, whitelabel).
@include oFontsVariantsIncluded($opts: ('recommended': true));
a limited set of recommended fonts for the current brand, plus an extra FinancierDisplayWeb font.
@include oFontsVariantsIncluded($opts: (
'recommended': true,
'financier-display': (
(weight: regular, style: normal)
)
));
only regular and semibold MetricWeb font faces.
@include oFontsVariantsIncluded($opts: ('metric': (
(weight: regular, style: normal),
(weight: semibold, style: normal),
)));
only regular and bold FinancierDisplayWeb font faces.
@include oFontsVariantsIncluded($opts: ('financier-display': (
(weight: regular, style: normal),
(weight: semibold, style: normal),
)));
only regular font faces for MetricWeb and FinancierDisplayWeb.
@include oFontsVariantsIncluded($opts: (
'metric': ((weight: regular, style: normal)),
'financier-display': ((weight: regular, style: normal))
));
Origami Build Service path to font files.
Alternative path to self hosted font files, hosted on a service which does not conform to the Origami Build Service api. For example this is used by Financial-Times/ft-app to support offline fonts.
The default font-display
property of included font faces.
https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display
Output all default font-face declarations for the current brand.
all fonts for the current brand (core, internal, whitelabel).
@include oFonts();
a limited set of recommended fonts for the current brand (core, internal, whitelabel).
@include oFonts($opts: ('recommended': true));
a limited set of recommended fonts for the current brand, plus an extra FinancierDisplayWeb font.
@include oFonts($opts: (
'recommended': true,
'financier-display': (
(weight: regular, style: normal)
)
));
only regular and semibold MetricWeb font faces.
@include oFonts($opts: ('metric': (
(weight: regular, style: normal),
(weight: semibold, style: normal),
)));
only regular and bold FinancierDisplayWeb font faces.
@include oFonts($opts: ('financier-display': (
(weight: regular, style: normal),
(weight: semibold, style: normal),
)));
only regular font faces for MetricWeb and FinancierDisplayWeb.
@include oFonts($opts: (
'metric': ((weight: regular, style: normal)),
'financier-display': ((weight: regular, style: normal))
));
only black weighted font faces for MetricWeb, FinancierDisplayWeb, and FinancierTextWeb.
@include oFonts($opts: (
'metric': ((weight: 'black', style: normal)),
'financier-display': ((weight: 'black', style: normal)),
'financier-text': ((weight: 'black', style: normal))
));