← Back to team overview

openlp-core team mailing list archive

[Bug 1817433] [NEW] fonts separated with white-spaces are not supported

 

Public bug reported:

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...

** Affects: openlp
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1817433

Title:
  fonts separated with white-spaces are not supported

Status in OpenLP:
  New

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...

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1817433/+subscriptions


Follow ups