Add customisation option functionality
Closes #256.
Allows an options object to be passed into renderHTML() to modify the presentation of the resulting HTML.
The options parameter can be used to configure adjustments that change the presentation away from the document defaults:
-
sizeAdjust: {number}scales the text size and line padding -
lineHeightAdjust: {number}scales the line height -
backgroundOpacityScale: {number}scales the backgroundColor opacity -
fontFamily: {string}comma-separated list of font family values to use, if present. -
colorAdjust: [{colorSelector: selector, ColorGenerator: generator}*]list of color replacement rules -
colorOpacityScale: {number}opacity override on text color (ignored if zero) -
regionOpacityScale: {number}scales the region opacity -
textOutline: {string}textOutline value to use, if present -
[span|p|div|body|region]BackgroundColorAdjust: {documentColor: replaceColor*}map of backgroundColors and the value with which to replace them for each element type
This feature was discussed during the DASH-IF dash.js face to face meeting. There is demand by the industry to enable overriding embedded style information. We would like to expose this functionality to dash.js users. Would be great if this feature makes it to the main codebase of imscJS.
Yes, this would be a useful addition to address different accessibility needs or user preferences. +1 from Deutsche Telekom
Hi there, we've been using the functionality of this PR for sometime via a fork of both imscJS and Dash.js, it would be great to be able to bring add these changes to a release. What do we need to do to progress this? Happy to help with test assets and/or testing if required.