Using Font Awesome offline

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Using Font Awesome offline

Thorsten
Hi,

I noticed that I can only view Font Awesome icons (":icons: font") when the computer has internet access. Same goes for syntax highlighting (highlight.js). This does not change even when the Font Awesome font is installed on my local machine.

Is there a way to include (make available offline) the font awesome fonts (and source highlighting)?

Thorsten
Reply | Threaded
Open this post in threaded view
|

Re: Using Font Awesome offline

mojavelinux
Administrator
Thorsten,

Yes, though we are likely going to reevaluate how this is done in future releases (see https://github.com/asciidoctor/asciidoctor/issues/659).

Right now, you can set the path to the font file as follows:

```asciidoc

= Document Title
Author Name
:icons: font
:iconfont-remote!:

```

It will look for font-awesome.css is the same directory as the generated HTML file. If you set the stylesdir attribute, it will look inside that directory. If you are confused, just look at the source of the generated HTML.

...except I just realized the iconfont-remote setting was broken...so it won't work until the next pre release of 1.5.0.

-Dan


On Wed, Jun 18, 2014 at 10:10 AM, Thorsten [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi,

I noticed that I can only view Font Awesome icons (":icons: font") when the computer has internet access. Same goes for syntax highlighting (highlight.js). This does not change even when the Font Awesome font is installed on my local machine.

Is there a way to include (make available offline) the font awesome fonts (and source highlighting)?

Thorsten


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Using-Font-Awesome-offline-tp1831.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
|

Re: Using Font Awesome offline

Linda
To the top of my document, I've added

:icons: font
:iconfont-remote!:

I've placed the 'font-awesome.css' in the folder with the document. However, the icons cannot been found in the generated html and in the source of the html I still find references to 'https://fonts.googleapis.com...'.

May the iconfont-remote setting be broken (again) or do I overlook something?

Reply | Threaded
Open this post in threaded view
|

Re: Using Font Awesome offline

mojavelinux
Administrator


However, the icons cannot been found

I explain the problem in the following comment. It has to do with how Font Awesome is packaged by default:


 I still find references to 'https://fonts.googleapis.com...'.

Those are different fonts. Those are the body fonts. To disable those, you need to unset the webfonts attribute too.

:!webfonts:


Cheers,

-Dan

--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Using Font Awesome offline

Linda
Thanks, it worked!