rdkcentral / Lightning-SDK

SDK for Lightning framework
Apache License 2.0
130 stars 69 forks source link

FontFace should be used in a manner allowing graceful degradation #185

Closed Serhii-the-Dev closed 3 years ago

Serhii-the-Dev commented 3 years ago

According to the spec, FontFace API allows to load fonts in the same manner it's done in CSS. Thus, constructions like this one should be allowed:

url('font.woff2') format('woff2'), url('font.woff') format('woff')

Unfortunately, currently FontFace constructor accepts a parameter that is wrapped with url(...) expression making impossible to manually specify multiple fonts formats: https://github.com/rdkcentral/Lightning-SDK/blob/f89720ac765ff47497079852d0e9102b82af8c79/src/Application/index.js#L160

michielvandergeest commented 3 years ago

This feature is addressed in version 4.3.0: https://github.com/rdkcentral/Lightning-SDK/blob/master/CHANGELOG.md#v430