fonts separated with white-spaces are not supported

Bug #1817433 reported by maarts
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenLP
New
Undecided
Unassigned

Bug Description

Hi,

fonts separated with white-spaces are not supported under Linux. The css font-family description says:

"Note: If a font name contains white-space, it must be quoted. Single quotes must be used when using the "style" attribute in HTML."

In build_footer_css and build_lyrics_format_css is these information missing...

Here a short fix for both:

...
    lyrics = '%s word-wrap: break-word; ' \
             'text-align: %s; vertical-align: %s; font-family: %s; ' \
             'font-size: %spt; color: %s; line-height: %d%%; margin: 0;' \
             'padding: 0; padding-bottom: %s; padding-left: %spx; width: %spx; height: %spx; ' % \
        (justify, align, valign, "\"" + theme_data.font_main_name + "\"", theme_data.font_main_size,
         theme_data.font_main_color, 100 + int(theme_data.font_main_line_adjustment), padding_bottom,
...
    lyrics_html = style % (item.footer.x(), bottom, item.footer.width(),
                           "\"" + theme.font_footer_name + "\"", theme.font_footer_size,
...

I'm a python noob, sorry...

Revision history for this message
Phill (phill-ridout) wrote :

Hi Maarts,

Which version of OpenLP is this and which file?

Revision history for this message
maarts (maarts) wrote : Re: [Bug 1817433] Re: fonts separated with white-spaces are not supported

Hi Phill,

2.4.6

Take a look: ./OpenLP-2.4.6/openlp/core/lib/htmlbuilder.py

On 01.08.19 21:42, Phill wrote:
> Hi Maarts,
>
> Which version of OpenLP is this and which file?
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.