One of the topics we always cover in our data visualization training courses is the font family selection within your app. With the increasing number of devices and platforms accessing to your QlikView apps, details such as font size and type have become in a very important piece of the app success.
As a rule of thumb our recommendation is to keep your app as simple as possible, meaning using Arial or any other font that work well across devices. It’s important to note that fonts such as Tahoma or MS Calibri will force those devices that don’t come with those fonts installed, to pick an alternative font based on the font family. That may cause your app to be unreadable and/or blurry in some situations.
But let’s say you really need to use a non-standard typeface to customize one of your apps. Is that doable with QlikView?
The answer is yes, you can customize QlikView apps based on your needs and use an external font from Google or any other font servers.
To do so you will need to install and customize a document extension – you can download it at the bottom of this post - and then follow the next steps:
1. Search or browse font families at google.com/fonts you want to use in your QV app For this example, I’m going to pick the Abel font for my project, one of the many open source fonts hosted at google.com/fonts. You could choose a different provider or just host the font file on your own server.
2. Once you have chosen your font, grab a copy of the font file and install it on the computer where you are developing your app and in the machine(s) that host the QlikView Server(s). This is especially important: you must install the font on the QV server host machine if you want your charts to be rendered using the selected font.
3. Open your QlikView app with QlikView Desktop and modify the font as usual:
4. Once we are done applying your font across all the app objects it’s the time to review the document extension.
5. Download the extension attached at the bottom of this post, rename the file from ExtensionName.qar to ExtensionName.zip and unzip it.
A document extension will include at least 2 files, Definition.XML and Script.js.
The JS file will look like the example below where Abel is the font I chosen.
7. Go back to QlikView and activate the document extension in the app:
From now on when the page loads, QlikView will include the extension and the font will be loaded across devices.
8. Publish your app to the server and enjoy your custom fonts in any device.
As a general recommendation you should stick to one of the 'standard' fonts such as Arial but in the case of you trying something new, following the described 8 steps you should be able to deploy a QV app to a server with a non-standard font on it.
PROS: Wide range of font styles to choose from, easy app customization, web standard fonts, works well across any device.
All was installed and working in the list boxes, etc. All looked fine in QlikView desktop. It was only the bitmap charts that were not displaying correctly in the Ajax. I presume that this was because the service cached the fonts that it was using.
As I said in my message above, once I stopped and restarted the QlikView Server Service then all was well and the bitmap charts render with the correct Roboto font.
I didn't need to restart the server but I guess I would try to restart if possible. There aren't any extra steps and it isn't that important where the font file is hosted; Google, your own server, doesn't really matter as long as it is always accessible.
This is very helpful. I am still confused about a couple things. I am already using a document extension so I can use a CSS to control the look of my application. Now I have a handful of fonts that I want to make available to all of our application across the board. Fonts were installed to server. As I already have a Qva.LoadCSS statement in my java script that points to the application specific CSS, I'm not sure how I would keep my existing LoadCSS and include the QVA.LoadCSS statement you show. As much of the HTML/CSS/JS is out of my area of expertise, I have been reading up. It looks like if I can ge the following statements into the default header of all my document it will do what I am looking for BUT I don't know how I can do this.
Carlos Garcia above mentioned doing an @import in his CSS which looks like it will work as well but I am reading that a link might be more efficient?
In summary, Is there a way to change the "Default" HTML header and include the fonts so they are available across the board to all applications without using a specific document extension in all applications.
Is there a benefit to the @import vs what is described above?
As a side note, all access to our apps will be via Ajax.