Looking for guidance on implementing a custom font in my Stenciljs app. I have the otf file, unsure if an npm package is necessary. Here's my code:
filestructure:
-src
--components
--assets
---Anurti-Regular.tiff
---Anurti-Regular.ttf
friends-listening.css
@font-face {
font-family: 'Anurati-Regular';
src: local('Anurati-Regular'),
url('../assets/Anurati-Regular.tiff') format("tiff");
}
#home{
background-color: #C8B7A6;
height:1000px;
text-align: center;
font-family: Anurati-Regular;
}
friends-listening.tsx
<div id="home">
<h2>Friends-FX app BETA</h2>
<div id={this.login}>
<my-component></my-component>
</div>
...
</div>
Any assistance would be appreciated. Thank you, Drew
Hoping to see the custom font properly displayed on the front-end, but encountering issues.
Many questions exist about this topic, yet no definitive solutions.