fontFace
Public API
Creates a locally scoped font-family for the defined @font-face.
fontFace.ts
import { fontFace, style } from '@navita/css';
const comicSans = fontFace({
src: 'local("Comic Sans MS")'
});
const font = style({
fontFamily: comicSans
});
Multiple Fonts with Single Family
fontFace.ts
import { fontFace, style } from '@navita/css';
const gentium = fontFace([
{
src: 'local("Gentium")',
fontWeight: 'normal'
},
{
src: 'local("Gentium Bold")',
fontWeight: 'bold'
}
]);
export const font = style({
fontFamily: gentium
});