A Swift library and command line tool to parse, draw, and convert SVG images into SFSymbol, PNG, PDF, and Swift source code.
SwiftDraw is a Swift library for parsing and drawing SVG images, accompanied by a command-line tool. It enables developers to work with vector graphics across Apple's platforms, converting SVGs into multiple formats including native SwiftUI, UIKit, and AppKit code, as well as custom SF Symbols. It solves the problem of integrating SVG assets natively and efficiently into Swift projects.
Swift developers building applications for Apple platforms (iOS, macOS, etc.) who need to integrate, render, or convert SVG vector graphics. This includes developers creating custom SF Symbols, generating Swift drawing code from SVGs, or needing runtime SVG rendering in UIKit, AppKit, or SwiftUI.
Developers choose SwiftDraw for its native, pragmatic API that bridges vector graphics with Apple's ecosystem, offering unique features like SF Symbol generation and Swift source code export. It provides a versatile command-line tool for asset conversion and integrates seamlessly with SwiftUI, UIKit, and AppKit.
Swift library and command line tool to convert SVGs into SFSymbol, PNG, PDF and Swift source code.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The command-line tool converts SVGs to PNG, JPEG, PDF, Swift source code, and SF Symbols, offering versatile asset pipeline automation as shown in the usage examples.
SVGView works like SwiftUI's Image with resizable and scaling modifiers, making it easy to adopt in modern SwiftUI projects without extra boilerplate.
Generates SF Symbols from SVGs with support for ultralight and black variants, including automatic alignment, simplifying icon design for Apple apps.
Produces Swift source code for SwiftUI, UIKit, and AppKit, allowing embedding of vector graphics directly into Swift projects without runtime parsing overhead.
The library may not handle all SVG filters or advanced features, as acknowledged by the --hide-unsupported-filters flag, potentially leading to rendering gaps.
Built exclusively for Swift and Apple ecosystems, it cannot be used for cross-platform development, limiting its versatility in mixed-technology stacks.
Installation requires Homebrew or manual downloads, and the tool has numerous options that might overwhelm users seeking simple, integrated GUI solutions.