oFonts

Output all default Font-face declarations for the current brand.

Links

oFontsVariantExists(...)

Check if a font variant exists for a family.

parameter type default description
family one of $o-fonts-families
weight (optional) regular The font weight.
style (optional) normal The font style.

Returns

Bool

Links

oFontsGetFontFamilyWithFallbacks(family)

Get a font-family stack with the appropriate fallbacks

parameter type default description
family

Returns

String - font-stack

Example

font-family: oFontsGetFontFamilyWithFallbacks(FinancierDisplayWeb);

Links

oFontsGetFontFamilyWithoutFallbacks(family)

Removes a fonts fallbacks.

parameter type default description
family Font family potentially with fallbacks.

Returns

String - Font family without fallbacks.

Example

$family: oFontsGetFontFamilyWithoutFallbacks('FinancierDisplayWeb, sans'); //FinancierDisplayWeb

Links

oFontsUseAsset(asset)

Path to a font asset

parameter type default description
asset

Returns

String - Path to the font asset, without the file extension

Links

oFontsWeight(keyword)

Machine-readable CSS font-weight.

parameter type default description
keyword Human-readable keyword, one of $_o-fonts-weights

Returns

Number - CSS font-weight

Example

font-weight: oFontsWeight(lighter);

Links

oFontsSource(fontName)

Font-face declaration sources

parameter type default description
fontName path to the file, without the file extension

Links

oFontsInclude(...)

Output a Font-face declaration for a given font family which is provided by Origami.

parameter type default description
family one of $o-fonts-families
weight (optional) regular one of $_o-fonts-weights
style (optional) normal

Links

The mixin "oFontsIncludeAll" is deprecated.

Use oFonts instead.

oFontsIncludeAll

Output all Font-face declarations which are provided by Origami.

Links

oFontsDefineCustomFont(font-family, variants)

Output custom Font-face declarations and register the family and variants with o-fonts.

parameter type default description
font-family The custom font family with fallback e.g. 'ComicSans, sans'
variants The variants (weight and style combinations) which are allowed in a nested map e.g. ((weight: bold, style: normal), (weight: regular, style: normal))

Content Block

If the font family is not a system font, output the font-face for the custom font in the mixin content.

Example

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.woff');
		font-family: MyFont;
		font-weight: 100;
		font-style: normal;
	}

	@font-face{
		src: url('MyFont-Bold.woff');
		font-family: MyFont;
		font-weight: 700;
		font-style: normal;
	}
};

Links

o-fonts-path

Path to the assets

Links

o-fonts-is-silent

Silent mode

Links

o-fonts-families

All available font families.

Links

oFonts

Output all default Font-face declarations for the current brand.

Links