Skip to content
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

Unspecified font size can't fit a region extent if it's specified in pixels #253

Closed
fcartegnie opened this issue Sep 29, 2017 · 7 comments
Closed

Comments

@fcartegnie
Copy link

<style tts:extent="200px 30px"/>

We have no idea what the 1c font size will finally be and if it will fit the extent.
see also #206

@nigelmegitt
Copy link
Contributor

@fcartegnie in this example, that is correct, since there's no tts:extent on the tt:tt element, so you don't know what the cell resolution computes to in pixels. Some profiles require that the root container region extent is specified if pixel units are used anywhere, which helps to deal with this.

It may be worth using the IMSC tests as a good starting point for implementation testing - I believe those tests are absent this kind of issue (though bugs have a way of finding their way in to any code!).

In this specific example, the implementation is expected to allocate some pixel size to the root container region, and at that point you can compute the pixel size of the cell. In other words, the results are different depending on, say, the video, or the video viewport (or whatever else the implementation uses to derive the root container region extent).

@fcartegnie
Copy link
Author

To me that's the same problem.
The ISMC Extent002.ttml test can't also display properly as test result.
While the region has the right size, the text has no font size and probably can't fit/be displayed.

@nigelmegitt
Copy link
Contributor

Sorry, no, that's not correct - the IMSC Extent002.ttml test specifies the root container region extent as tts:extent="320px 240px" so you can calculate the value of 1c in all cases.

@palemieux
Copy link
Contributor

@fcartegnie To expand on @nigelmegitt , 1c is by default 1/15 of the root container height (15 rows), so tts:fontSize='1c' would be computed as 240/15 = 16 px in the case of https://github.com/w3c/imsc-tests/blob/master/imsc1/ttml/extent/Extent002.ttml .

Makes sense?

@palemieux
Copy link
Contributor

@fcartegnie Looking forward to your feedback on the IMSC tests, by the way.

@fcartegnie
Copy link
Author

I've modifed my code to apply column units to root extents instead of always applying to screen size.
ttml spec is always so easy to figure :/
thanks for the help then.

@palemieux
Copy link
Contributor

thanks for the help then.

Anytime!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants