I have been facing an issue with my JavaScript Direflow application. I am attempting to load a local font, but so far have not succeeded.
Below are the specifics and code snippets I have implemented.
Directory Structure https://i.sstatic.net/qLKlY.png
font.css
@font-face {
font-family: 'MyLocalFont';
src: local('MyLocalFont'),
url('./fonts/MyLocalFont.woff') format('woff'),
url('./fonts/MyLocalFont.woff2') format('woff2');
}
direflow-components/testing-component/index.js
plugins: [
{
name: 'font-loader',
options: {
custom: {
families: ['MyLocalFont'],
urls: ['/fonts.css']
},
},
},
],
App.css
.header-title {
font-size: 34px;
color: #5781C2;
font-family: 'MyLocalFont';
}
The font files are not loading. Any assistance would be appreciated.
Note: I created a React app using create-react-app where @font-face changes successfully loaded the fonts. It seems like there might be an issue specific to Direflow.