问题
We contributed to font-awesome 5 (yea), and we are looking from moving from our existing icons (Symbol set) to font-awesome. Will the naming of icons and usage of font-awesome 5 be backwards compatible with font-awesome 4.7?
IE: Should we go to 4.7 now, and have very easy upgrade to 5.0?
OR should we hold off until font-awesome 5 comes out?
回答1:
It's not backwards compatible.
I just publish a script to do the migration from 4 to 5 in:
https://github.com/estebandelaf/scripts/blob/master/fontawesome4to5.sh
PS: I know the post is from a year ago, but is the second result in google for "fontawesome migration script 4 to 5".
回答2:
Since above mentioned scripts doesn't work for icons like thermometer,battery etc. Created a python script that works for all icons. Below is the link.
https://github.com/abkcode/fontawesome4to5
For details about the upgrade changes visit.
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4
回答3:
Fontawesome provides v4-shiv.js that transitions old v4 icons into v5 but it's only for the SVG+JS framework.
If you are using the CSS framework with webfonts, here is a jQuery javascript that does the same thing.
https://gist.github.com/timint/fb53929ff196d0a5754188bd93a80cef
回答4:
I have created a python script to upgrade from 4.7 to 5.1 without the need to. It worked best for me. https://gist.github.com/ilanben/38ef4d4545cb74089375af0ceecf439b
Update: Fixed the link which was temporarily broken
回答5:
Simply use use.fontawesome.com/releases/v5.10.1/css/v4-shims.css
More details : https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4
回答6:
This python and shell scripts not properly worked me. I'm using Kendo Framework this reason fontawesome shims script dont change my classes. because shim script load before the component render.
I made own script in node.js. https://github.com/KiPSOFT/fontawesome4to5
来源:https://stackoverflow.com/questions/41025192/upgrade-process-for-fontawesome-from-4-to-5