Skip to content
This repository was archived by the owner on May 29, 2020. It is now read-only.

Tiny tiny icons after upgrading to 0.5.0 #211

Closed
hacker112 opened this issue Jan 7, 2015 · 8 comments
Closed

Tiny tiny icons after upgrading to 0.5.0 #211

hacker112 opened this issue Jan 7, 2015 · 8 comments
Labels

Comments

@hacker112
Copy link

Icons became very very tiny after upgrading from 0.4.3 to 0.5.0

version 0.4.3:
https://www.dropbox.com/s/o0rf3dcuxalks8q/Sk%C3%A4rmklipp%202015-01-07%2012.51.39.png?dl=0

version 0.5.0:
https://www.dropbox.com/s/xzl38u2xla84j34/Sk%C3%A4rmklipp%202015-01-07%2012.03.53.png?dl=0

grunt options:

        webfont: {
            icons: {
                src: 'app/img/icons/*.svg',
                dest: 'app/css/icons',
                options: {
                    types: 'woff',
                    stylesheet: 'scss',
                    relativeFontPath: 'icons/',
                    engine: 'node'
                }
            }
        },

Example svg:

<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
     width="32.112px" height="40px" viewBox="0 0 32.112 40" enable-background="new 0 0 32.112 40" xml:space="preserve">
<polygon points="0,0 0,40 32.112,20 "/>
</svg>
@sapegin
Copy link
Owner

sapegin commented Jan 7, 2015

Make your icons something like 1000px.

@hacker112
Copy link
Author

This is obviously a bug and not a question. It worked fine before, so it is something that has broken in the last update.

@hacker112
Copy link
Author

I now took the time time to check what happened in the code between 0.4.8 and 0.5.0.
There is an option that is called normalize (that seems to be undocumented in the Readme).

The code is changed from

 normalize: options.normalize !== false,

to

 normalize: options.normalize === true,

Which meant that in 0.4.8 normalize was the true by default and in 0.5.0 it was false by default. I see nothing about this change in the Changelog.

I also see that the all icons are rendered properly anymore, but I will create a separate issue for that.

@sapegin
Copy link
Owner

sapegin commented Mar 3, 2016

It’s undocumented because it’s available only for the Fontforge engine. If you can make output more consistent between two engines, I’ll be happy to merge your pull request. Related issue: #222.

@hacker112
Copy link
Author

I am using the node engine (not fontforge engine) and normalize has an effect in with the node engine. Did you mean the other way around?

@sapegin
Copy link
Owner

sapegin commented Mar 4, 2016

You’re right. But as I remember it’s not the same in node and fontforge engines ;-|

I don’t use web fonts anymore and can’t spend a lot of time on the project. So if you want to help feel free to do it.

@hacker112
Copy link
Author

Aha, I understand :-)
If I find the time I would be glad to help. Then I also need to understand why icons are getting rendered worse (or not at all) for each version and fix that ;)
#321 (comment)

@sapegin
Copy link
Owner

sapegin commented Mar 4, 2016

For node engine it’s better to start from updating svgicons2svgfont: they’ve changed an API so it’s not that easy but it could fix some problems because the version used by grunt-webfont is very old.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants