Source language: Translate to:

Google Fonts

General questions about NeoAppBuilder - our rapid application development tool for building HTML5, web and mobile apps.

Moderator: Neosoft Support

Google Fonts

Postby luishp » Sun Sep 06, 2015 10:23 am

With a small workaround I have been able to use Google Fonts on my NAB projects
I just add a code like this on Project->Properties->Styles

Code: Select all
  @font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 400;
  src: local('Oswald Regular'), local('Oswald-Regular'), url( format('woff2');

In this case I can use the Oswald font as it is downloaded from Google Servers, but it is only shown on runtime and only in Chrome and Firefox.
If I use the JavaScript version on start-up App Event it works on all browsers but, again, only at runtime:

Code: Select all
WebFontConfig = {
    google: { families: [ 'Indie+Flower::latin' ] }
  (function() {
    var wf = document.createElement('script');
    wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
    wf.type = 'text/javascript';
    wf.async = 'true';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(wf, s);

Would be nice to have the possibility to select Google fonts to work with inside the NAB editor.
Luis Hernández - SinLios Soluciones Digitales
User avatar
Posts: 382
Joined: Wed May 23, 2007 10:17 am
Location: Spain

Re: Google Fonts

Postby Neosoft Support » Mon Sep 07, 2015 2:03 pm

Internet Explorer doesn't support the woff2 font format, so you would need to include a fall back option in your @font-face css.

More info here:

and about Google fonts specifically:

Also, I would host the fonts on your own server if you can. Then if/when Google decides to change something your website will still work.
NeoSoft Support
Neosoft Support
NeoSoft Team
Posts: 5621
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Return to General NeoAppBuilder Discussion

Who is online

Users browsing this forum: No registered users and 1 guest