In my project it is set scss->css compiling. And I can't pick up my custom fonts from the scss folder. Here's my folder structure for a better understanding.
| scss/
|-- basics/
|--_fonts.scss
|-- fonts/
|-- lineto-circular-book.woff
|-- lineto-circular-medium.woff
| www
|-- lib/
|-- ionic/
|-- css/
|-- fonts/
That's how the _fonts.scss looks like:
@charset "UTF-8";
@font-face {
font-family: 'Circular-Medium';
src: url('fonts/lineto-circular-medium.woff');
}
@font-face {
font-family: 'Circular-Medium-Book';
src: url('fonts/lineto-circular-book.woff');
}
I'm getting not found status. How can I solve this problem?
Open the file you want to embed fonts in. On the application (PowerPoint or Word) menu, select Preferences. In the dialog box, under Output and Sharing, select Save. Under Font Embedding, select Embed fonts in the file.
In the Theme panel, select Fonts, select the Primary Font or Header Fonts dropdown list, and then click Use Custom Font. Add the font family name that you entered in the CSS editor—for example, myFirstFont —and save your changes.
Ionic Angular Adding Custom Fonts like Open Sans and Font-Awesome. Download this project on Github Ionic 3 and Angular 4 Adding Custom Fonts like Open Sans and Font Awesome. If playback doesn't begin shortly, try restarting your device.
Today, you will learn how to add font-awesome icons to your ionic project. This entire thing is going to step by step, so just follow along. Step 1 : Create config folder in your project directory. Inside that folder create file copy.config.js Step 2 : Expand your node_modules folder as shown in the image and copy the content inside copy.config.js
Ionic default icons are not up to current market standards. This tutorial is all about how to add custom downloaded fonts like open sans and font awesome for icons into the Ionic application.
Ionic 3 and Angular 4: Adding Custom Fonts like Open Sans and Font Awesome. We all know that Ionic is the useful framework for building HTML 5 mobile applications. It is mainly designed for the front end. When it comes to look and feel of the Ionic website, you have to work more on your application branding standards.
First, move the fonts/ folder into the www/ folder, so it looks like this.
| scss/
|-- basics/
|--_fonts.scss
| www
|-- fonts/
|-- lineto-circular-book.woff
|-- lineto-circular-medium.woff
Then, if you aren't minifying the resources, then the paths might be off by one level. This should fix the references.
@font-face {
font-family: 'Circular-Medium';
src: url('../fonts/lineto-circular-medium.woff');
}
@font-face {
font-family: 'Circular-Medium-Book';
src: url('../fonts/lineto-circular-book.woff');
}
Add the format
value, like this:
@font-face {
font-family: 'Circular-Medium';
src: url('fonts/lineto-circular-medium.woff') format('woff');
}
@font-face {
font-family: 'Circular-Medium-Book';
src: url('fonts/lineto-circular-book.woff') format('woff');
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With