var ff_fonts = [
    {
        id: "ff0",
        style: "font-family: ff0; font-weight: normal; font-style: normal"
    },
    {
        id: "ff1",
        style: "font-family: ff1; font-weight: bold; font-style: normal"
    },
    {
        id: "ff2",
        style: "font-family: ff2; font-weight: normal; font-style: italic"
    },
    {
        id: "ff3",
        style: "font-family: ff3; font-weight: bold; font-style: normal"
    },
    {
        id: "ff4",
        style: "font-family: ff4; font-weight: normal; font-style: normal"
    },
    {
        id: "ff5",
        style: "font-family: ff5; font-weight: bold; font-style: normal"
    },
    {
        id: "ff6",
        style: "font-family: ff6; font-weight: normal; font-style: italic"
    }
];

        if (window.mobileAppUI && !window.mobileAppUI.temp_flag_ios8 && !window.jsBridge) {
            var old_init = mobileAppUI.init;
            mobileAppUI._old_init = old_init;
            mobileAppUI.init = function() {
                this._old_init();
                mobileAppUI.reflow.resolve_spacer = function (state) {
                    if (!this.previous_spacer || !this.render) {
                        return;
                    }
                    var active_height = this.previous_spacer.size;
                    if (active_height >= 1) {
                        var spacer = document.createElement('span');
                        spacer.innerHTML = '&nbsp; ';
                        spacer.setAttribute('data-selectable', '0');
                        spacer.style.marginLeft = state.offset_x + 'px';
                        if (!this.spaces_have_height) {
                            spacer.style.whiteSpace = 'pre';
                        }
                        spacer.style.marginRight = (this.column_width - state.offset_x + this.emergency_gutter + 40) + 'px';
                        spacer.style.fontSize = ((active_height * this.font.size) / 1.2) + 'px';
                        state.html.appendChild(spacer);
                        this.previous_spacer = null;
                    }
                };
            };
        }