Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qvacua/material-icons
Simple Swift package for Material Icons on macOS
https://github.com/qvacua/material-icons
fonts macos material-icons swift swiftpm
Last synced: 1 day ago
JSON representation
Simple Swift package for Material Icons on macOS
- Host: GitHub
- URL: https://github.com/qvacua/material-icons
- Owner: qvacua
- License: mit
- Created: 2020-08-19T19:42:55.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-12-26T14:44:22.000Z (23 days ago)
- Last Synced: 2024-12-26T15:32:04.840Z (23 days ago)
- Topics: fonts, macos, material-icons, swift, swiftpm
- Language: Swift
- Homepage:
- Size: 517 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Support: Support/MaterialIconsSupport.xcodeproj/project.pbxproj
Awesome Lists containing this project
README
# MaterialIcons
Simple Swift package for [Material Icons][material-icons]. We currently support only macOS 12 or higher.
Include it via SwiftPM and use as follows```swift
import MaterialIconslet bookIcon = Icon.book.asImage(
dimension: 320,
padding: 12,
style: .filled,
color: .black,
backgroundColor: .white
)
```Please note that due to bundled font resources, you need at least SwiftPM 5.3.
The bundled fonts in the package were downloaded from [fonts.googleapis.com][font-download-link].The font loading code is a slightly modified version of [thii/Fontawesome.swift][thii-fontawesome].
## Generate `Icon`s from `ijmap`
Execute the generate script as follows
```
$ ./bin/generate_icons.py \
--input-file ./Sources/MaterialIcons/MaterialIcons-Regular.ijmap
--output-file ./Sources/MaterialIcons/Icon.generated.swift
```[material-icons]: https://material.io/resources/icons
[font-download-link]: https://fonts.googleapis.com/css?family=Material+Icons|Material+Icons+Outlined|Material+Icons+Two+Tone|Material+Icons+Round|Material+Icons+Sharp
[thii-fontawesome]: https://github.com/thii/FontAwesome.swift