• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

compliments font problem

Scheduled Pinned Locked Moved Custom CSS
5 Posts 2 Posters 3.0k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    mizban
    last edited by May 31, 2018, 8:14 AM

    hi guys. here is my custom css, but it dosent work, plz help!

    @font-face {
    font-family: nazanin;
    src:local (“nazanin”),
    url(“/home/pi/MagicMirror/fonts/nazanin/nazanin.woff”)format(“WOFF”);
    font-weight: 100;
    font-style: normal;

    }
    .compliments {
    font-family: nazanin;
    }

    P 1 Reply Last reply May 31, 2018, 7:16 PM Reply Quote 0
    • P Offline
      pjkoeleman @mizban
      last edited by pjkoeleman May 31, 2018, 7:26 PM May 31, 2018, 7:16 PM

      @mizban In your custom.css put the following line with your font as the first line of the custom.css.
      When there is a space in the filename replace it with a ´+'.

      /* Font for compliments, needs to be the first line !!! */
      @import url('https://fonts.googleapis.com/css?family=Allerta+Stencil');
      

      In the settings for your compliments, in the custom.css, set the fonts with the following line, together with other settings like font-size etc.

      font-family				: 'Allerta Stencil', serif;	
      

      Thats how I do it with a google font.

      1 Reply Last reply Reply Quote 0
      • M Offline
        mizban
        last edited by Jun 1, 2018, 10:13 AM

        @pjkoeleman said in compliments font problem:

        @import url(‘https://fonts.googleapis.com/css?family=Allerta+Stencil’);

        i tried below, result: it works only for calendar not for newsfeed and compliments??? why?

        @import url(‘https://fonts.googleapis.com/css?family=Allerta+Stencil’);
        body{
        margin: 20px;
        position: absolute;
        height: calc(100% - 20px);
        width: calc(100% - 20px);
        line-height: 1.5em;
        -webkit-font-smoothing: antialiased;
        }
        .calendar {
        font-family: ‘allerta stencil’, serif;
        }
        .compliments {
        font-family: ‘allerta stencil’, serif;
        }
        .newsfeed {
        font-family: ‘allerta stencil’, serif;
        }

        P 1 Reply Last reply Jun 3, 2018, 12:52 PM Reply Quote 0
        • P Offline
          pjkoeleman @mizban
          last edited by Jun 3, 2018, 12:52 PM

          @mizban When you want your compliments in this font try;

          /* Compliments */
          .compliments .xlarge {
            font-family	: 'Allerta Stencil', serif;
          }
          

          This works for me

          1 Reply Last reply Reply Quote 0
          • M Offline
            mizban
            last edited by Jun 3, 2018, 3:57 PM

            thank you very much pjkoeleman, for help! i tried:
            .compliments div {…} and it works.

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            1 / 1
            • First post
              4/5
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Sam, technical setup by Karsten.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy