verbb / icon-picker

A Craft CMS field to select SVG or font icons from a folder for use in your content.
Other
17 stars 8 forks source link

Using ionicons 7.1 #80

Closed sjcallender closed 11 months ago

sjcallender commented 11 months ago

Question

Since ionicons 7.1 doesn't use a publicly available css file to use for remote loading per the docs...


    // Add the remote CSS to rendering
    $this->fonts[] = [
        'type' => 'remote',
        'name' => 'Ionicons',
        'url' => 'https://unpkg.com/ionicons@4.4.4/dist/css/ionicons.min.css',
    ];

... I'm wondering if you have a suggestion for how to use it with the plugin.

I'm also noting ionicons organizes their font styles by "outline," "filled," and "sharp." Not sure if that would complicate font selection in the field too.

Any insights are appreciated!

Additional context

No response

engram-design commented 11 months ago

We do support Ionicons 5.2.1 natively, but that's because I believe it was the last set that wasn't JS-based. The tedious part is really just the icon schema.

Although, since our refactor it should be possible to use them (similar to https://github.com/verbb/icon-picker/blob/craft-4/src/iconsets/Feather.php).

As for separate styles, that'll be fine - probably just separate icon sets.

sjcallender commented 11 months ago

Ah, I forgot to mention, we're still on Craft 3. We're prepping for Craft 4, but this site currently uses dolphiq's iconpicker plugin. We need to replace it in Craft 3 first, then we can update to Craft 4. But maybe we just hold off and move to your plugin when we update to Craft 4 since this plugin has more built-in in the Craft 4 version. Is that what you would suggest?

engram-design commented 11 months ago

I think that would probably be a good option! We refactored all the icon set logic for Craft 4, and won’t be backporting all that new support for more “advanced” icon sets like this.

sjcallender commented 11 months ago

Okay. That makes sense. We'll just migrate after we update to Craft 4. I'll close this and if we run into issues, will just reach out again. Thanks!