Coder Social home page Coder Social logo

Comments (19)

willhou avatar willhou commented on May 11, 2024 8

@sebbouez We don't have plans for icon font yet, but it's something we have kept under our radar.

from fluentui-system-icons.

massijay avatar massijay commented on May 11, 2024 5

Icon Font would be the easiest way to use these icons in every platform (it would also solve #15). Please consider it!

from fluentui-system-icons.

spencer-nelson avatar spencer-nelson commented on May 11, 2024 5

You are correct in that the scaling of the pictographs is one of the biggest difficulty factors behind the adaptation of this into a font file. This is particularly the case because each one is hand crafted for the given size that it is used. This can be seen by comparing the different sizes of InPrivate Account or Keyboard. With that we are working on a couple of options for how to best offer scalability, particularly how to enable designers to more readily create them at different sizes while still adhering to the principles behind the icon set.

Along the idea of a community contribution of a script to automate the generation of a font file from the assets directory, akin to what the iOS and Android libraries do in preparing libraries that are easily usable in engineering products, we welcome and encourage contributions that solve these problems for whatever platform you are working on. Please feel welcome to fork the repo and create a PR to get your functionality included.

from fluentui-system-icons.

mxrsoon avatar mxrsoon commented on May 11, 2024 3

I've made a Node.js script to generate the font files for all icons in the assets folder that have a 24dp variant. The generated font file can be used with ligatures, so the "Duo Status Bar" can be used by just writing "duo_status_bar" using the font.

Can I contribute with the script?

Edit: I'm adding only icons that have a 24dp variant to the font because almost all icons have it, and I'm afraid to use a fallback strategy to grab another variant because that would probably lead to inconsistent scaling.

from fluentui-system-icons.

mdtauk avatar mdtauk commented on May 11, 2024 2

The MDL2 Icon font, uses 16px as its base grid scaling - there should probably be a few fonts at 12, 16, 20, 24, etc scales - so the flexibility of the Fluent Icon framework is not lost.

Its not as typographic as Apple's SF Symbols fonts (which support various weights for each icon) but it is more flexible than MDL2's 16px only icons.

from fluentui-system-icons.

GurliGebis avatar GurliGebis commented on May 11, 2024 2

@GurliGebis yeah we could update the script to output the CSS if that brings more convenience.

Most certianly would make it easier to use 👍

from fluentui-system-icons.

mdtauk avatar mdtauk commented on May 11, 2024 1

@mdtauk I agree.
But, for now, not every icon is available in the same scales. Some icons have only a 24dp variant, while some other icons have only a 20dp variant and so on. To generate a font face with all the icons, there should be consistency in scaling, if not, it would be hard to tell which icon is available at which scale.

Font Naming is the consideration for now then.

Fluent Icons 16 and Fluent Icons 24 etc - so the correct version will be chosen to match the 100% scale factor

from fluentui-system-icons.

aakash1313 avatar aakash1313 commented on May 11, 2024 1

@sebbouez : The WebFonts are now included. Please feel free to check that :)

from fluentui-system-icons.

GurliGebis avatar GurliGebis commented on May 11, 2024 1

Correct me if I'm wrong, but shouldn't there be a stylesheet mapping the characters to css classes?

from fluentui-system-icons.

mxrsoon avatar mxrsoon commented on May 11, 2024 1

Correct me if I'm wrong, but shouldn't there be a stylesheet mapping the characters to css classes?

It would be nice if at least the font had support for font ligatures. Take a look at my repo (wazybr/fluentui-system-icons-font) to see how it works. It's much more convenient than using arbitrary character codes.

from fluentui-system-icons.

willhou avatar willhou commented on May 11, 2024 1

@GurliGebis yeah we could update the script to output the CSS if that brings more convenience.

from fluentui-system-icons.

mxrsoon avatar mxrsoon commented on May 11, 2024

@mdtauk I agree.
But, for now, not every icon is available in the same scales. Some icons have only a 24dp variant, while some other icons have only a 20dp variant and so on. To generate a font face with all the icons, there should be consistency in scaling, if not, it would be hard to tell which icon is available at which scale.

from fluentui-system-icons.

mpkelly avatar mpkelly commented on May 11, 2024

@wazybr would you mind hosting your generated font in a git repo so it can be served by jsdelivr?

from fluentui-system-icons.

EnnoxHD avatar EnnoxHD commented on May 11, 2024

Take a look at https://github.com/EnnoxHD/fluentui-system-icons-font for some manually created fonts.

from fluentui-system-icons.

mxrsoon avatar mxrsoon commented on May 11, 2024

@EnnoxHD Thanks!
@mpkelly I'm setting up a repository with a script to generate the font and the current font files. I will tag you here when it's done.

from fluentui-system-icons.

mxrsoon avatar mxrsoon commented on May 11, 2024

Hey, @mpkelly. Take a look at wazybr/fluentui-system-icons-font.
I now added CSS generation to the script, and jsDelivr usage to the README.

from fluentui-system-icons.

mpkelly avatar mpkelly commented on May 11, 2024

@wazybr thanks a lot. That's fantastic!

@willhou would you be happy to include a link somewhere in your read me to @wazybr 's font repo?

from fluentui-system-icons.

GurliGebis avatar GurliGebis commented on May 11, 2024

Correct me if I'm wrong, but shouldn't there be a stylesheet mapping the characters to css classes?

It would be nice if at least the font had support for font ligatures. Take a look at my repo (wazybr/fluentui-system-icons-font) to see how it works. It's much more convenient than using arbitrary character codes.

Would you be able to rework your implementation so it can be merged into this repo? 🙂

from fluentui-system-icons.

mxrsoon avatar mxrsoon commented on May 11, 2024

Correct me if I'm wrong, but shouldn't there be a stylesheet mapping the characters to css classes?

It would be nice if at least the font had support for font ligatures. Take a look at my repo (wazybr/fluentui-system-icons-font) to see how it works. It's much more convenient than using arbitrary character codes.

Would you be able to rework your implementation so it can be merged into this repo? 🙂

I'm isolated and on vacation, away from any computer except my smartphone for now. But as soon as I get home, I'll check this issue to see if it's still needed.

from fluentui-system-icons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.