Financial-Times / o-typography

Typography and vertical rhythm styles for FT branding
http://registry.origami.ft.com/components/o-typography
10 stars 2 forks source link

Error when font not included #251

Closed notlee closed 4 years ago

notlee commented 4 years ago

Adds the option to error if a font variant (family/weight/style) is used when a font face for that variant has not been included in the project. By default no error is thrown unless the Sass variable $o-typography-error-for-missing-fonts is set to a string (a message to include in the error).

This will allow projects like PageKit to remove fonts and inform dependent projects what to do with a custom error message.

We may want to make an error the default behaviour in a future major version of o-typography.

Relates to: https://github.com/Financial-Times/o-typography/issues/249

origamiserviceuser commented 4 years ago

o-typography bundle size difference from 6.2.0 to 569db948ce0fbd9ea8c21ff09620afed74feeb25 No significant bundle size differences found.