fluentui-system-icons icon indicating copy to clipboard operation
fluentui-system-icons copied to clipboard

Publish CSS and fonts to NPM package repository

Open fredrikhr opened this issue 3 years ago • 3 comments

For static pages it would be advantageous to be able to have an easy way to consume the fluentui system icons. Hence it would be nice if the contents of the fonts folder of this repository would be published to npmjs as a package next to e.g. @fluentui/web-components.

With a published package to the NPM package registry, CDN provider like unpkg.com would automatically start providing the CSS and fonts for use in static page applications.

The package name @fluentui/css-icons could be used for that purpose as it would provide good synergy with the already existing packages @fluentui/react-icons and @fluentui/svg-icons that are already published from this repository.

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="https://unpkg.com/@fluentui/css-icons/dist/fonts/FluentSystemIcons-Regular.css" />
</head>
<body>
    <i class="icon-ic_fluent_access_time_24_regular"></i>
</body>
</html>

fredrikhr avatar Jul 19 '21 12:07 fredrikhr

Any update on this?

tarun29061990 avatar Aug 29 '21 13:08 tarun29061990

At this time we have no plans internally to extend font support in this way due to the overhead in fully maintaining a font and the massive size of a font with this many glyphs. In short, what is currently provided for Flutter has some existing assumptions due to that particular platform that don't hold for others.

spencer-nelson avatar Sep 15 '21 15:09 spencer-nelson

In plain HTML his works as a workaround:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/microsoft/[email protected]/fonts/FluentSystemIcons-Regular.min.css"
  crossorigin="anonymous" referrerpolicy="no-referrer" />

fredrikhr avatar Sep 15 '21 17:09 fredrikhr