NathanWalker / nativescript-ngx-fonticon

Use custom font icon collections seamlessly with NativeScript + Angular.
MIT License
76 stars 39 forks source link

Custom font with question marks #43

Closed matejhocevar closed 5 years ago

matejhocevar commented 5 years ago

Hey,

I successfully imported Font Awesome font in my app. When I try to import my custom font I get "question marks" instead of glyphs.

Problem: Question mark

Template code:

<Label class="el" [text]="'el-icon1' | fonticon" style="color: red; font-size: 50px;"></Label>

Css code:

.el-icon1:before {
    content: "\f005";
}

I get similar question mark if I do:

<Label class="el" text="&#xf005;" style="color: blue; font-size: 50px;"></Label>

What am I doing wrong?

matejhocevar commented 5 years ago

I found the problem. Problem was that .el class was not inherited into my template.

I reproduced my problem with adding style="font-family: myIcon;" on the Label:

<Label class="el" [text]="'el-icon1' | fonticon" style="color: red; font-size: 50px; font-family: myIcon;"></Label>