Coder Social home page Coder Social logo

nsfuntik / fluenticons Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chathil/fluenticons-spm

0.0 0.0 0.0 17.17 MB

A copy of the official Fluent Icons that works with Swift Package Manager and optimized for SwiftUI.

C 0.01% MATLAB 0.01% Swift 100.00%

fluenticons's Introduction

Microsoft Fluent Design Icons for iOS & macOS

A copy of FluentIcons that works with Swift Package Manager and optimized for SwiftUI.

Installation

select File > Swift Packages > Add Package Dependency and enter this repository URL

Usage

import FluentIcons

Image(fluent: .appStore24Filled)

# To specify a tint color
Image(fluent: .arrowHookDownLeft28Regular).foregroundColor(.red)

Benefits

1. No more missing assets!

By using the enum FluentIcon.myIcon24Regular you can be sure that the icon exists in your app at compile time.

2. Only includes what you use

At build/release time you can run the following script to ensure all unused assets are stripped from the app:

DERIVED_DATA=$(xcodebuild -showBuildSettings | pcregrep -o1 'OBJROOT = (/.*)/Build')
ICON_SOURCE_PATH="${DERIVED_DATA}/SourcePackages/checkouts/FluentIcons-SPM"

$ICON_SOURCE_PATH/Sources/remove-unused-fluent-icons/run \
    --path-to-source-code "." \
    --path-to-fluent-icon-source $ICON_SOURCE_PATH

3. Consistent asset rendering

All non-color icons are rendered as template images so you can easily apply a .foregroundColor(_ color:) to your Image.

FAQ

1. Will this increase my apps build size

No, but please remember to set setup the script using the instructions above ^ to strip out all unused assets.

2. Why are their assets of different sizes? Can't all PDFs be scaled?

Technically they can! But design has tailored each icon to each specific size. For example, smaller icons generally have less detail in the image.

fluenticons's People

Contributors

chathil avatar nsfuntik avatar

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.