davedelong / sfsymbols Goto Github PK
View Code? Open in Web Editor NEWExport the shapes in the SF Symbols font
Export the shapes in the SF Symbols font
I can't seem to get sfsymbols
to export using any weights other than regular
. When I specifiy, e.g., thin
, I still get a Regular glyph (which is still better than no glyph, of course!).
Could you please add a license? Would love to use this at my workplace, but we can't unless it has a license.
otherwise the icon won't work properly, the image has 3 sizes (1x, 2x, 3x) apparently should be for image not appicon, in iconset will ask you to assign other sizes, that for the app icon I guess.
I modified the code by changing the dir name from *.iconset to *.imageset, which works fine for me, maybe you should change that.
After building and symlinking to /usr/local/bin
, running
sfsymbols --output symbols --format png
creates the symbols
directory, but no files are written inside it.
I've got the SF Symbols app version 1.0 (13) installed, which I just downloaded today. Specifying the font path explicitly doesn't change anything.
Running 10.14.6 and Swift 5.1 (Xcode 11).
The installer installs a whole bunch of SF fonts in /Library/Fonts
. Inspection with Glyphs.app shows that those fonts also contain the symbols.
Using these would be a better way to find the glyphs, as the SF fonts also support all of the various weights and display modes.
% sfsymbols
The operation couldn’t be completed. (sfsymbols.ArgumentParserError error 5.)
System: MacOS Big Sur/11
Device: Macbook Air 2018
Version: Latest
It'd be nice to manually specify a path to the SFSymbols ttf file, instead of always attempting to find the app.
Part of the CSV defining the glyphs is a column that says whether the shape can be mirrored for RTL languages.
When generating SVG, shapes can have a direction
attribute. For mirrorable shapes, this should be omitted. For non-mirrorable shapes, this should be direction="ltr"
.
Hello! It'd be neat if there were a new generator that took the generated UIBezierPath
objects and rendered them into PNGs, preferably put into iconsets. Thanks!
Hey Dave, this is a great tool! I'd love an enhancement for exporting as squares, as currently it provides a button that's sized in a way that the image has to be re-sized after export to be used in an element like a UIButton
or UIImageView
.
For example square.and.arrow.up.on.square
exports as a 59x85 asset, which when placed in a square button looks awful.
My proposed solution would be to provide an option to export as squares, so the 59x85 asset would become 85x85, with the 59x85 content portion centered in the asset.
Thanks a lot!
The initial thought of using Objective-C was that I'd need to dig in to private functions in order to accomplish stuff, and private APIs are easier to use from Objective-C than from Swift.
That has turned out to not be the case, so there's no requirement for this to be in Objective-C.
swift build -c release
results in a Error Message:
Product 'SPMUtility' not found. It is required by target 'sfsymbols'
Will it only work with newer Xcode version?
This is awesome since the SF Symbols app makes it hard to export.
I'd love to be able to specify the font weight or stroke width.
Thanks for your great little tool!
Hello!
It'd be helpful if the Swift generator put each path as a named property of a parent class. Then it'd be a ready-to-go file to put in a project. Something like this:
class SymbolPath: UIBezierPath {
// Override point for generated paths
}
class Symbols {
static let someSymbolName: SymbolPath = {
// Dump corresponding path here (the entirety of one of the swift files you're generating now) and return
}
}
Thank you!
Filing this as a follow up to #9 as asked.
On top of exporting as squares, another option which would be useful in congruence would be to add optional padding, because an asset exported to fit to the full size of the image may not look great without padding.
Thanks a lot!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.