How to allow AssetController to serve Bootstrap fonts ?

44 views
Skip to first unread message

Nicolas Delsaux

unread,
Oct 26, 2016, 4:31:32 AM10/26/16
to wisdom-...@googlegroups.com
Subject is quite clear, but let me make it adamant.

Bootstrap 3 integrate some fonts that are served under the /fonts/...
path. Unfortunatly, as AssetController doesn't, by default, map this
path, they can't be downloaded, as can show my Firefox console

downloadable font: download failed (font-family: "Glyphicons Halflings"
style:normal weight:normal stretch:normal src index:1):
status=2147746065 source:
https://localhost:9001/fonts/glyphicons-halflings-regular.woff2admdt.css:249:12
downloadable font: download failed (font-family: "Glyphicons Halflings"
style:normal weight:normal stretch:normal src index:2):
status=2147746065 source:
https://localhost:9001/fonts/glyphicons-halflings-regular.woffadmdt.css:249:12
downloadable font: download failed (font-family: "Glyphicons Halflings"
style:normal weight:normal stretch:normal src index:3):
status=2147746065 source:
https://localhost:9001/fonts/glyphicons-halflings-regular.ttf

These fonts come from the Bootstrap webjar :

<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>3.3.7-1</version>
<exclusions>
<exclusion>
<artifactId>jquery</artifactId>
<groupId>org.webjars</groupId>
</exclusion>
</exclusions>
</dependency>

I guess there is a way to configure the AssetController, but its
documentation is ... sparse :-)

By reading its source, I guess I could create an AssetController
component, using iPOJO ?

But I've already tried that approach, and it failed. So, what is the
best way to have an asset controller serve my fonts path ?

Clement Escoffier

unread,
Oct 27, 2016, 3:01:25 AM10/27/16
to wisdom-discuss
Hi,

Did you try with the webjar ? 

I’m surprised it requires /fonts (/ being the root). It can work with a second instance of the AssetController (https://github.com/wisdom-framework/wisdom/blob/master/documentation/documentation/src/main/resources/assets/asset.ad#L420).

Clement

--
You received this message because you are subscribed to the Google Groups "wisdom-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wisdom-discus...@googlegroups.com.
Visit this group at https://groups.google.com/group/wisdom-discuss.
To view this discussion on the web visit https://groups.google.com/d/msgid/wisdom-discuss/5976d0b0-ddb8-4176-29f5-5c3ae21afe17%40gmx.fr.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages