Hi James,
Welcome to the OpenLP dev community!
On 2017-12-30 10:55, James Muscat wrote:
I've discovered what looks like a bug in OpenLP that would affect us:
namely, it's not possible to set thin outlines on large fonts.
It looks like this is due to a mismatch in units between the UI (which
uses
pt and is restricted to be an integer value) and
`htmlbuilder.py#build_lyrics_outline_css` which uses em. This means
that
the minimum possible outline width is 1/16em (not sure why there's a
division by 16 there), which for large font sizes (I'm looking at 96pt
or
so) the outline is very thick.
Hrm, I haven't worked on that personally, that is an interesting find.
It looks like possible solutions would be changing the UI to allow
float
values in em, or changing the generated CSS to use integer pt values
(remembering to account for this in `left_margin` in
`build_lyrics_format_css`).
The disadvantage of either approach is that it will break people's
existing
themes if they use outlines, though it's straightforward to make the
adjustment.
I have a patch that does the latter and passes all tests (bar what
looks
like a spurious one from
`test_bible_gateway_extract_books_support_redirect`), and can put
together
a merge request - but I thought I'd say hello here first to check if
there
was a reason for it being done the previous way.
Reason? Probably mostly ignorance (aka, just didn't know).
Right now, however, we're working on an update to how we render stuff,
so we're largely embedding what was previously done in Python now in the
actual HTML page we create. My webengine-migrate[0] branch has the
latest code. Take a look at that and see if the bug is still there (look
for the theme-related Javascript functions).
[0] https://code.launchpad.net/~raoul-snyman/openlp/webengine-migrate
--
Raoul Snyman
+1 (520) 490-9743
[email protected]
_______________________________________________
openlp-dev mailing list
[email protected]
https://lists.openlp.io/mailman/listinfo/openlp-dev