module FlatUI
  module Rails
    class Engine < ::Rails::Engine
      initializer "flat-ui-sass.assets.precompile" do |app|
        if Dir.exist? File.join(::Rails.root, 'vendor', 'assets', 'fonts', 'flat-ui-pro')
          app.config.assets.precompile << %r(flat-ui-pro/Flat-UI-Icons\.(?:eot|svg|ttf|woff)$)
        else
          app.config.assets.precompile << %r(flat-ui/Flat-UI-Icons\.(?:eot|svg|ttf|woff)$)
        end
      end
    end
  end
end

module FlatUI
  module Rails
    class Engine < ::Rails::Engine
      initializer "flat-ui-sass.assets.precompile" do |app|
        if Dir.exist? File.join(::Rails.root, 'vendor', 'assets', 'fonts', 'flat-ui-pro')
          app.config.assets.precompile << %r(flat-ui-pro/flat-ui-icons-regular\.(?:eot|svg|ttf|woff)$)
        else
          app.config.assets.precompile << %r(flat-ui/flat-ui-icons-regular\.(?:eot|svg|ttf|woff)$)
        end
      end
    end
  end
end

Fix font precompilation for new flat-ui-icons font name
Fix font precompilation for new flat-ui-icons font name
