hikaya-io / hakawati

A collection of UI components
GNU General Public License v3.0
2 stars 1 forks source link

Console Error: Failed to decode downloaded font #229

Open TAnas0 opened 3 years ago

TAnas0 commented 3 years ago

Current behavior The following console warnings appear in Chrome browser: failed-decode-font

It also appears in Firefox: image

To Reproduce Steps to reproduce the behavior:

  1. Go to https://dots-fe.hikaya.dev/
  2. Inspect console warnings

Problem is that it's making a mistake in the path of the font for some reason. https://dots-fe.hikaya.dev/js/fonts/element-icons.535877f5.woff will lead to a 404 HTML page, and that is what is causing the "decoding failure". The 2 fonts it is looking for are in:

TAnas0 commented 3 years ago

The 2 fonts in question are referenced in Hakawati: https://github.com/hikaya-io/hakawati/blob/062b00dda562d5b9d61643094225af3f1f1e2425/src/theme/index.css#L1

@font-face{font-family:element-icons;src:url(fonts/element-icons.woff) format("woff"),url(fonts/element-icons.ttf) format("truetype");font-weight:400;font-display:"auto";font-style:normal}[class*=" el-icon-"],[class^=el-icon-]

Somehow, these two fonts are being moved to the js folder, which I believe is because Hakawati is an NPM dependency of Dots FE.

I am not sure if the fix should be in Hakawati or in Dots FE :thinking: