What I am trying to achieve:
I want to use custom icons on my Wordpress website (including in the Admin Menu).
What I have done so far
I have set up an account on fontastic.me and enqueued the font using the following in functions.php hooked to 'admin print styles'
wp_enqueue_style('fontastic-css', 'https://file.myfontastic.com/<mycode>/icons.css');
I've set the name of my icons on fontastic me to be 'dashicons' because this way you can directly use them in the admin menu e.g.
add_menu_page(
'Page Title',
'Menu Title',
'Capability',
'menu_slug',
[ $this, 'call_back' ],
'dashicons-custom-icon-name',
1
);
If you call them something else e.g. custom-icons you can't use them so easily.
I have also tried enqueuing in other ways but the issue is the same as I document below.
What's the issue?
However, by doing this I am evidently overwriting / blocking / generally interfering with the existing 'dashicons' library provided with Wordpress.
This means any dashicons throughout Wordpress that are not in my library fail to load and I am left with empty squares in their spaces.
Any help identifying how I can add to the dashicons library, rather than overwrite it would be much appreciated. Thanks.