Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Font Awesome + Electron

I have an application made angular2, electron where I'm trying to insert fonts awesome. When I compile the application for the web it works, when I compile for the desktop it misses the font path. In more detail the application is structured in this way:

├─src/
├─build/
   ├─index.html
   ├─app/
   ├─fonts/
   |  ├─fonts...
   ├─font-awesome.min.css

I run the same project in the same folder build for desktop with electron build/. This is what I set in my index.html.

index.html

<base href="./">
<link rel="stylesheet" href="font-awesome.min.css">

This is the wrong path:

/C:/wamp/www/JUICE/projects/lightRoom/fonts/fontawesome-webfont.woff2?v=4.6.3:1

This is the right path:

/C:/wamp/www/JUICE/projects/lightRoom/build/fonts/fontawesome-webfont.woff2?v=4.6.3:1

What did I do wrong?

like image 785
XaBerr Avatar asked Oct 17 '16 18:10

XaBerr


People also ask

Can you use Font Awesome in JavaScript?

Font Awesome works well with Require. js, especially if you are using Web Fonts.

How do I use EJS Font Awesome?

How to use Font Awesome in Syncfusion ej controls? You can place Font Awesome icons by using the prefix `fa` and the icon's name in to your sample.


1 Answers

Solved, I moved the font-awesome.min.css in /css folder.

like image 162
XaBerr Avatar answered Nov 15 '22 05:11

XaBerr