ActivearkJWT / grunt-font-optimizer

Optimize TTF fonts with Grunt
MIT License
18 stars 5 forks source link

Output.ttf nowhere to be found #7

Open monte-hayward opened 9 years ago

monte-hayward commented 9 years ago

Task reports success, but the output file is not on my hard drive anywhere. Ideas? Does it matter whether it is an icon font, such as fontawesome? Tried the default set (0-z), and a single extended character "fa-reorder" \f0c9, with same results.

    font_optimizer: {
      dist: {
        options: {
          // Characters to include
          chars: '\f0c9', //0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
          // Features to include.
          includeFeatures: ['kern']
        },
        src: ['assets/fonts/fontawesome-webfont.ttf'],
        dest: 'assets/fonts/fontawesome-subset.ttf'
      }
    },

$ npm install grunt-font-optimizer --save-dev
grunt-font-optimizer@0.2.8 node_modules/grunt-font-optimizer
monte15bookPro2:greenfield-innovation.github.io monte$ 

$ grunt --verbose font_optimizer
Running "font_optimizer:dist" (font_optimizer) task
Verifying property font_optimizer.dist exists in config...OK
Files: assets/fonts/fontawesome-webfont.ttf -> assets/fonts/fontawesome-subset.ttf
Options: chars="\f0c9", includeFeatures=["kern"]
Creating file "assets/fonts/fontawesome-subset.ttf"... Success

Done, without errors.

$ ls -l1a assets/fonts/
.
..
FontAwesome.otf
fontawesome-webfont.eot
fontawesome-webfont.svg
fontawesome-webfont.ttf
fontawesome-webfont.woff
fontawesome-webfont.woff2
source-sans-pro_n4-i4-n7-i7.js
jehna commented 9 years ago

Quickly I'd guess that the package does not handle that specific character well. Have you tested with other fonts on your machine?

jehna commented 9 years ago

The Font Awesome currently uses a font table webf that is not supported by the font optimizer.

jehna commented 9 years ago

I opened the bug #8 to have a closer look of this issue

monte-hayward commented 9 years ago

Thanks. Meanwhile, I was able to workaround this using the Advanced settings of FontSquirrel. This allowed me to encode the dozen or so needed glyphs as base 64 in my CSS.

Since I do not change glyphs frequently, this did not need automation in the project.

janjonas commented 9 years ago

Same problem here with OpenSans-Bold.ttf (from Google): grunt-font-optimizer reports success but it does not generate any ttf file. TTF file can be downloaded from here: https://www.google.com/fonts#UsePlace:use/Collection:Open+Sans

Jab2870 commented 7 years ago

I have the same issue with another ttf font. Is there any update on this issue?

jehna commented 7 years ago

No updates yet. Would need to change the minifier to something else, as the development of the original minifier has stalled.