omacranger / fontawesome-subset

Creates subsets of FontAwesome fonts for optimized use on the web.
GNU General Public License v3.0
66 stars 15 forks source link

Woff, EOT, SVG fonts dropped #25

Closed jowan closed 2 years ago

jowan commented 2 years ago

Hi,

I see WOFF, EOT, SVG are not produced in version 4, but were in version 3. May I ask what was behind that decision ? is it just about modern browser support ?

TTF and WOFF2 are great, but I need to add WOFF for some (unfortunate) IE11 legacy support for a project. I've added the targetFormat - is that enough ? or do I have to do something else ? Are you planning to make the targetFormats configurable via arguments in the function - this would be great :)

diff --git a/node_modules/fontawesome-subset/dist/index.js b/node_modules/fontawesome-subset/dist/index.js
index e80b450..84a37aa 100644
--- a/node_modules/fontawesome-subset/dist/index.js
+++ b/node_modules/fontawesome-subset/dist/index.js
@@ -14,6 +14,7 @@ const subset_font_1 = __importDefault(require("subset-font"));
 const yaml_1 = __importDefault(require("yaml"));
 const utils_1 = require("./utils");
 const OUTPUT_FORMATS = [
+    { targetFormat: "woff", fileExt: "woff" },
     { targetFormat: "woff2", fileExt: "woff2" },
     { targetFormat: "sfnt", fileExt: "ttf" },
 ];
christopherpickering commented 2 years ago

I'm in the same boat but for me the woff2 is working in IE11. I wonder if it is in one of the compatibility settings that turn it on and off? I only have 1 yr left of IE11 support 🤩 can't wait to see it buried for good (hopefully lol)

omacranger commented 2 years ago

Yeah, I figured I would follow the lead of FontAwesome with their web font support.

subset-font appears to natively support woff format as well, so I should be able to add that in as an option.