Giter Club home page Giter Club logo

tips_10_06_sfcustom_end's Introduction

Tips_10_06_SFCustom_End

Learn how to make your own SF Symbols for your applications. I'll use Affinity Designer, but the process will work the same for any graphics editor that can read and export .svg files. For some known problems with some editors including Affinity Designer, see the README below.

Extra Comments about exporting the SVG with custom margins

I found with Affinity Designer I was getting bugs. When importing a custom SF Symbol to Xcode that I have changed the margins, I got the error

Corrupt Content: The SVG file provided for the symbol image set pie.fill is not suitable: Symbol image file (null) has guide object right-margin of the wrong type, it must be a shape

This is not an error when validated in the SF Symbol app. It appears to be an issue with the XML tags. Xcode requires only a rect tag with an id, while my export (from Affinity Designer) exports the rect encompassed in a g tag that has the id.

For example, my original export from SF Symbol has for a right margin:

<rect id="right-margin" x="1494.79" y="1030.79" width="12.451" height="119.336" style="fill:rgb(0,174,239);fill-opacity:0.4;"/>

But the exported Affinity designer .svg has

<g id="right-margin" transform="matrix(1.74652,0,0,1,-1115.89,0)"><rect x="1494.79" y="1030.79" width="12.451" height="119.336" style="fill:rgb(0,174,239);fill-opacity:0.4;"/></g>

And will cause an error. If you edit the XML to

<rect id="right-margin" x="1494.79" y="1030.79" width="12.451" height="119.336" style="fill:rgb(0,174,239);fill-opacity:0.4;"/>

It will add the symbol without errors.

Remove any <g><\g> tags around the margin rects.

I Put in a bug report to Apple who says the XML must be properly formed, and it is the exporting application's problem, so if you see this, change it manually.

tips_10_06_sfcustom_end's People

Contributors

makeapppiepublishing avatar

Watchers

James Cloos avatar  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.