lukemelia / broccoli-base64-css

Broccoli plugin to replace reference to images in CSS with base64 strings
4 stars 5 forks source link

Add support for inlining font files. #1

Closed smt closed 10 years ago

smt commented 10 years ago

SVG files are an edge case, as they can be both images and fonts. As of now, the plugin will continue to look for SVG files in the imagePath.

My use of indexOf to detect whether the file is a font is admittedly a bit crude. Please give feedback :)

moudy commented 10 years ago

@smt thanks for taking the time to add support for font embedding!

I left some comments. I'm happy to merge and make these changes myself. Just let me know.

smt commented 10 years ago

@moudy Thanks for your feedback, I've incorporated the changes in my latest commits. Also attempted to handle missing files and the SVG edge case as well using fs.existsSync.

moudy commented 10 years ago

@smt looks good, thanks! :+1: