question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Material Design Icons not showing

See original GitHub issue

In assets/fonts, I have materialdesignicons-webfont.ttf and in assets/css, I have materialdesignicons.css. And finally in main.js, I have the following:

import {TNSFontIcon, fonticon} from 'nativescript-fonticon';

TNSFontIcon.debug = true;
TNSFontIcon.paths = {
  'mdi': './assets/css/materialdesignicons.css'
};
TNSFontIcon.loadCss();

Vue.filter('fonticon', fonticon);

And I am using icon like the following:

<Label class="mdi" :text="'mdi-youtube' | fonticon" style="color: #fff;font-size: 40px;" />

However, icons are not showing at all.

Screenshot from 2019-03-10 18-23-18

Btw, I grabbed the css from https://github.com/Templarian/MaterialDesign-Webfont/tree/master/css.

Please help!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
liamlevesquecommented, Aug 9, 2019

@tralves - sorry to hijack this, but I’m having a similar issue using an icomoon icon font - in the logs I don’t see any icons. Is that what is supposed to happen?

I have the fonts in /app/fonts/icons.ttf and the icomoon css file in app/assets/icons.css like so: image I have the following in main.js:

import { TNSFontIcon, fonticon } from "nativescript-fonticon";

TNSFontIcon.debug = true;
TNSFontIcon.paths = {
icon: "./assets/icons.css"
};
TNSFontIcon.loadCss();

Vue.filter("fonticon", fonticon);

and in my app.scss I have: .icon { font-family: icons; font-weight: 400; }

but still get nothing in my app. 😦

Any suggestions?

0reactions
dcolleycommented, Sep 8, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Material Design Icons not showing in browser
I'm trying to host the Google Material Design icon set for my website however I cannot get the icons to show in Chrome...
Read more >
Google Material Icon not Showing. : r/learnprogramming - Reddit
According to the Google Material Icon docs, it's supposed to be replaced by the icon that corresponds to 'delete'.
Read more >
outlined icons not working · Issue #1263 - GitHub
I am trying to use the outlined version of notifications. I can use the normal filled version but the outline version is not...
Read more >
Material Design Icons not showing in Firefox - Support
Hello, I'm having an issue where certain icons aren't showing up in Firefox. For example, all the icons at the bottom of this...
Read more >
Material Icons Guide | Google Fonts
Material design system icons are simple, modern, friendly, and sometimes quirky. Each icon is created using our design guidelines to depict in simple...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found