odoo/odoo — pull request #2779 by Benniphx (2014-09-29 15:43:15+00:00)
Title: [IMP] 8.0 Fontloader integration for odoo core to improve website loading speed

### Short description

*Integrated a Fontloader to speedup the page loading process.*
*After images, fonts are normally the largest assets in your web page. The Ubuntu font for example adds almost 250Kb to the page weight which is noticeable on slower mobile connections. Chrome, IE, Safari and Opera leave a blank space while the font is loaded so the page is unusable. Firefox and older versions of Opera show text in a fallback font then switch — known as a Flash of Unstyled Text (FOUT). Neither option is ideal.*

#### Old behavior:

* fonts needs to be loaded and there is no good fall back while waiting
* this is noticeable on slower mobile connections

#### Current/Expected behavior:

* Improve Page Performance with a Fontloader
* Text is always shown to the user and if the font is loaded it switches.
* faster loading time

#### Goal:

My goal was it to integrate a Fontloader in the odoo core to speed up loading times of themes from odoo. It can easily adapted to new themes with bigger fonts.
It can be turned of in the backend if you do not like it.

###### Sidenodes:

There was an issue that the website object was not available in all templates (caused by the odoo custom Qweb integration "t-call-assets"). Therefore I updated the render function in the view class of the ir_ui_view.py file. It checks if the website object is in the values dictionary. If it is not in the values dictionary it calls the current website object and stores it in the values dictionary.

*here is a picture from testing I made:*

![Image of Yaktocat](https://imagizer.imageshack.us/v2/1391x731q90/538/g8N6IF.png)