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

Error parsing fontSize with two lengths #219

Closed
davemevans opened this issue Jun 7, 2021 · 2 comments
Closed

Error parsing fontSize with two lengths #219

davemevans opened this issue Jun 7, 2021 · 2 comments
Labels

Comments

@davemevans
Copy link

Given the document below, the following error is produced:

error: Cannot parse styling attribute http://www.w3.org/ns/ttml#styling fontSize --> 86.100000% 140.000000%

My understanding is that it is valid to represent fontSize as a pair of lengths, but perhaps I misunderstood. It appears that within ismcJS the parser assigned in the styling definition assumes a single length.

Should imscJS parse the document, or is there something wrong?

<?xml version="1.0" encoding="UTF-8"?>
<tt xmlns:ttp="http://www.w3.org/ns/ttml#parameter" xmlns="http://www.w3.org/ns/ttml" xmlns:ttm="http://www.w3.org/ns/ttml#metadata" xmlns:tts="http://www.w3.org/ns/ttml#styling" xmlns:smpte="http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt" ttp:cellResolution="41 25" xml:lang="en">
    <head>
        <smpte:information smpte:mode="Enhanced"/>
        <styling>
            <style xml:id="ttx" tts:fontFamily="monospaceSansSerif"/>
        </styling>
        <layout>
            <region style="ttx" tts:origin="0.00% 88.00%" tts:extent="100.00% 8.00%" tts:fontSize="86.100000% 140.000000%" tts:lineHeight="2.000000c" tts:textAlign="center" xml:id="region-1"/>
        </layout>
    </head>
    <body>
        <div>
            <p region="region-1" begin="00:00:21.120" end="00:00:23.320">
                <span xml:space="preserve" tts:color="#FFFFFF">&#xA0;&#xA0;</span>
                <span xml:space="preserve" tts:color="#FFFFFF" tts:backgroundColor="#0000003F">&#xA0;CHEERING&#xA0;AND&#xA0;APPLAUSE&#xA0;</span>
                <span xml:space="preserve" tts:color="#FFFFFF">&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;</span>
            </p>
        </div>
    </body>
</tt>
@nigelmegitt
Copy link
Contributor

@davemevans 2-value tts:fontSize is not supported in IMSC.

In TTML feature terms, as per 7. Supported Features and Extensions, #fontSize-anamorphic specifically is not supported, whereas #fontSize-isomorphic is supported.

Translated into English, it means your document is not conformant IMSC.

@davemevans
Copy link
Author

Thanks @nigelmegitt, useful references as always 👍

@palemieux palemieux modified the milestone: 1.1.3 Release Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants