Project Structure
The Fonts folder
Custom fonts are placed in the src/fonts folder. This folder is treated special, because .ttf files placed here are automatically picked up by NativeScript.
Using Custom Fonts
To use a custom font, place the .ttf file in the src/fonts folder, then run
bash
ns fonts
to generate the necessary css declarations. You can manually write these, the above command is just a convenience method to save some time and reduce the guesswork, since the font-family can be different from the file name.
Create a new css class in your CSS, for example in app.css or app.scss
css
.custom-font-class {
font-family: '...';
font-weight: 400;
}
Using Icon Fonts
- Previous
- src/
- Next
- app.(css|scss)




