talkjs / country-flag-emoji-polyfill

Add country flag emojis to Chromium-based browsers on Windows
Other
122 stars 8 forks source link

Font #4

Closed khitrukhina closed 1 year ago

khitrukhina commented 1 year ago

Currently the font is loaded through this link - https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2', but why not from node_modules, cause it's already here. How can I load it from there?

eteeselink commented 1 year ago

Just pass a different fontUrl as per https://github.com/talkjs/country-flag-emoji-polyfill#api

the lib can’t figure out that url automatically because where it is depends on how your bundler works and how/where you host your static files.

khitrukhina commented 1 year ago

Oh, thanks!

khitrukhina commented 1 year ago

so, i can pass here path to node_modules, correct?

eteeselink commented 1 year ago

Like I said, it depends on how your site is hosted and what module bundler you use and I can’t help you debug that. If this is too hard to figure out I recommend just sticking with the default jsdelivr url. It’s there specifically so that you don’t need to get blocked by this.