I am developing on Rails application so I get this error, please help me with this problem:
@font-face {
font-family: keenicons-duotone;
src: asset-url("keenicons/keenicons-duotone.eot?eut7fk");
src: asset-url("keenicons/keenicons-duotone.eot?eut7fk#iefix"),
format("embedded-opentype"),
asset-url("keenicons/keenicons-duotone.ttf?eut7fk") format("truetype"),
asset-url("keenicons/keenicons-duotone.woff?eut7fk") format("woff"),
asset-url("keenicons/keenicons-duotone.svg?eut7fk#keenicons-duotone")
format("svg");
font-weight: 400;
font-style: normal;
font-display: block;
}
Failed to decode downloaded font: http://localhost:3000/assets/keenicons/keenicons-duotone.eot?eut7fk#iefix
OTS parsing error: invalid sfntVersion: 282919424
Hi,
I'd like to know, when did you encounter this error? Is it during the process of running the Gulp task? Please let us know, and we'll assist you accordingly.
Hi,
I use HTML and manual configuration.
I put it in the fonts folder, path:app/assets/fonts/keenicons/keenicons-duotone.eot
Hi,
The error message you're encountering is typically related to problems with font files in your Rails application. The error suggests that there's an issue with the font file or how it's being served. Here are some steps to help you resolve this issue:
Check Font File: First, make sure that the font file is present in the correct location within your project's assets. Verify that the file hasn't been corrupted during download or deployment.
Font MIME Types: Ensure that the server is configured to serve font files with the correct MIME types. Font files should be served with appropriate MIME types to prevent issues. You can add the following configuration in your Rails application:
# config/application.rb
config.assets.paths << Rails.root.join("app", "assets", "fonts")
config.assets.precompile << /\.(?:svg|eot|woff|ttf)\z/
config/initializers/assets.rb
file to ensure that the fonts are precompiled.@font-face {
font-family: "keenicons-duotone";
src: font-url("keenicons/keenicons-duotone.eot?eut7fk");
/* Other font sources here */
}
RAILS_ENV=production bundle exec rake assets:precompile