-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Labels
Description
The 'default' fontFamilyType isn't mapped correctly, resulting in no fontFamily styling being applied to subtitle elements.
As far as I understand:
- There are several FontFamilyTypes, specified in EBU-TT-D (Section 4.4.), including
default. html.jsinterpretstts:fontfamilyand converts these family types to generic font families, or to appropriate named fonts.defaultis not handled as a specific case in html.js so it ends back unmapped into the value for fontFamily to be applied to an element.- The fontFamily style is not applied because
defaultis a reserved word in CSS and hence not a valid font family name.
In the IMSC specification, there is a mention that default should be interpreted as monospaceSerif. As duplicate font family names are cleared up later in the code I think it would be fair to change the monospaceSerif case to the following in `html.js:
if (attr[i] === "monospaceSerif" || attr[i] === "default") { ...
This also seems to be considered in styles.js..
If this all checks out I'm happy to make the change and raise a PR.