Giter Site home page Giter Site logo

Comments (12)

mihauco avatar mihauco commented on May 31, 2024 20

It's not a webfont bug, it's a problem with svgicons2svgfont package. And solution is quite simple. You don't need to export big svg images from Illustrator, or add empty svg images with big size, just set propper options in config - fontHeight: 600 and normalize: true.

from webfont.

japalo avatar japalo commented on May 31, 2024 5

Worked with the designer and we found out after multiple SVG export form illustrator and sketch that:

  1. Sketch export did not work at all for this. Something with the fill-mode i suppose. Either the fills where behaving unexpectedly or the fills where inverted.
  2. Illustrator needs to export a large SVG. We used 512px*512px
  3. All shapes needs to be finalized and using "Compound path".

I think this was/is issues that touches both the SVG export and the rendering of fonts. The SVG export from illustrator seems to have issues when exporting small sized complex shapes. This in turn made the generator confused while optimizing the icon.

The safe way of working with this seems to be to go large. I am not sure why, since SVGs are using bezier curves, but this is probably nice to mention in the readme and could be worth looking into in the future. :)

Thanks for letting me rubberduck debug this over here. Hope it helps some else! :D

from webfont.

japalo avatar japalo commented on May 31, 2024 2

@evilebottnawi
I expected this (screenshot from OSx preview:
skarmavbild 2017-05-22 kl 15 17 46

And i got this (screenshot from webpage where icon font has rendered font from SVG):
skarmavbild 2017-05-22 kl 15 18 49

from webfont.

alexander-akait avatar alexander-akait commented on May 31, 2024

@japalo can your provide what your expected and what is actually happens?

from webfont.

japalo avatar japalo commented on May 31, 2024

When i tried to boost up the size of the icons to 512px * 512px instead of 56px * 56px the lines smoothed out a bit, but the fill was weird instead. Will try to edit SVGs in order to update you.

from webfont.

alexander-akait avatar alexander-akait commented on May 31, 2024

@japalo do your use svgo or some similar tools?

from webfont.

alexander-akait avatar alexander-akait commented on May 31, 2024

@japalo great! If you have the time to do PR (add this caveat to readme), I will be happy, thanks!

from webfont.

machty avatar machty commented on May 31, 2024

@japalo Thanks for sharing your notes; was running into issues of lossiness for a particular icon that went away when I resized to 512x512 (and added the --normalize flag)

from webfont.

lwojciechowski avatar lwojciechowski commented on May 31, 2024

I found out that the problem was related to the low units-per-em in svg's font-face definition. I solved it putting there empty svg that had size of 600px x 600px and the font-face adjusted units-per-em to the biggest svg image it found. It works fine like this :)

from webfont.

jimmyandrade avatar jimmyandrade commented on May 31, 2024

When adding complex icons some SVG optimization messes up the icons.

@japalo were you able to solve the problem after the suggestion of @noiff?
If so, I would like to close this issue. Otherwise, feel free to respond and I will try to help you.

from webfont.

japalo avatar japalo commented on May 31, 2024

@jimmyandrade oh, this was a long time ago i actually can't remember. That must have been the solution since i didn't comment anything further.

I will close this issue, and thank @noiff for the solution I must have missed to do two years back.

from webfont.

jimmyandrade avatar jimmyandrade commented on May 31, 2024

@japalo no prob 😄 Feel free to reopen the issue, in case you encounter this problem again.

And sorry for the delay in answering, we are resuming activities in this repository now, as we have more people contributing.

from webfont.

Related Issues (20)

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.