Search code examples
nativescript-angular

NativeScript not showing custom fonts


Custom fonts are not showing up on my app.

I did some googling, pretty sure I named everything correctly, font files are in the correct folder. Not too sure what's going on.

This is how I'm using it in app.css:

.pontanosans-regular {
    font-family: "PontanoSans", "PontanoSans-Regular";
    font-weight: 400;
}

I am then using this class in the other folder/files like so:

class="pontanosans-regular"

This is what the folders look like:

enter image description here


Solution

  • As per {NS}

    Note: In iOS your font file should be named exactly as the font name. If you have any doubt about the original font name, use the Font Book app to get the original font name.

    and Pontano Sans name in mac is having a space between 2 words. So your family name should be like this.

    font-family: "Pontano Sans", "PontanoSans-Regular";