MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.20.0 is available! For more information about this release, check out this topic.

    Using Two Fonts with Compliments

    Troubleshooting
    4
    10
    263
    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.
    • F
      fonz88 last edited by fonz88

      This will be my second mirror and have learned so much my second time around. This mirror will be an Xmas present for my niece that’s a big Star Wars fan so I’m including quotes from the movies in the Star Wars font. I’ve already got the font added then modified my custom.css and it’s working perfect.

      What I want to do is add a couple quotes from The Mandalorian series that’s so popular right now but with the Mandalore font but keep the Star Wars quotes using the Star Wars font. Not really sure how to accomplish that and haven’t had any luck searching on the forum.

      Thanks in advance!!

      1 Reply Last reply Reply Quote 0
      • hango
        hango Module Developer last edited by hango

        Use my module compliments_plus and put html tag with some inline css style or class regarding your fonts

        https://github.com/hangorazvan

        F M 2 Replies Last reply Reply Quote 0
        • F
          fonz88 @hango last edited by

          @hango said in Using Two Fonts with Compliments:

          compliments_plus

          Didn’t know about your module! Not sure how I would implement these fonts since I have them saved locally under the fonts folder. Do you have some examples of how it should look with local fonts? Or is that even an option?

          1 Reply Last reply Reply Quote 0
          • hango
            hango Module Developer last edited by hango

            In custom.css add

            @font-face {
              font-family: your font name;
              font-style: normal;
              font-weight: 100;
              src: local("your font name"), /* if is installed on system */url("path to your font.woff2") format("woff2"), url("path to your font.woff") format("woff"), url("path to your font.ttf") format("ttf");
            }
            
            .mando {
              font-family: your font name;
            }
            

            in compliments_plus config put

            "anytime" : [
            	"< span class='mando' > Star Wars quote < /span >",
            ],
            

            https://github.com/hangorazvan

            F 1 Reply Last reply Reply Quote 0
            • M
              MrDondoT @hango last edited by

              @hango is it possible to use an external JSON file as the default compliments does?

              1 Reply Last reply Reply Quote 0
              • hango
                hango Module Developer last edited by

                I think so, you may try

                https://github.com/hangorazvan

                M 1 Reply Last reply Reply Quote 0
                • M
                  MrDondoT @hango last edited by

                  @hango works perfectly! many thanks for your help

                  A 1 Reply Last reply Reply Quote 0
                  • A
                    ashishtank @MrDondoT last edited by

                    @MrDondoT If you are not changing modules frequently then you can do it with custom.css and using module id and sub classes.
                    Below is example for calendar, same is possible with other modules.

                    #module_4_calendar .module-header {
                    	color: orange !important;
                    }
                    
                    #module_4_calendar .title.bright 
                    {
                    	color: orange !important;	
                    }
                    

                    37b91dcf-ab08-40cd-a1e5-c2ed91f65573-image.png

                    1 Reply Last reply Reply Quote 0
                    • F
                      fonz88 @hango last edited by

                      @hango

                      Thank you! I got it working and will post some pictures later. I just wanted to add that in your documentation you have in order to disable the default compliments to add ‘disable: true’ in the config but it should be ‘disabled: true’.

                      {
                      module: “compliments”,
                      position: “lower_third”,
                      disabled: true
                      }

                      Also, I had to remove the spaces from the html tag example you provided me.

                      “ Star Wars quote ”,

                      Not sure if this was caused by my setup but that’s how I got it to work for my mirror. Again just wanted to say Thank you as I have my mirror ready in time for a xmas present!

                      1 Reply Last reply Reply Quote 0
                      • hango
                        hango Module Developer last edited by

                        Yes, was a typo at disabled and quotes with spaces are for display proprely here, else are hidden

                        https://github.com/hangorazvan

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy