No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    How to import custom webfonts into the <q-item-side> <q-icon> ?

    Help
    4
    18
    4125
    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.
    • K
      keyb2004 last edited by

      0_1498276453167_iconfont.png

      The last one is what I want.

                1. <q-icon name="iconfont icon-delete" style="color: black"/><br>
                2. <q-icon name="icon-delete" style="color: black"/><br>
                3. <i class="iconfont icon-delete"></i><br>
      

      I tried to import some custom webfonts into the <q-item-side> <q-icon> componets, but it seems like something wrong. How could I do?
      Thanks.

      1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by

        Have a look here in the docs: http://beta.quasar-framework.org/components/icons.html

        Scott

        1 Reply Last reply Reply Quote 0
        • rstoenescu
          rstoenescu Admin last edited by

          @keyb2004 If the icon webfonts you want to use are not there, please specify which icon fonts you are using.

          K 1 Reply Last reply Reply Quote 0
          • K
            keyb2004 @rstoenescu last edited by

            @rstoenescu Could you give me a example?

            <q-icon name="iconfont icon-delete" style="color: black"/>
            

            I think I have given the icon fonts. but doesn’t work.

            1 Reply Last reply Reply Quote 0
            • rstoenescu
              rstoenescu Admin last edited by

              @keyb2004 I mean the name of the icon font, like: Ionicons, Fontawesome. Need to know the name and a link to it so I can add support for it. Thanks!

              K 1 Reply Last reply Reply Quote 0
              • K
                keyb2004 @rstoenescu last edited by keyb2004

                I use icomoon to import my custom webfonts. Can you help me to add this to your quasar-extra ?

                I guess it will be added here:

                // QIcon.js
                    if (!icon) {
                      name = ''
                    }
                    else if (icon.startsWith('fa-')) {
                      name = `fa ${icon}`
                    }
                    else if (icon.startsWith('ion-')) {
                      name = `${icon}`
                    }
                    else {
                      name = 'material-icons'
                      text = icon.replace(/ /g, '_')
                    }
                

                Thank you so much!

                1 Reply Last reply Reply Quote 0
                • rstoenescu
                  rstoenescu Admin last edited by

                  Yes, that’s why I was asking 🙂 thx, will add it tomorrow.

                  1 Reply Last reply Reply Quote 0
                  • rstoenescu
                    rstoenescu Admin last edited by rstoenescu

                    IcoMoon font icon support was added. npm update quasar-framework. Also read docs.

                    After importing the IcoMoon css, you can use it like this:
                    <q-icon name="icon-delete" />

                    K 2 Replies Last reply Reply Quote 0
                    • K
                      keyb2004 @rstoenescu last edited by

                      @rstoenescu <q-btn><q-ico> works !

                      But <q-list-side icon=“icon-delete”> doesn’t work properly.

                      Thanks for your help.

                      rstoenescu 1 Reply Last reply Reply Quote 0
                      • K
                        keyb2004 @rstoenescu last edited by

                        @rstoenescu I found an other way to solve the problem 🙂

                                  <q-item v-ripple>
                                    <q-item-side style="color: white"><q-icon name="icon-property" /></q-item-side>
                                    <q-item-main label="Docs"></q-item-main>
                                  </q-item>
                        
                        1 Reply Last reply Reply Quote 0
                        • rstoenescu
                          rstoenescu Admin @keyb2004 last edited by

                          @keyb2004 said in How to import custom webfonts into the <q-item-side> <q-icon> ?:

                          But <q-list-side icon=“icon-delete”> doesn’t work properly.

                          Did you mean <q-item-side> instead?

                          1 Reply Last reply Reply Quote 0
                          • K
                            keyb2004 last edited by keyb2004

                            yes. I use <q-item-side>

                            1 Reply Last reply Reply Quote 0
                            • K
                              keyb2004 last edited by

                              yes. I use <q-item-side>. its parameter “icon” doesn’t work.

                              1 Reply Last reply Reply Quote 0
                              • K
                                keyb2004 last edited by

                                Several components have the parameter icon=…
                                I think the upgrade will be applied on All of them.

                                1 Reply Last reply Reply Quote 0
                                • rstoenescu
                                  rstoenescu Admin last edited by

                                  Yes. Update to latest and all icon props will work.

                                  K 1 Reply Last reply Reply Quote 0
                                  • K
                                    keyb2004 @rstoenescu last edited by

                                    @rstoenescu So nice job! From now on, we can import our customer icons.

                                    Thank you for your help!

                                    1 Reply Last reply Reply Quote 0
                                    • rstoenescu
                                      rstoenescu Admin last edited by

                                      For anyone else reading this: if your favorite font icon is not listed in docs, please submit a request to add it 😉

                                      1 Reply Last reply Reply Quote 0
                                      • J
                                        jodu last edited by jodu

                                        Hello !

                                        I have seen a nice webfont for my personal usage, which is called Rpg-Awesome (https://github.com/nagoshiashumari/Rpg-Awesome)

                                        I use only Quasar Vue plugin and not Quasar-cli, so I can’t (in fact I don’t know how to do it in the correct way) use icons from this webfont in the <q-icon> tag.

                                        Can you add the support for this ?

                                        Thank you a lot 🙂

                                        1 Reply Last reply Reply Quote 0
                                        • First post
                                          Last post