Font Awesome 5 font-family issue

前端 未结 16 2800
深忆病人
深忆病人 2020-12-12 14:31

I integrated Font Awesome 5 in a project with bootstrap 4. When I recall a font via CSS it does not work. with Font Awesome 4 the code was as follows:

#mainN         


        
16条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-12 14:50

    I found a solution.

    • Integrate fontawesome-all.css
    • At the end of file Search the second @font-face and replace

      font-family: 'Font Awesome 5 Free';

    With

    font-family: 'Font Awesome 5 FreeR';
    

    And replace:

    .far {
      font-family: 'Font Awesome 5 Free';
      font-weight: 400; }
    

    With

    .far {
      font-family: 'Font Awesome 5 FreeR';
      font-weight: 400; }
    

提交回复
热议问题