Skip to content

Spaces in tts:fontFamily list not handled in HTMLStylingMapDefinition code #245

@nigelmegitt

Description

@nigelmegitt

for (var i = 0; i < attr.length; i++) {

For an input tts:fontFamily value of e.g. "Arial, Roboto, proportionalSansSerif, default" the attr array looks like ["Arial", " Roboto", " proportionalSansSerif", " default"] and the code that does an equality test against those array items, for values like "proportionalSansSerif" finds that they are unequal.

Propose to add a call to trim() on the input vaalue before doing those tests.

The eventual impact of this is that the call to dom_element.style.fontFamily = rslt.join(","); generates a browser error "Error in parsing value for ‘font-family’. Declaration dropped." and the font-family property is not set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions