FontCustom / fontcustom

Generate custom icon webfonts from the comfort of the command line.
3.29k stars 423 forks source link

woff_path should from css option not fonts #368

Open p-l-h opened 6 years ago

p-l-h commented 6 years ago
        # we get @font_path base from css option @ line 42
        fonts_path = Pathname.new(@options[:output][:fonts]).realdirpath
        css_path = Pathname.new(@options[:output][:css]).realdirpath
        preview_path = Pathname.new(@options[:output][:preview]).realdirpath
        @font_path = File.join fonts_path.relative_path_from(css_path).to_s, name

        # but we get woff_path base from fonts option @ line 189
        def woff_base64
            woff_path = File.join(@options[:output][:fonts], "#{@font_path}.woff")
           Base64.encode64(File.binread(File.join(woff_path))).gsub("\n", "")
        end