diff --git a/openlp/core/display/html/display.js b/openlp/core/display/html/display.js
index 13dd4dd07..21e45c2c0 100644
--- a/openlp/core/display/html/display.js
+++ b/openlp/core/display/html/display.js
@@ -551,7 +551,7 @@ var Display = {
"padding": "0"*/
};
if (!!theme.font_main_outline) {
- mainStyle["-webkit-text-stroke"] = "" + (parseFloat(theme.font_main_outline_size) / 16.0) + "em " +
+ mainStyle["-webkit-text-stroke"] = "" + theme.font_main_outline_size + "pt " +
theme.font_main_outline_color;
mainStyle["-webkit-text-fill-color"] = theme.font_main_color;
}
@@ -571,7 +571,7 @@ var Display = {
theme.font_main_shadow_size + "px";
}
mainStyle["padding-bottom"] = theme.display_vertical_align == VerticalAlign.Bottom ? "0.5em" : "0";
- mainStyle["padding-left"] = !!theme.font_main_outline ? "" + (theme.font_main_outline_size * 2) + "px" : "0";
+ mainStyle["padding-left"] = !!theme.font_main_outline ? "" + (theme.font_main_outline_size * 2) + "pt" : "0";
// These need to be fixed, in the Python they use a width passed in as a parameter
mainStyle["position"] = "absolute";
mainStyle["width"] = "" + (window.innerWidth - (theme.font_main_outline_size * 4)) + "px";
diff --git a/tests/js/test_display.js b/tests/js/test_display.js
index 5e21187f7..bda2c39a0 100644
--- a/tests/js/test_display.js
+++ b/tests/js/test_display.js
@@ -193,6 +193,15 @@ describe("Display.setTextSlides", function () {
var slidesDiv = document.createElement("div");
slidesDiv.setAttribute("class", "slides");
document.body.appendChild(slidesDiv);
+
+ var background = document.createElement("div");
+ background.setAttribute("id", "global-background");
+ document.body.appendChild(background);
+
+ var footer = document.createElement("div");
+ footer.setAttribute("class", "footer");
+ document.body.appendChild(footer);
+
Display._slides = {};
});
@@ -222,6 +231,34 @@ describe("Display.setTextSlides", function () {
expect(Display.reinit).toHaveBeenCalledTimes(1);
expect(Reveal.slide).toHaveBeenCalledWith(0);
});
+
+ it("should correctly set outline width", function () {
+ const slides = [
+ {
+ "verse": "v1",
+ "text": "Amazing grace, how sweet the sound\nThat saved a wretch like me\n" +
+ "I once was lost, but now I'm found\nWas blind but now I see"
+ }
+ ];
+
+ const theme = {
+ 'font_main_color': 'yellow',
+ 'font_main_outline': true,
+ 'font_main_outline_size': 42,
+ 'font_main_outline_color': 'red'
+ };
+
+ spyOn(Display, "reinit");
+
+ Display.setTextSlides(slides);
+ Display.setTheme(theme);
+
+ const slidesDiv = $(".slides")[0];
+
+ expect(slidesDiv.style['-webkit-text-stroke']).toEqual('42pt red');
+ expect(slidesDiv.style['padding-left']).toEqual('84pt');
+ expect(slidesDiv.style['-webkit-text-fill-color']).toEqual('yellow');
+ })
});
describe("Display.setImageSlides", function () {