webpack-contrib / file-loader

File Loader
MIT License
1.86k stars 257 forks source link

File-loader v1.1.11 is causing fonts to render differently to the source #285

Closed benstaker closed 6 years ago

benstaker commented 6 years ago

This issue is for a:

Code

webpack.config.js
...
     {
        test: /\.(eot|svg|ttf|woff|woff2)(\?v=\d+\.\d+\.\d+)?$/,
        include: [CoreConfig.paths.npm, CoreConfig.paths.public],
        use: [{ loader: 'file-loader', options: { name: '[name]-[hash].[ext]', publicPath: '/assets/' } }]
      },
...

Expected Behavior

Our icons should not have a white line in the circle.

image

Actual Behavior

Icons have a white line in the circle.

image

Description

There seems to be some processing on the font files passed through file-loader that is causing the fonts to render differently. When resizing the font to 67px in Google Chrome it seems to render fine, but this is not ideal as we don't need it this large. Downgrading to v1.1.10 has fixed the issue, so I suspect this was a recent change in v1.1.11 that has caused this. See the diff between the original file and the served file below.

image

alexander-akait commented 6 years ago

@benstaker we don't modify content, just provide link to asset, looks the problem in not related to file-loader, check you plugins and other loaders

benstaker commented 6 years ago

@evilebottnawi this is not an issue with file-loader. Downgrading the package a minor version triggered a reset of the cache in hard-source-webpack-plugin. Thanks for your time.