-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FontFamily default
name mapping missing
#250
Comments
When specified, Line 191 in bf2e98a
The initial value of Do you have a test case that demonstrates the issue you are encoutering? |
My test case was using something along the lines of With the above in mind, I think there might be a problem similar to #245 |
@nigelmegitt Do you recall why instead of: Line 197 in bf2e98a
|
Hi @palemieux yes I do. The reason is that it is where we have it in the BBC fork, and the reason we put it there is because we apply styling options when HTML mapping, so that they happen whenever we render an ISD, not just on document parsing. The specific example here is at https://github.com/bbc/imscJS/blob/4b194d20e590f255e4168f9d3ddfd28430b35590/src/main/js/html.js#L1470-L1472
Then we process the split |
@mattjuggins It sounds like adding a |
I agree, that should work. |
Excellent. Thanks both. I've opened up #251 for this. |
The 'default' fontFamilyType isn't mapped correctly, resulting in no fontFamily styling being applied to subtitle elements.
As far as I understand:
default
.html.js
interpretstts:fontfamily
and converts these family types to generic font families, or to appropriate named fonts.default
is 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.default
is 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 asmonospaceSerif
. As duplicate font family names are cleared up later in the code I think it would be fair to change themonospaceSerif
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.
The text was updated successfully, but these errors were encountered: